[Tkabber-dev] r1928 - in trunk/tkabber: . plugins/chat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Mar 8 11:40:33 MSK 2010


Author: sergei
Date: 2010-03-08 11:40:32 +0300 (Mon, 08 Mar 2010)
New Revision: 1928

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/chat/muc_commands.tcl
Log:
	* plugins/chat/muc_commands.tcl: Added /banjid command (thanks to
	  Serge Yudin).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2010-02-23 09:35:52 UTC (rev 1927)
+++ trunk/tkabber/ChangeLog	2010-03-08 08:40:32 UTC (rev 1928)
@@ -1,3 +1,8 @@
+2010-03-08  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/chat/muc_commands.tcl: Added /banjid command (thanks to
+	  Serge Yudin).
+
 2010-02-23  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/roster.tcl: Fixed commands in popup submenus if they contain

Modified: trunk/tkabber/plugins/chat/muc_commands.tcl
===================================================================
--- trunk/tkabber/plugins/chat/muc_commands.tcl	2010-02-23 09:35:52 UTC (rev 1927)
+++ trunk/tkabber/plugins/chat/muc_commands.tcl	2010-03-08 08:40:32 UTC (rev 1928)
@@ -19,6 +19,14 @@
 	set value outcast
 	set dir down
 	lassign [parse_nick_reason $body 5] nick reason
+    } elseif {[string equal [string range $body 0 7] "/banjid "]} {
+	lassign [parse_nick_reason $body 8] jid reason
+	::xmpp::muc::setAffiliation $xlib $group outcast \
+			     -jid $jid -reason $reason \
+			     -command [list muc::test_error_res \
+					    "affiliation outcast '$jid'" \
+					    $xlib $group $chatid]
+	return stop
     } elseif {[string equal [string range $body 0 6] "/unban "]} {
 	set jid [parse_nick $body 7]
 	muc::unban $xlib $group $jid
@@ -70,7 +78,6 @@
     } else {
 	return
     }
-
     muc::change_item_attr $xlib $group/$nick $attr $value $dir $reason $chatid
 
     return stop
@@ -106,7 +113,7 @@
     upvar 0 $compsvar comps
 
     if {!$wordstart} {
-	lappend comps {/whois } {/kick } {/ban } {/unban } \
+	lappend comps {/whois } {/kick } {/ban } {/banjid } {/unban } \
 	    {/voice } {/devoice } \
 	    {/member } {/demember } \
 	    {/moderator } {/demoderator } \



More information about the Tkabber-dev mailing list