changeset 2160:7c8ee12f8c1d

Fix an error with missing bot_host attribute. Use more descriptive names.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 18 Jun 2007 15:14:39 +0200
parents a8941968efa1
children e6dd69d3ac69 2a7b535b1e44
files MoinMoin/config/multiconfig.py MoinMoin/events/jabbernotify.py
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Mon Jun 18 03:31:47 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Mon Jun 18 15:14:39 2007 +0200
@@ -376,6 +376,7 @@
 
     navi_bar = [u'RecentChanges', u'FindPage', u'HelpContents', ]
     nonexist_qm = False
+    notification_bot_uri = None
 
     page_credits = [
         '<a href="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a>',
@@ -662,12 +663,12 @@
         self.mail_enabled = (self.mail_smarthost is not None or self.mail_sendmail is not None) and self.mail_from
         
         # check if jabber bot is available and set flag:
-        self.jabber_enabled = self.bot_host is not None
+        self.jabber_enabled = self.notification_bot_uri is not None
         
         # if we are to use the jabber bot, instantiate a server object for future use
         if self.jabber_enabled:
             from xmlrpclib import Server
-            self.xmlrpc_server = Server("http://" + self.bot_host, )
+            self.notification_server = Server(self.notification_bot_uri, )
 
         # Cache variables for the properties below
         self._iwid = self._iwid_full = self._meta_dict = None
--- a/MoinMoin/events/jabbernotify.py	Mon Jun 18 03:31:47 2007 +0200
+++ b/MoinMoin/events/jabbernotify.py	Mon Jun 18 15:14:39 2007 +0200
@@ -40,7 +40,7 @@
     """ Handles events sent when user's JID changes """
     
     request = event.request
-    server = request.cfg.xmlrpc_server
+    server = request.cfg.notification_server
     _ = request.getText
     
     try:
@@ -81,7 +81,7 @@
     """Handles event sent when a file is attached to a page"""
     
     request = event.request
-    server = request.cfg.xmlrpc_server
+    server = request.cfg.notification_server
     page = Page(request, event.pagename)
     
     subscribers = page.getSubscribers(request, return_users=1)
@@ -94,7 +94,7 @@
     """ Handles events related to page changes """
     
     request = event.request
-    server = request.cfg.xmlrpc_server
+    server = request.cfg.notification_server
     page = event.page
     
     subscribers = page.getSubscribers(request, return_users=1, trivial=event.trivial)    
@@ -107,7 +107,7 @@
     """Handles event sent when a page is deleted"""
     
     request = event.request
-    server = request.cfg.xmlrpc_server
+    server = request.cfg.notification_server
     page = event.page
     
     subscribers = page.getSubscribers(request, return_users=1)
@@ -173,7 +173,7 @@
     @param trivial: the change is marked as trivial
     """
     _ = request.getText
-    server = request.cfg.xmlrpc_server
+    server = request.cfg.notification_server
     
     for jid in jids: