Hello.
I need some events for Search Contact Plugin (
http://www.amsn-project.net/forums/viewtopic.php?t=3542
)
These events are useful to update the CL.
They are:
1) contactListChanged_REM -> to know when a user remove or readd us from
his/her CL
2) contactBlocked -> when we block a contact
3) unblockedUser -> when we unblock a contact
4) movedUser -> when we move a contact from a group to another group
5) copiedUser -> when we copy a contact in another group
6) addedUser -> when we add (o readd) a contact
7) removedUserFromGroup -> when we remove a contact from a Group
8) deletedUser -> when we remove an user from our CL
9) contactDataChanged -> it's called when PropOk is called: when we set an
user custom nick/colour, and etc...
-------
contactListChanged_REM can also be useful for this:
http://www.amsn-project.net/forums/viewtopic.php?t=3642
-------
I will use some of those events in ContactMonitor Plugin (
http://www.amsn-project.net/forums/viewtopic.php?t=3478
) too
-------
What do you think?
Sorry for my English.
Thanks, bye.
Index: protocol.tcl
===================================================================
--- protocol.tcl (revision 8888)
+++ protocol.tcl (working copy)
@@ -1141,6 +1142,10 @@
::abook::removeContactFromList $user $list_sort
#an event to let the GUI know a user is removed from a
list
::Event::fireEvent contactListChange protocol $user
+
+ set userlogin $user
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent contactListChanged_REM evpar
}
global contactlist_loaded
@@ -1411,6 +1416,9 @@
}
#an event to let the GUI know a user is blocked
after 500 [list ::Event::fireEvent contactBlocked protocol
$userlogin]
+
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent blockedUser evpar
}
proc unblockUser { userlogin username} {
@@ -1422,6 +1430,9 @@
}
#an event to let the GUI know a user is unblocked
after 500 [list ::Event::fireEvent contactUnblocked protocol
$userlogin]
+
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent unblockedUser evpar
}
# Move user from one group to another group
@@ -1443,6 +1454,8 @@
#an event to let the GUI know a user is moved between 2 groups
::Event::fireEvent contactMoved protocol $passport [list
$oldGid $newGid]
+ set evpar(passport) passport
+ ::plugins::PostEvent movedUser evpar
}
#Copy user from one group to another
@@ -1456,6 +1469,9 @@
} else {
set atrid [::MSN::WriteSB ns "ADD" "FL $passport
[urlencode $userName] $newGid"]
}
+
+ set evpar(passport) passport
+ ::plugins::PostEvent copiedUser evpar
}
@@ -1477,6 +1493,9 @@
} else {
::MSN::WriteSB ns "ADD" "FL $userlogin $username $gid"
"::MSN::ADDHandler"
}
+
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent addedUser evpar
}
@@ -1544,6 +1565,9 @@
} else {
::MSN::WriteSB ns REM "FL $userlogin $grId"
}
+
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent removedUserFromGroup evpar
}
@@ -1558,6 +1582,9 @@
} else {
::MSN::WriteSB ns REM "FL $userlogin"
}
+
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent deletedUser evpar
}
##################################################
Index: abook.tcl
===================================================================
--- abook.tcl (revision 8888)
+++ abook.tcl (working copy)
@@ -1906,6 +1906,10 @@
::MSN::contactListChanged
::Event::fireEvent contactDataChange gui $email
+ set userlogin $email
+ set evpar(userlogin) userlogin
+ ::plugins::PostEvent contactDataChanged evpar
+
::abook::saveToDisk
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel