In Files

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.