1) @@ -6986,8 +6986,7 @@
With this changes we can log OIM deliverfail notification.
I haven't added the msg, because when we get an: (authentication failed),
we'll always get this error and the msg it's always the same.
Example with msg, we'll have in log conversation
A: Hello B!
[deliverfail]: Hello B! (authentication failed)
A: How are you?
[deliverfail]: Hello B! (authentication failed)
etc...

2) @@ -7006,8 +7005,8 @@
It fixes this problem:
When we send an OIM we received from the server, maybe for confirmation, the
same OIM and the user ID.

Example:
if we send to B: hello B! we'll see in log conversation:
A: hello B!
B: hello B!
etc...

3) @@ -7141,7 +7140,10 @@ , @@ -274,9 +274,10 @@ and @@ -328,17 +329,27 @@
It fixes this problem:
When we receive OIM, in log conversation we see:
[timestamp]: user_ID:
[timestamp of OIM] Nickname says:
Hello B!
[timestamp]: user_ID:
[timestamp of OIM] Nickname says:
How are you?
etc...

4) @@ -328,17 +329,27 @@
It resolves this _situation_:
If we send an OIM, it will log, but there is no message, in log
conversation, that can remember us that we have sent an OIM.

lconvstartedOIM shoud be:
You are sending or receiving an OIM

---
What do you think?
Thanks
Index: gui.tcl
===================================================================
--- gui.tcl     (revisione 7961)
+++ gui.tcl     (copia locale)
@@ -6986,8 +6986,7 @@
 
        proc MessageSendCallback { chatid error } {
                if {![string match *success* $error]} {
-                       ::amsn::WinWrite $chatid "\n[timestamp] [trans 
deliverfail]:\n" red
-                       ::amsn::WinWrite $chatid "\n$error\n" red
+                       ::amsn::WinWriteFail $chatid "($error)"
                }
        }
 
@@ -7006,8 +7005,8 @@
                if { $answer == "yes"} {
                        set ::OIM_GUI::oim_asksend_[string map {: _} ${chatid} 
] 0
                        ::MSNOIM::sendOIMMessage [list 
::OIM_GUI::MessageSendCallback $chatid] $email $txt
-                       #loging
-                       if {[::config::getKey keep_logs]} {
+                       #loging, we have to add  && [::abook::getPersonal MFN] 
== $email because without this we log also unuseful things.
+                       if {[::config::getKey keep_logs] && 
[::abook::getPersonal MFN] == $email} {
                                ::log::PutLog $chatid $email $txt
                        }
                }
@@ -7141,7 +7140,10 @@
                #We     should add an event for sending message
                #loging
                if {[::config::getKey keep_logs]} {
-                       ::log::PutLog $chatid $user $msg
+                       #we need to reset them
+                       set msg [lindex $oim_message 3]
+                       set user $nick
+                       ::log::PutLog $chatid $user $msg "" 0 $tstamp
                }
        }
 
Index: loging.tcl
===================================================================
--- loging.tcl  (revisione 7961)
+++ loging.tcl  (copia locale)
@@ -262,7 +262,7 @@
        # user : user who sent message
        # msg : msg
 
-       proc PutLog { chatid user msg {fontformat ""} {failed 0}} {
+       proc PutLog { chatid user msg {fontformat ""} {failed 0} {OIMtstamp 0}} 
{
                if {$fontformat == ""} {
                        set color "NOR"
                } else {
@@ -274,9 +274,10 @@
                        # When the message failed to deliver, we should show 
the deliverfail message instead of the user's nickname.
                        set user [trans deliverfail]
                } 
-
-               if {[::OIM_GUI::IsOIM $chatid]} {
-                       ::log::WriteLog $chatid "\|\"LITA$user :\|\"L$color 
$msg\n" 0 $chatid
+               
+               #if we are sending or receiving an OIM...
+               if {[::OIM_GUI::IsOIM $chatid] || $OIMtstamp != 0} {
+                       ::log::WriteLog $chatid "\|\"LITA$user :\|\"L$color 
$msg\n" 0 $chatid $OIMtstamp
                } else  {
                        set user_list [::MSN::usersInChat $chatid]
                        foreach user_info $user_list {
@@ -303,7 +304,7 @@
        # Checks if a fileid for current user already exists before writing
        # conf 1 is used for conference messages
 
-       proc WriteLog { email txt {conf 0} {user_list ""}} {
+       proc WriteLog { email txt {conf 0} {user_list ""} {OIMtstamp 0}} {
 
                set fileid [LogArray $email get]
 
@@ -328,17 +329,27 @@
                                        ConfArray $email set $conf
                                }
                        }
-                       puts -nonewline $fileid "\|\"LGRA[timestamp] $txt"
+                       if {$OIMtstamp != 0 } {
+                                       puts -nonewline $fileid 
"\|\"LGRA$OIMtstamp $txt"
+                       } else  {
+                                       puts -nonewline $fileid 
"\|\"LGRA[timestamp] $txt"
+                       }
                } else {
                        StartLog $email
                        set fileid [LogArray $email get]
                        if { $fileid != 0 } {
-                               if { $conf == 0 } {
+                               if {[::OIM_GUI::IsOIM $email] || $OIMtstamp != 
0} {
+                                       puts -nonewline $fileid 
"\|\"LRED\[[trans lconvstartedOIM [clock format [clock seconds] -format "%d %b 
%Y %T"]]\]\n"
+                               } elseif { $conf == 0 } {
                                        puts -nonewline $fileid 
"\|\"LRED\[[trans lconvstarted [clock format [clock seconds] -format "%d %b %Y 
%T"]]\]\n"
                                } else {
                                        puts -nonewline $fileid 
"\|\"LRED\[[trans lenteredconf $email [clock format [clock seconds] -format "%d 
%b %Y %T"]] \(${users}\) \]\n"
                                }
-                               puts -nonewline $fileid "\|\"LGRA[timestamp] 
$txt"
+                               if {$OIMtstamp != 0 } {
+                                       puts -nonewline $fileid 
"\|\"LGRA$OIMtstamp $txt"
+                               } else  {
+                                       puts -nonewline $fileid 
"\|\"LGRA[timestamp] $txt"
+                               }
                        }
                }
        }
-------------------------------------------------------------------------
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