[Tkabber-dev] r289 - trunk/plugins/bmucx

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 7 19:07:56 MSK 2010


Author: ancestor
Date: 2010-02-07 19:07:56 +0300 (Sun, 07 Feb 2010)
New Revision: 289

Modified:
   trunk/plugins/bmucx/bmucx.tcl
Log:
1) Fixed bug in getting affiliations and roles.

Modified: trunk/plugins/bmucx/bmucx.tcl
===================================================================
--- trunk/plugins/bmucx/bmucx.tcl	2010-02-06 23:38:05 UTC (rev 288)
+++ trunk/plugins/bmucx/bmucx.tcl	2010-02-07 16:07:56 UTC (rev 289)
@@ -125,13 +125,13 @@
 	set chatid [chat::chatid $xlib $jid]
 	if {[chat::is_groupchat $chatid]} {
 		if {[info exists ::blockvar_priv($jid)] && $::blockvar_priv($jid)} {
-			if {[catch {set role $::muc::users(role,$xlib,$from)}]} {return 0}
+			if {[catch {set role [::muc::get_role $xlib $from]}]} {return 0}
 			if {$role == "moderator"} {
 				if {[info exists ::blockvar_moders_priv($jid)] && $::blockvar_moders_priv($jid)} {
 					return 1
 				} else {return 0}
 			}			
-			if {[catch {set aff $::muc::users(affiliation,$xlib,$from)}]} {return 0}
+			if {[catch {set aff [::muc::get_affiliation $xlib $from]}]} {return 0}
 			if {$aff == "member"} {
 				if {[info exists ::blockvar_members_priv($jid)] && $::blockvar_members_priv($jid)} {
 					return 1
@@ -147,13 +147,13 @@
 	set chatid [chat::chatid $xlib $jid]
 	if {[chat::is_groupchat $chatid]} {
 		if {[info exists ::blockvar($jid)] && $::blockvar($jid)} {
-			if {[catch {set role $::muc::users(role,$xlib,$from)}]} {return 0}
+			if {[catch {set role [::muc::get_role $xlib $from]}]} {return 0}
 			if {$role == "moderator"} {
 				if {[info exists ::blockvar_moders($jid)] && $::blockvar_moders($jid)} {
 					return 1
 				} else {return 0}
 			}			
-			if {[catch {set aff $::muc::users(affiliation,$xlib,$from)}]} {return 0}
+			if {[catch {set aff [::muc::get_affiliation $xlib $from]}]} {return 0}
 			if {$aff == "member"} {
 				if {[info exists ::blockvar_members($jid)] && $::blockvar_members($jid)} {
 					return 1



More information about the Tkabber-dev mailing list