[Tkabber-dev] r164 - in branches/plugins-0.11.1: . autosubscribe

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Nov 24 20:35:30 MSK 2008


Author: kostix
Date: 2008-11-24 20:35:30 +0300 (Mon, 24 Nov 2008)
New Revision: 164

Added:
   branches/plugins-0.11.1/autosubscribe/
Modified:
   branches/plugins-0.11.1/autosubscribe/autosubscribe.tcl
Log:
autosubscribe: Ported autosubscribe plugin from the trunk.


Modified: branches/plugins-0.11.1/autosubscribe/autosubscribe.tcl
===================================================================
--- trunk/plugins/autosubscribe/autosubscribe.tcl	2008-11-24 17:23:07 UTC (rev 163)
+++ branches/plugins-0.11.1/autosubscribe/autosubscribe.tcl	2008-11-24 17:35:30 UTC (rev 164)
@@ -68,6 +68,10 @@
 		if {$roster_group != ""} {
 			lappend attrs group $roster_group
 		}
+		jlib::send_iq set \
+			[jlib::wrapper:createtag query \
+				-vars [list xmlns jabber:iq:roster]] \
+				-to $from -connection $xlib \
 		::xmpp::sendIQ $xlib set \
 			-query [::xmpp::xml::create query \
 				-xmlns jabber:iq:roster \
@@ -75,11 +79,11 @@
 	}
 }
 
-	::xmpp::sendPresence $xlib -to $from -type subscribed
+	::jlib::send_presence -connection $xlib -to $from -type subscribed
 
 	if {$options(ask_subscription)} {
-		::xmpp::sendPresence $xlib -to $from -type subscribe \
-			-status $options(reason)
+		::jlib::send_presence -connection $xlib -to $from -type subscribe \
+			-stat $options(reason)
 	}
 }
 



More information about the Tkabber-dev mailing list