[Tkabber-dev] [tclxmpp] r125 committed - * examples/rssbot.tcl: Ignore messages with empty bodies.

codesite-noreply at google.com codesite-noreply at google.com
Mon Oct 12 08:25:42 MSD 2009


Revision: 125
Author: sgolovan
Date: Sun Oct 11 21:25:16 2009
Log: 	* examples/rssbot.tcl: Ignore messages with empty bodies.

http://code.google.com/p/tclxmpp/source/detail?r=125

Modified:
  /trunk/ChangeLog
  /trunk/examples/rssbot.tcl

=======================================
--- /trunk/ChangeLog	Sun Oct 11 05:17:43 2009
+++ /trunk/ChangeLog	Sun Oct 11 21:25:16 2009
@@ -1,3 +1,7 @@
+2009-10-12  Sergei Golovan  <sgolovan at nes.ru>
+
+	* examples/rssbot.tcl: Ignore messages with empty bodies.
+
  2009-10-11  Sergei Golovan  <sgolovan at nes.ru>

  	* examples/rssbot.tcl: Fixed removing extra space characters from HTML
=======================================
--- /trunk/examples/rssbot.tcl	Sat Oct 10 23:38:51 2009
+++ /trunk/examples/rssbot.tcl	Sun Oct 11 21:25:16 2009
@@ -216,9 +216,9 @@
      set jid [::xmpp::jid::stripResource $from]

      switch -- $type {
-        normal -
-        chat { }
-        "" { set type normal }
+        normal  -
+        chat    { }
+        ""      { set type normal }
          default {
              ::LOG "$from ignoring $type"
              return
@@ -229,10 +229,12 @@
      set subject ""
      foreach {key val} $args {
          switch -- $key {
-            -body { set body $val }
+            -body    { set body    $val }
              -subject { set subject $val }
          }
      }
+
+    if {[string equal $body ""]} return

      if {[catch { rssbot::message_aux $jid $body } answer]} {
          ::LOG "$jid/$body: $answer"


More information about the Tkabber-dev mailing list