Project

ircp

0.0
No commit activity in last 3 years
No release in over 3 years
IRC minimal parser
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.2
~> 2.10.0

Runtime

>= 1.4.10
 Project Readme

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 ':Angel!wings@irc.org 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        # => ':Angel!wings@irc.org 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