Net::AnyIM

Jess Robinson castaway at desert-island.demon.co.uk
Tue Jan 17 10:53:55 GMT 2006


I've done something similar, using Net::OSCAR (ICQ+AIM), and Net::MSN, but 
I didn't get around to modularising it, or adding yahoo.. And then I 
abandoned it in favour of irssi/bitlbee (OTOH my chat functionality 
actually works, and mine can talk to non-listed users.. silly bitlbee)

Attached, in case anyone cares ;)

Jess


On Thu, 12 Jan 2006, Simon Wistow wrote:

> It would useful to me to be able to have 1 program that could 
> communicate to people on multiple IM networks with the minimum of fuss 
> to the user.
> 
> At first I wondered if it might be possible using Jabber and its network
> proxies but to be honest I don't know enough about that. 
>                                                                              
> Otherwise there's Net::ICQ, Net::Msmgr, Net::YMSG and, confusingly,          
> Net::YahooMessenger all of which have a similar APIs. It shouldn't be        
> too hard to write a generic Net::AnyIM wrapper that dispatches to the        
> correct plugin based on the recipient.
> 
> 
> I imagine something like this
> 
> 
> 	use Net::AnyIM;
> 
> 	my $im = Net::AnyIM->new();
> 
>  	$im->login("simon", "msn","msnpassword"); 
> 	$im->login("muttley at jabber.org", "jabber", "jabberpassword");
> 	# etc etc
> 
> 
> 	$im->send("myfriend", "msn", "Hello!");
> 	$im->send("myotherfriend at jabber.org", "jabber", "Hello too!");
> 
> 
> 	while (my $reply = $im->receive()) {
> 		print "Reply from ".$reply->sender;
> 		my $message = $reply->message;
> 
> 		$reply->reply(uc($message));
> 
> 		# or equivalently
> 		$im->send($reply->sender, $reply->network, uc($message));
> 	}
> 
> It would be nice to do dispatching to plugin based on the hostname part
> of a username but the problem is that you can run a jabber server on any
> hostname.
> 
> Am I duplicating effort? Might this be useful for anyone else? Would it 
> be better as a POE component?
> 
> Simon
> 
> 
> 
> 
> 


More information about the london.pm mailing list