[Otfbot-dev] [Git] OTFBot branch, master, updated. dbac12064d47b0c0891c426600341c6074f5af95

git version control gitrepo at otfbot.org
Do Nov 4 00:03:39 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OTFBot".

The branch, master has been updated
       via  dbac12064d47b0c0891c426600341c6074f5af95 (commit)
      from  a33ffe36395d9dc5d72ab880c56cf50ef30b0e80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dbac12064d47b0c0891c426600341c6074f5af95
Author: allo <allo at laxu.de>
Date:   Thu Nov 4 00:02:51 2010 +0100

    fixed log plugin. it stopped logging on daychange, because of wrong stop

diff --git a/otfbot/plugins/ircClient/log.py b/otfbot/plugins/ircClient/log.py
index 643b99a..76720bd 100644
--- a/otfbot/plugins/ircClient/log.py
+++ b/otfbot/plugins/ircClient/log.py
@@ -85,8 +85,8 @@ class Plugin(chatMod.chatMod):
         return wait
 
     def dayChange(self):
+        self.closeLogs()
         self.day = self.ts("%d")
-        self.stop()
         for channel in self.channels:
             self.openLog(channel)
             #TODO: this was already commented out. why don't we do this here?
@@ -235,12 +235,15 @@ class Plugin(chatMod.chatMod):
                 for channel in user.getChannels():
                     self.log(channel, "-!- " + oldname + " is now known as " + newname)
 
-    @callback
-    def stop(self):
+    def closeLogs(self):
         for channel in self.channels:
             self.log(channel, "--- Log closed " + self.ts("%a %b %d %H:%M:%S %Y"), False)
             self.files[channel].close()
+
+    @callback
+    def stop(self):
         self.stopThread=True
+        self.closeLogs()
 
     @callback
     def connectionMade(self):
-----------------------------------------------------------------------

Summary of changes:
 otfbot/plugins/ircClient/log.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
OTFBot



Mehr Informationen über die Mailingliste Otfbot-dev