Ircp is a IRC minimal parser for ruby.
Add this line to your application's Gemfile:
gem 'ircp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ircp
# 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'
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request