[Tkabber-dev] r1404 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 22 21:45:19 MSD 2008


Author: sergei
Date: 2008-04-22 21:45:16 +0400 (Tue, 22 Apr 2008)
New Revision: 1404

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/muc.tcl
Log:
	* muc.tcl: Added reasons to all MUC /commands. It isn't supported by
	  MUC servers currently, but might be useful in the future (thanks to
	  Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-04-22 05:58:08 UTC (rev 1403)
+++ trunk/tkabber/ChangeLog	2008-04-22 17:45:16 UTC (rev 1404)
@@ -3,6 +3,10 @@
 	* plugins/general/caps.tcl: Fixed bug with jabber:x:data processing
 	  in case if field values contain spaces.
 
+	* muc.tcl: Added reasons to all MUC /commands. It isn't supported by
+	  MUC servers currently, but might be useful in the future (thanks to
+	  Konstantin Khomoutov).
+
 2008-04-21  Sergei Golovan  <sgolovan at nes.ru>
 
 	* datagathering.tcl: Added variable type to parsed jabber:x:data form

Modified: trunk/tkabber/muc.tcl
===================================================================
--- trunk/tkabber/muc.tcl	2008-04-22 05:58:08 UTC (rev 1403)
+++ trunk/tkabber/muc.tcl	2008-04-22 17:45:16 UTC (rev 1404)
@@ -190,43 +190,35 @@
     } elseif {[cequal [crange $body 0 6] "/voice "]} {
 	set params {role participant}
 	set dir up
-	set nick [parse_nick $body 7]
-	set reason ""
+	lassign [parse_nick_reason $body 7] nick reason
     } elseif {[cequal [crange $body 0 8] "/devoice "]} {
 	set params {role visitor}
 	set dir down
-	set nick [parse_nick $body 9]
-	set reason ""
+	lassign [parse_nick_reason $body 9] nick reason
     } elseif {[cequal [crange $body 0 7] "/member "]} {
 	set params {affiliation member}
 	set dir up
-	set nick [parse_nick $body 8]
-	set reason ""
+	lassign [parse_nick_reason $body 8] nick reason
     } elseif {[cequal [crange $body 0 9] "/demember "]} {
 	set params {affiliation none}
 	set dir down
-	set nick [parse_nick $body 10]
-	set reason ""
+	lassign [parse_nick_reason $body 10] nick reason
     } elseif {[cequal [crange $body 0 10] "/moderator "]} {
 	set params {role moderator}
 	set dir up
-	set nick [parse_nick $body 11]
-	set reason ""
+	lassign [parse_nick_reason $body 11] nick reason
     } elseif {[cequal [crange $body 0 12] "/demoderator "]} {
 	set params {role participant}
 	set dir down
-	set nick [parse_nick $body 13]
-	set reason ""
+	lassign [parse_nick_reason $body 13] nick reason
     } elseif {[cequal [crange $body 0 6] "/admin "]} {
 	set params {affiliation admin}
 	set dir up
-	set nick [parse_nick $body 7]
-	set reason ""
+	lassign [parse_nick_reason $body 7] nick reason
     } elseif {[cequal [crange $body 0 8] "/deadmin "]} {
 	set params {affiliation member}
 	set dir down
-	set nick [parse_nick $body 9]
-	set reason ""
+	lassign [parse_nick_reason $body 9] nick reason
     } else {
 	return
     }



More information about the Tkabber-dev mailing list