Skip to content

mashiro/ircp-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ircp Build Status Dependency Status

Ircp is a IRC minimal parser for ruby.

Installation

Add this line to your application's Gemfile:

gem 'ircp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ircp

Usage

# Parse
require 'ircp'
msg = Ircp.parse ':[email protected] PRIVMSG Wiz :Are you receiving this message ?'
p msg.prefix.nick # => 'Angel'
p msg.prefix.user # => 'wings'
p msg.prefix.host # => 'irc.org'
p msg.command     # => 'PRIVMSG'
p msg.params[0]   # => 'Wiz'
p msg.params[1]   # => 'Are you receiving this message ?'

# Dump
msg = Ircp::Message.new 'PRIVMSG', 'Wiz', ':Are you receiving this message ?', prefix: {nick: 'Angel', user: 'wings', host: 'irc.org'}
p msg.to_s        # => ':[email protected] PRIVMSG Wiz :Are you receiving this message ?\r\n'

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

IRC minimal parser for ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages