Hello.
With this diff userstatus plugin should allow to work also in multichat.
I have written a proc for my _plugin_ (amsnlogplus) and i have incorporated
that proc, with some changes, in userstatus.
Thanks
Index: userstatus.tcl
===================================================================
--- userstatus.tcl	(revisione 7923)
+++ userstatus.tcl	(copia locale)
@@ -9,7 +9,7 @@
 	
 	}
 
-	proc writestat { chatid status } {
+	proc writestat { chatid user status } {
 		set cur_status [::MSN::stateToDescription $status]
 		set statuscolor [::skin::getKey contact_$cur_status]
 		set statuscolor [string replace $statuscolor 0 0 ""]
@@ -18,7 +18,7 @@
 		set fontformat [list $family bold $statuscolor]
 		::amsn::WinWrite $chatid "\n" says $fontformat 0
 		::amsn::WinWriteIcon $chatid miniinfo 5 0
-		set msg "[timestamp] [::abook::getDisplayNick $chatid] is now [trans $cur_status]\n"
+		set msg "[timestamp] [::abook::getDisplayNick $user] is now [trans $cur_status]\n"
 	
 		#status_log $msg
 		::amsn::WinWrite $chatid $msg says $fontformat 0
@@ -32,11 +32,17 @@
 		upvar 2 substate substate
 		set newstate $substate
 		set email $user
-	
-
-		if { [ lsearch [::ChatWindow::getAllChatIds] $email ] >= 0 } {
-			writestat $email $newstate
+		set allchatids [::ChatWindow::getAllChatIds]
+		foreach chatid $allchatids {
+			if {[string first ::MSN::SB $chatid] != -1} {
+				set user_list [::MSN::usersInChat $chatid]
+				if {[lsearch $user_list $email] != -1 } {
+						writestat $chatid $email $newstate
+				}
+			} elseif {$chatid == $email} {
+				writestat $chatid $email $newstate
+			}
 		}
-
+	return 1
 	}
 }
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to