Hi,
It looks nice, but I haven't tested it though....
btw, about all your diffs, could you resend them all in a single file so I can
review all the changes and decide
what to keep. An (brief) explanation on what the fixes are would be nice.
thx
KKRT
On Sun, Feb 11, 2007 at 06:56:30PM +0100, square87 wrote:
> Hello!
> What do you think about the development of my plugin?
> Can you give me some suggestions or criticisms?
> For me it's almost finish.
> Thanks.
> Square87
> Index: protocol.tcl
> ===================================================================
> --- protocol.tcl (revisione 7951)
> +++ protocol.tcl (copia locale)
> @@ -1040,6 +1040,8 @@
> cmsn_draw_online 1 1
> #an event used by guicontactlist to know when we changed our
> nick
> ::Event::fireEvent myNickChange protocol
> + #an event used by amsnlogplus
> + ::plugins::PostEvent myPSMChange evPar
>
> }
>
> @@ -3785,6 +3787,8 @@
> send_dock STATUS [::MSN::myStatusIs]
> #an event used by guicontactlist to
> know when we changed our nick
> ::Event::fireEvent myNickChange protocol
> + #an event plugin used by amsnlogplus
> + ::plugins::PostEvent myNickChanged evPar
> }
> ::abook::saveToDisk
> }
> @@ -3828,6 +3832,8 @@
> }
> }
> ::Event::fireEvent contactPSMChange protocol $contact
> + set evPar(contact) contact
> + ::plugins::PostEvent contactPSMChanged evPar
> }
>
> method handleNOT { command payload } {
> @@ -4841,15 +4847,17 @@
>
>
> if {$user_name != [::abook::getNick $user]} {
> +
> + set nick_changed 1
> +
> #Nick differs from the one on our list, so change it
> #in the server list too
> - ::abook::setContactData $user nick $user_name
> + ::abook::setContactData $user nick $user_name $nick_changed
> # ::MSN::changeName $user [encoding convertto utf-8
> $encoded_user_name] 1
>
> #an event used by guicontactlist to know when we changed our
> nick
> ::Event::fireEvent contactNickChange protocol $user
>
> - set nick_changed 1
>
> if {[::config::getKey protocol] == 11} {
> if {$::msnp13 != 1} {
> Index: loging.tcl
> ===================================================================
> --- loging.tcl (revisione 7951)
> +++ loging.tcl (copia locale)
> @@ -17,9 +17,11 @@
> # Opens the log file by email address, called from WriteLog
> # WriteLog has to check if fileid already exists before calling this
> proc
>
> - proc StartLog { email } {
> + proc StartLog { email {fileid 0}} {
> + set evPar(email) email
> + set evPar(fileid) fileid
> + ::plugins::PostEvent start_log evPar
>
> -
> # if we got no profile, set fileid to 0
> if { [LoginList exists 0 [::config::getKey login]] == 0 } {
> LogArray $email set 0
> @@ -275,6 +277,15 @@
> set user [trans deliverfail]
> }
>
> + set evPar(chatid) chatid
> + set evPar(user) user
> + set evPar(msg) msg
> + set evPar(fontformat) fontformat
> + set evPar(failed) failed
> + set evPar(color) color
> + #set evPar(OIMtstamp) OIMtstamp
> + ::plugins::PostEvent put_log evPar
> +
> if {[::OIM_GUI::IsOIM $chatid]} {
> ::log::WriteLog $chatid "\|\"LITA$user :\|\"L$color
> $msg\n" 0 $chatid
> } else {
> @@ -335,8 +346,10 @@
> if { $fileid != 0 } {
> if { $conf == 0 } {
> puts -nonewline $fileid
> "\|\"LRED\[[trans lconvstarted [clock format [clock seconds] -format "%d %b
> %Y %T"]]\]\n"
> + StartLog $email $fileid
> } else {
> puts -nonewline $fileid
> "\|\"LRED\[[trans lenteredconf $email [clock format [clock seconds] -format
> "%d %b %Y %T"]] \(${users}\) \]\n"
> + StartLog $user_list $fileid
> }
> puts -nonewline $fileid "\|\"LGRA[timestamp]
> $txt"
> }
> @@ -356,7 +369,11 @@
> foreach user_info $user_list {
> set fileid [LogArray [lindex $user_info 0] get]
> if { $fileid != 0 } {
> + set temp_usr_name $usr_name ;#because
> it could be changed in leaves_conf event
> + set evPar(usr_name) usr_name
> + ::plugins::PostEvent leaves_conf evPar
> puts -nonewline $fileid
> "\|\"LRED\[[trans lleftconf $usr_name]\]\n"
> + set usr_name $temp_usr_name
> }
> if { [llength $user_list] == 1 } {
> ConfArray [lindex $user_info 0] set 3
> @@ -381,6 +398,8 @@
> set login [lindex $user_info 0]
> set fileid [LogArray $login get]
> if { $login != $usr_name && $fileid != 0} {
> + set evPar(usr_name) usr_name
> + ::plugins::PostEvent joins_conf evPar
> puts -nonewline $fileid
> "\|\"LRED\[[trans ljoinedconf $usr_name]\]\n"
> }
> }
> Index: gui.tcl
> ===================================================================
> --- gui.tcl (revisione 7951)
> +++ gui.tcl (copia locale)
> @@ -5327,7 +5327,7 @@
> #///////////////////////////////////////////////////////////////////////
> proc change_name_ok {} {
> set new_name [.change_name.f.nick_entry get]
> - if {$new_name != ""} {
> + if {$new_name != "" && [::abook::getContactData myself MFN] !=
> $new_name} {
> if { [string length $new_name] > 130} {
> set answer [::amsn::messageBox [trans longnick] yesno
> question [trans confirm]]
> if { $answer == "no" } {
> Index: abook.tcl
> ===================================================================
> --- abook.tcl (revisione 7951)
> +++ abook.tcl (copia locale)
> @@ -388,7 +388,7 @@
> #user_login: the user_login you want to set data to
> #field: the field you want to set
> #data: the data that will be contained in the given field
> - proc setContactData { user_login field data } {
> + proc setContactData { user_login field data {nick_changed 0}} {
> global pgc
> variable users_data
>
> @@ -430,6 +430,8 @@
> set user_data(raw_nick) $data
> #post event for amsnplus
> set evPar(data) data
> + set evPar(user_login) user_login
> + set evPar(nick_changed) nick_changed
> ::plugins::PostEvent parse_nick evPar
>
> set user_data(nick) $data
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel