Sha256: 161ad00a4580222e5e930ff3c99f9ba38344bda66d3867526c7b19bd3e4606cc

Contents?: true

Size: 1.04 KB

Versions: 7

Compression:

Stored size: 1.04 KB

Contents

# Ircp

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

```ruby
# 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 'Wiz', ':Are you receiving this message ?', :command => 'PRIVMSG', :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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ircp-1.1.7 README.md
ircp-1.1.6 README.md
ircp-1.1.5 README.md
ircp-1.1.4 README.md
ircp-1.1.3 README.md
ircp-1.1.2 README.md
ircp-1.1.1 README.md