changeset 4132:99ed52b53e4e

Added support for authentication realms other server hostname
author Karol 'grzywacz' Nowak <grywacz@gmail.com>
date Tue, 23 Sep 2008 00:44:45 +0200
parents 935bd5c48113
children d9d151ce2f6f 4f3d0b92d1c9
files docs/CHANGES jabberbot/config.py jabberbot/xmppbot.py
diffstat 3 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/docs/CHANGES	Sun Sep 21 23:25:19 2008 +0200
+++ b/docs/CHANGES	Tue Sep 23 00:44:45 2008 +0200
@@ -32,6 +32,13 @@
     editor_default = 'text'  # internal default, just for completeness
 
 
+Current:
+  Bug Fixes:
+    * Jabber bot can now be configured to use an authentication realm which
+      is different from the server's hostname; the xmpp_node configuration
+      parameter can now contain a full JID and the xmpp_resource parameter
+      is no longer supported
+
 Version 1.8.0beta2:
   Bug Fixes:
     * GUI Editor - fixed bugs:
--- a/jabberbot/config.py	Sun Sep 21 23:25:19 2008 +0200
+++ b/jabberbot/config.py	Tue Sep 23 00:44:45 2008 +0200
@@ -8,8 +8,8 @@
 
 
 class BotConfig:
-    # Node name (username on the jabber server) to be used
-    xmpp_node = u"moinbot"
+    # Node name (a valid JID) to be used
+    xmpp_node = u"moinbot@jabber.example2.org/wiki"
 
     # Server to be used
     xmpp_server = u"jabber.example.com"
@@ -17,9 +17,6 @@
     # Port to connect to or None, if default
     xmpp_port = None
 
-    # Resource name (entity@server/resource) to be used
-    xmpp_resource = u"wiki"
-
     # Password used to connect to the xmpp server
     xmpp_password = u""
 
@@ -41,7 +38,7 @@
 
     # A secret shared with Wiki , must be the same in both
     # configs for communication to work.
-    secret = "use same string as in secrets setting in wiki config"
+    secret = "use the same string as in secrets setting in wiki config"
 
 
     # Maximum number of items in service discovery cache (XEP-0115)
--- a/jabberbot/xmppbot.py	Sun Sep 21 23:25:19 2008 +0200
+++ b/jabberbot/xmppbot.py	Tue Sep 23 00:44:45 2008 +0200
@@ -177,11 +177,10 @@
 
         self.from_commands = from_commands
         self.to_commands = to_commands
-        jid = u"%s@%s/%s" % (config.xmpp_node, config.xmpp_server, config.xmpp_resource)
 
         self.config = config
         self.log = logging.getLogger(__name__)
-        self.jid = JID(node_or_jid=jid, domain=config.xmpp_server, resource=config.xmpp_resource)
+        self.jid = JID(node_or_jid=config.xmpp_node, domain=config.xmpp_server)
         self.tlsconfig = TLSSettings(require = True, verify_peer=False)
 
         # A dictionary of contact objects, ordered by bare JID