2005/12/7, Jérôme Gagnon-Voyer <[EMAIL PROTECTED]>:
> Since this commit, for me, pop3 doesn't work anymore with Gmail
> Le 05-12-03 à 11:23, A S a écrit :
>
> > Update of /cvsroot/amsn/amsn-extras/plugins/pop3
> > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6544
> >
> > Modified Files:
> >       pop3.tcl
> > Log Message:
> > fix for changed gmail format
> >
> > Index: pop3.tcl
> > ===================================================================
> > RCS file: /cvsroot/amsn/amsn-extras/plugins/pop3/pop3.tcl,v
> > retrieving revision 1.64
> > retrieving revision 1.65
> > diff -C2 -d -r1.64 -r1.65
> > *** pop3.tcl  26 Nov 2005 19:11:28 -0000      1.64
> > --- pop3.tcl  3 Dec 2005 16:23:30 -0000       1.65
> > ***************
> > *** 996,1000 ****
> >       # Arguments:
> >       #       acntn        -> The number of the gmail account to check
> > !     # TODO : make the code more understandable !
> >       proc Check_gmail {acntn} {
> >               package require http
> > --- 996,1001 ----
> >       # Arguments:
> >       #       acntn        -> The number of the gmail account to check
> > !     #TODO : add the balloon support.
> > !     #TODO : make the code more understandable !
> >       proc Check_gmail {acntn} {
> >               package require http
> > ***************
> > *** 1074,1127 ****
> >               set gmail(text_line) [lindex $gmail(dataINBOX) 0]
> >               #now, parsing !
> > !             for {set i 1} {$i<[llength $gmail(dataINBOX)]} {incr i} {
> > !                     #get the number of unread messages
> > !                     if { [string match *Inbox\&nbsp\;* $gmail(text_line) 
> > ] } {
> > !                             regexp {Inbox\&nbsp\;\((\d+)\)\<\/a\>\<\/b\>} 
> > $gmail
> > (text_line) -> gmail(Unreads)
> > !                             #make the balloon
> > !                             set ::pop3::balloontext_$acntn "\n"
> > !                             set gmail(msg_number) 0
> >                               incr i
> > !                             for { set i $i } {$i<[llength 
> > $gmail(dataINBOX)]} {incr i} {
> > !                                     set gmail(text_line) [lindex 
> > $gmail(dataINBOX) $i ]
> > !                                     #this sentence is close to the datas 
> > we need
> > !                                     if { [string match *\<\/b\>\ of\ 
> > \<b\>* $gmail(text_line) ] } {
> > !                                             incr i
> > !                                             set gmail(text_line) [lindex 
> > $gmail(dataINBOX) $i ]
> > !                                             #gmail(parity) is used to 
> > have a good display in the balloon
> > !                                             set gmail(parity) 1
> > !                                             while {$i<[llength 
> > $gmail(dataINBOX)] && $gmail(msg_number)
> > < $gmail(Unreads) } {
> > !                                                     set gmail(text_line) 
> > [lindex $gmail(dataINBOX) $i ]
> > !                                                     if { [string equal 
> > [string range $gmail(text_line) 0 2]
> > "<td"] } {
> > !                                                             set 
> > gmail(text_line_1) [lindex $gmail(dataINBOX) [expr $i
> > + 1] ]
> > !                                                             set 
> > gmail(text_line_2) [lindex $gmail(dataINBOX) [expr $i
> > + 2] ]
> > !                                                             set 
> > gmail(text_line_3) [lindex $gmail(dataINBOX) [expr $i
> > + 3] ]
> > !                                                             set 
> > gmail(text_line_5) [lindex $gmail(dataINBOX) [expr $i
> > + 5] ]
> > !                                                             if { [string 
> > equal [string range $gmail(text_line_1)
> > end-4 end] "</td>"] && \
> > !                                                             [string equal 
> > [string range $gmail(text_line_2) 0 2]
> > "<td"] &&\
> > !                                                             ( [string 
> > equal [string range $gmail(text_line_3) 0 12]
> > "<a href=\"?th="] || \
> > !                                                             [string equal 
> > [string range $gmail(text_line_5) 0 12] "<a
> > href=\"?th="] )
> > !                                                             } {
> > !                                                                     incr 
> > gmail(msg_number)
> > !                                                                     
> > regsub -all {\<\/td\>} $gmail(text_line_1) "" gmail
> > (text_line)
> > !                                                                     
> > regsub -all {\<b\>} $gmail(text_line) "" gmail(text_line)
> > !                                                                     
> > regsub -all {\<\/b\>} $gmail(text_line) "" gmail(text_line)
> > !                                                                     #adds 
> > the author of the mail to the balloon text
> > !                                                                     
> > append ::pop3::balloontext_$acntn \n$gmail(text_line)
> > !                                                                     if { 
> > [string match *<b>* [lindex $gmail(dataINBOX) [expr
> > $i + 6] ] ] } {
> > !                                                                           
> >   set gmail(text_line) [lindex $gmail(dataINBOX) [expr $i
> > + 6] ]
> > !                                                                     } 
> > else {
> > !                                                                           
> >   set gmail(text_line) [lindex $gmail(dataINBOX) [expr $i
> > + 8] ]
> > !                                                                     }
> > !                                                                     
> > regsub -all {\<b\>} $gmail(text_line) "" gmail(text_line)
> > !                                                                     
> > regsub -all {\<\/b\>} $gmail(text_line) "" gmail(text_line)
> > !                                                                     #adds 
> > the subject of the mail to the balloon text
> > !                                                                     
> > append ::pop3::balloontext_$acntn \ :\  $gmail(text_line)
> > !                                                             }
> > !                                                     }
> > !                                                     incr i
> > !                                             }
> > !                                             set i [llength 
> > $gmail(dataINBOX)]
> > !                                     }
> > !                                     set gmail(text_line) [lindex 
> > $gmail(dataINBOX) $i ]
> >                               }
> >                       }
> > --- 1075,1098 ----
> >               set gmail(text_line) [lindex $gmail(dataINBOX) 0]
> >               #now, parsing !
> > !             for {set i 1} {$i<=[llength $gmail(dataINBOX)]} {incr i} {
> > !             #status_log "$gmail(text_line)" blue
> > !                     if { [string match *<title>Gmail* $gmail(text_line)] 
> > } {
> > !                             set pos1 [expr [string first <title>Gmail 
> > $gmail(text_line)]
> > + 15]
> > !                             set pos2 [expr [string first </title> 
> > $gmail(text_line)] - 1]
> > !                             set gmail(trans_inbox) [string range 
> > $gmail(text_line) $pos1
> > $pos2]
> > !                             #status_log "=$gmail(trans_inbox)=" red
> >                               incr i
> > !                             set gmail(text_line) [lindex 
> > $gmail(dataINBOX) $i ]
> > !                     }
> > !                     #get the number of unread messages
> > !                     if { [string match *${gmail(trans_inbox)}* $gmail
> > (text_line) ] } {
> > !                             #status_log "$gmail(text_line)" red
> > !                             set pos1 [expr [string first 
> > $gmail(trans_inbox) $gmail
> > (text_line)] + [string length $gmail(trans_inbox)]]
> > !                             set pos2 [expr [string first ( 
> > $gmail(text_line) $pos1] + 1 ]
> > !                             set pos3 [expr [string first ) 
> > $gmail(text_line) $pos2] -1 ]
> > !                             set gmail(Unreads) [string range 
> > $gmail(text_line) $pos2 $pos3]
> > !                             #status_log "$gmail(Unreads)" red
> > !                             if {![string is digit -strict 
> > $gmail(Unreads)] || [expr $pos2
> > - $pos1] > 10 } {
> > !                                     set gmail(Unreads) 0
> >                               }
> >                       }
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> > log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD
> > SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > Amsn-commits mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/amsn-commits
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> _______________________________________________
> Amsn-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel
>

Oh ! No !
I've done this commit since the previous code wasn't working for me.
I'll try to make the code more understandable this WE.
If it doesn't work for you, can you send me the log of this line (you
should uncomment it !) : #status_log "$gmail(dataINBOX)" green
It's in the status_log (I know that i should use the plugin_log, but i
do like the status_log with the entry to execute commands and the
coloration, but i only use it for debug !), in green font, it's some
HTML.
Greets
--
Boris FAURE (billiob)
mail, msn : [EMAIL PROTECTED]
No trees were killed in the sending of this message.
However, a large number of electrons were terribly
agitated.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to