Project

em-msn

0.0
No commit activity in last 3 years
No release in over 3 years
An MSN client for Ruby written on top of EventMachine
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.7

Runtime

 Project Readme

em-msn

MSN client (EventMachine + Ruby)

Project Pages

Usage

Installation

gem install em-msn

Gemfile

gem 'em-msn'

Example

require 'rubygems'
require 'em-msn'

EM.run do
  EM.schedule do
    msn = Msn::Messenger.new 'johndoe@hotmail.com', 'password'

    msn.on_login_failed do |reason|
      puts "Oops... #{reason}"
    end

    msn.on_ready do
      msn.set_online_status :online
    end

    msn.on_message do |message|
      puts "Got message from #{message.email}: #{message.text}"

      msn.send_message message.email, "Hi #{message.display_name}!"
    end

    msn.on_contact_request do |email, display_name|
      puts "Contact request from #{display_name} <#{email}>"

      msn.add_to_friends_list email
      msn.add_to_allowed_list email
    end

    msn.connect
  end
end

Contributions

All contributions are welcome. The gem doesn't have many tests and a lot of things can be improved, as some parts of the protocol are not yet implemented.

Author

Ary Borenszweig