[Tkabber-dev] [tclxmpp] r146 committed - 2010-02-01 Sergei Golovan <sgolovan at nes.ru>...

tclxmpp at googlecode.com tclxmpp at googlecode.com
Mon Feb 1 22:45:25 MSK 2010


Revision: 146
Author: sgolovan
Date: Mon Feb  1 11:44:47 2010
Log: 2010-02-01  Sergei Golovan  <sgolovan at nes.ru>

	* xmpp/muc.tcl, xmpp/presence.tcl: Use removeResource.

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

Modified:
  /trunk/ChangeLog
  /trunk/xmpp/muc.tcl
  /trunk/xmpp/presence.tcl

=======================================
--- /trunk/ChangeLog	Mon Feb  1 10:41:48 2010
+++ /trunk/ChangeLog	Mon Feb  1 11:44:47 2010
@@ -1,8 +1,9 @@
  2010-02-01  Sergei Golovan  <sgolovan at nes.ru>

-	* xmpp/jid.tcl, doc/xmpp_jid.man: Added a new command replaceResource
-	  which replaces the resource part of a JID by a given string. Renamed
-	  bareJid to removeResource for consistency.
+	* xmpp/jid.tcl, doc/xmpp_jid.man, xmpp/muc.tcl, xmpp/presence.tcl:
+	  Added a new command replaceResource which replaces the resource
+	  part of a JID by a given string. Renamed bareJid to removeResource
+	  for consistency.

  	* xmpp/muc.tcl: Added medium lebel commands to unban user and to
  	  destroy a room. Fixed malformed JIDs creation in case when their
=======================================
--- /trunk/xmpp/muc.tcl	Mon Feb  1 10:41:48 2010
+++ /trunk/xmpp/muc.tcl	Mon Feb  1 11:44:47 2010
@@ -790,7 +790,7 @@
              # may be not known by admin)
              set RealJID [realJid $token $nick]
              if {![string equal $RealJID ""]} {
-                set attrs [list jid [::xmpp::jid::bareJid $RealJID] \
+                set attrs [list jid [::xmpp::jid::removeResource $RealJID]  
\
                                  $attr $value]
              }
          }
@@ -1058,7 +1058,7 @@
          return
      }

-    set bjid [xmpp::jid::normalize [::xmpp::jid::bareJid $jid]]
+    set bjid [xmpp::jid::normalize [::xmpp::jid::removeResource $jid]]
      set found 0
      foreach item $items {
          foreach {nick jid affiliation reason} $item break
=======================================
--- /trunk/xmpp/presence.tcl	Fri Jan 29 07:14:25 2010
+++ /trunk/xmpp/presence.tcl	Mon Feb  1 11:44:47 2010
@@ -183,7 +183,7 @@
      ::xmpp::Debug $xlib 2 "$from $type $xmlElements $args"

      set jid [::xmpp::jid::normalize $from]
-    set bjid [::xmpp::jid::bareJid $jid]
+    set bjid [::xmpp::jid::removeResource $jid]
      set commands {}

      foreach xidx [list $xlib *] {


More information about the Tkabber-dev mailing list