Thanx for the contribution! Committed :)

On Wed, 13 Jun 2007, Siebe Tolsma wrote:

> Nudges are broken, and can only detect (I think) 7.0 and 7.5 clients. Thus,
> nudging to contacts who are on 8.0, 8.1, 8.5, etc. doesn't work. Here is a
> fix for the issue, one that is much more generic than the current code. It
> should be able to detect just any client that is >= 7.0.
> 
> Cheers,
> 
> Siebe Tolsma
> 
> ----
> 
> Index: plugins/Nudge/Nudge.tcl
> ===================================================================
> --- plugins/Nudge/Nudge.tcl     (revision 8848)
> +++ plugins/Nudge/Nudge.tcl     (working copy)
> @@ -565,27 +565,16 @@
>         ############################################
>         proc check_clientid {email} {
>                 ::Nudge::log "Verify if contact is using MSN 7.0 protocol"
> -
> -               set supportedclients [list 1073741824 1342177280]
> -
> +
>                 set clientid [::abook::getContactData $email clientid]
> 
> -               status_log "Clientid is $clientid"
> -
> -               if { $clientid == "" } {
> +               ::Nudge::log "Clientid is $clientid"
> +
> +               if { ($clientid & 0xF0000000) < 0x40000000 } {
>                         return 0
> +               } else {
> +                       return 1
>                 }
> -
> -               foreach bit $supportedclients {
> -                       status_log "Bitmask is $bit"
> -                       if {($clientid & $bit) == $bit} {
> -                               ::Nudge::log "He uses MSN 7.0 or greater
> protocol"
> -                               return 1
> -                       }
> -               }
> -
> -               ::Nudge::log "He doesn't use MSN 7.0 or greater protocol"
> -               return 0
>         }
> 
>         ############################################

-------------------------------------------------------------------------
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

Reply via email to