ICQ process_message must also call escapeHTML.
[thrasher.git] / perl / lib / Thrasher / Protocol / Purple / MSN.pm
blob34f9a7d59dd4ea466ffa89234ce79cfa098ba3d9
1 package Thrasher::Protocol::Purple::MSN;
2 use strict;
3 use warnings;
5 =head1 NAME
7 Thrasher::Protocol::Purple::MSN - protocol for connection to Windows
8 Live Messenger, or whatever they're calling it this week.
10 =cut
12 use base "Thrasher::Protocol::Purple";
14 use Thrasher::Log qw(log debug);
15 #use CGI qw(escapeHTML);
17 sub prpl {
18 return "prpl-msn";
21 # This receives the message we're about to send out, and adds any
22 # further processing that may be necessary.
23 sub process_message {
24 my $self = shift;
25 my $message = shift;
27 return $message;
28 # return escapeHTML($message);
31 #sub process_remote_username {
32 # my $self = shift;
33 # my $s = shift;
34 # $s =~ tr/[A-Z]/[a-z]/;
35 # $s =~ s/ //g;
36 # return $s;
39 sub fake_up_a_legacy_name {
40 my ($self, $user_jid, $jid, $legacy_guess) = @_;
42 if ($legacy_guess !~ /@/) {
43 # Avoid discombobulation: msn_normalize adds @hotmail.com, but
44 # only after some things are set up w/o it (e.g. name_maps).
45 $legacy_guess .= '@hotmail.com';
48 return $legacy_guess;
51 sub name { "MSN" }
52 sub identifier { "msn" }
53 sub gateway_prompt { "Enter MSN Username:" }
54 sub gateway_desc { "Enter MSN Username:" }
56 sub ft_local_ready {
57 my ($self, $id) = @_;
58 # no op--MSN prpl uses its own loop which ft.c do_transfer interferes with.
59 return 0; # don't repeat this notification.