Module: Net::IRC

### Home Classes Methods

### In Files

- lib/net/irc.rb

### Namespace

- CLASS Net::IRC::Client
- CLASS Net::IRC::IRCException
- CLASS Net::IRC::Message
- CLASS Net::IRC::Prefix
- CLASS Net::IRC::Server

### Methods

- ::ctcp_decode
- ::ctcp_dequote
- ::ctcp_encode
- ::ctcp_quote

### Files

- README

### Class/Module Index

Quicksearch

- Net
- Net::IRC
- Net::IRC::Client
- Net::IRC::Client::ChannelManager
- Net::IRC::IRCException
- Net::IRC::Message
- Net::IRC::Message::InvalidMessage
- Net::IRC::Message::ModeParser
- Net::IRC::Message::ServerConfig
- Net::IRC::Prefix
- Net::IRC::Server
- Net::IRC::Server::Session
- Object

No matching classes.

# Net::IRC

### Constants

VERSION

### Public Class Methods

ctcp_decode(str) click to toggle source

Decode from CTCP message delimited with x01.

    # File lib/net/irc.rb, line 49
    def ctcp_decode(str)
            ctcp_dequote(str.delete("\x01"))
    end

ctcp_dequote(str) click to toggle source

    # File lib/net/irc.rb, line 60
    def ctcp_dequote(str)
            low_dequote(str).gsub("\\a", "\x01").gsub(/\\(.|\z)/, "\\1")
    end

ctcp_encode(str) click to toggle source

Encode to CTCP message. Prefix and postfix x01.

    # File lib/net/irc.rb, line 42
    def ctcp_encode(str)
            "\x01#{ctcp_quote(str)}\x01"
    end

ctcp_quote(str) click to toggle source

    # File lib/net/irc.rb, line 55
    def ctcp_quote(str)
            low_quote(str.gsub("\\", "\\\\\\\\").gsub("\x01", "\\a"))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.