Maybe something like this could slow down aMSN way too much and should be
done inside a plugin or something though ?


2007/4/30, Karel Demeyer <[EMAIL PROTECTED]>:

Can't we add the feature to break those censored words so the message can
be human-readable but warn the user we changed something ? like:

Y says: I heard MSN censors some words
X says: Yeah, like teh spanish word t.ufoto, though I don't know what that
means
(!) aMSN added a dot in the word "tufoto" as this word is censored by
Windows Live Messenger.  To know more about this, _click here_


Where the link is a page on our FAQ or something ?

What do you think about this ?

Karel.



2007/4/30, [EMAIL PROTECTED] < [EMAIL PROTECTED]
>:
>
> Revision: 8527
>            http://svn.sourceforge.net/amsn/?rev=8527&view=rev
> Author:   kakaroto
> Date:     2007-04-30 07:43:33 -0700 (Mon, 30 Apr 2007)
>
> Log Message:
> -----------
> Wrote a little something to find all the censored words from M$..
> there's a huge list, even simple stuff like "tufoto" so spanish people..
> watch it, no typos when you say "tufoto" or else the SB gets closed on you!
> to try it, open the console and type getCensoredWords then look at the
> results in the status window...
> I also fixed a little bug with the Message snit object, the
> createFromPayload was splitting the payload into headers and body, but if
> there is no headers (no \r\n) it still took the body as $idx+4, so for
> messages without headers (like this censored thing payload) we would miss
> the first 3 chars ($idx == -1, so $idx+4 is a 3 to end string range).
>
> Modified Paths:
> --------------
>     trunk/amsn/protocol.tcl
>
> Modified: trunk/amsn/protocol.tcl
> ===================================================================
> --- trunk/amsn/protocol.tcl     2007-04-30 06:59:17 UTC (rev 8526)
> +++ trunk/amsn/protocol.tcl     2007-04-30 14:43:33 UTC (rev 8527)
> @@ -3310,22 +3310,26 @@
>         #creates a message object from a received payload
>         method createFromPayload { payload } {
>                 set idx [string first "\r\n\r\n" $payload]
> -               set head [string range $payload 0 [expr {$idx -1}]]
> -               set body [string range $payload [expr {$idx +4}] end]
> -               set head [string map {"\r\n" "\n"} $head]
> -               set heads [split $head "\n"]
> -               foreach header $heads {
> -                       set idx [string first ": " $header]
> -                       array set headers [list [string range $header 0
> [expr {$idx -1}]] \
> -                                         [string range $header [expr
> {$idx +2}] end]]
> +               if {$idx == -1 } {
> +                       $self setRaw $payload
> +               } else {
> +                       set head [string range $payload 0 [expr {$idx
> -1}]]
> +                       set body [string range $payload [expr {$idx +4}]
> end]
> +                       set head [string map {"\r\n" "\n"} $head]
> +                       set heads [split $head "\n"]
> +                       foreach header $heads {
> +                               set idx [string first ": " $header]
> +                               array set headers [list [string range
> $header 0 [expr {$idx -1}]] \
> +                                                      [string range
> $header [expr {$idx +2}] end]]
> +                       }
> +
> +                       set bsplit [split [string map {"\r\n" "\n"}
> $body] "\n"]
> +                       foreach field $bsplit {
> +                               set idx [string first ": " $field]
> +                               array set fields [list [string range
> $field  0  [expr {$idx -1}]] \
> +                                                     [string range
> $field [expr {$idx +2}] end]]
> +                       }
>                 }
> -
> -               set bsplit [split [string map {"\r\n" "\n"} $body] "\n"]
>
> -               foreach field $bsplit {
> -                       set idx [string first ": " $field]
> -                       array set fields [list [string range
> $field  0  [expr {$idx -1}]] \
> -                                              [string range $field
> [expr {$idx +2}] end]]
> -               }
>         }
>
>         method getBody { } {
> @@ -5300,6 +5304,21 @@
>                                 variable ::MSN::pollstatus 0
>                                 return 0
>                         }
> +                       GCF {
> +                               catch {
> +                                       set xml [xml2list [$message
> getBody]]
> +                                       set i 0
> +                                       while {1} {
> +                                               set subxml [GetXmlNode
> $xml "config:block:regexp:imtext" $i]
> +                                               incr i
> +                                               if {$subxml == "" } {
> +                                                       break
> +                                               }
> +                                               status_log "Found new
> censored regexp : [base64::decode [GetXmlAttribute $subxml imtext value]]"
> +                                       }
> +                               }
> +                               return 0
> +                       }
>                         200 {
>                                 status_log "Error: Syntax error\n" red
>                                 msg_box "[trans syntaxerror]"
> @@ -6303,8 +6322,12 @@
>
> }
>
> +proc getCensoredWords { } {
> +       catch {::MSN::WriteSB ns GCF Shields.xml}
> +}
>
>
> +
> proc checking_package_tls { }  {
>         global tlsinstalled
>
>
>
> This was sent by the SourceForge.net collaborative development platform,
> the world's largest Open Source development site.
>
> -------------------------------------------------------------------------
>
> 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-commits mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/amsn-commits
>


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