memo.xight.org

/ / memo.xight.org

2004-09-27

Perl で MSN Messenger

- MSN.pm
  MSN MessengerをPerlから操作するためのモジュール
  Bot-Depot - MSN Protocol modules - MSN.pm
  http://www.bot-depot.com/forums/?showforum=12
#!/usr/bin/perl
 
use MSN;
use Jcode;
 
my $msn = MSN->new(Handle => 'hoge@hotmail.com', Password => 'hogepass');
$msn->set_handler(Message   => \&on_message);
$msn->connect();
 
while(1) {
	$msn->do_one_loop();
}
 
sub on_message {
	my ($self, $email, $name, $msg) = @_;
	my $utf8_name = Jcode->new($name, 'utf8')->euc;
	my $str = Jcode->new($msg, 'utf8')->euc;
 
	# $str を処理...
 
	my $utf8_str = Jcode->new($str, 'euc')->utf8;
	$self->sendmsg($utf8_str);
}


- Net::Msmgr
Net-Msmgr
  http://search.cpan.org/~slstat/Net-Msmgr/
  - Install

# perl -MCPAN -e 'install Net::Msmgr'


- Net::MSN
Net-MSN
  http://search.cpan.org/~djr/Net-MSN/
  - Install

# perl -MCPAN -e 'install Hash::Merge'
# perl -MCPAN -e 'install Net::MSN'


- Reference
  Bot-Depot
  http://www.bot-depot.com/
  cubic9.com - Linux/Perl/MSN.pm
  http://cubic9.com/Devel/Perl/MSN.pm%20%28Bot-Depot%20realesed%29/

カテゴリ: [Perl]
2004-09 /

Color Reference

ChangeLogを検索
携帯電話からアクセス!

カテゴリ

最近の話題

リンク

過去ログ

Google

QR Code

Since
2002-11-28
Update
2008-12-02 10:52
Copyright © 2005 xight.org All Rights Reserved.