Class: Irc::Channel

Class | Irc::Channel
In: | lib/rbot/irc.rb
Parent: | Object

Here we start with the actual Channel class

### Methods

add_user create_mode delete_user get_user has_op? has_user? has_voice? inspect local? modeless? modes_of new normal? prefix safe? to_irc_channel user_nicks

### Included Modules

ServerOrCasemap

### Classes and Modules

Class Irc::Channel::Mode
Class Irc::Channel::ModeHash
Class Irc::Channel::ModeTypeA
Class Irc::Channel::ModeTypeB
Class Irc::Channel::ModeTypeC
Class Irc::Channel::ModeTypeD
Class Irc::Channel::Topic
Class Irc::Channel::UserMode

### External Aliases

name | -> | to_s

### Attributes

creation_time | [RW] |
mode | [R] |
name | [R] |
topic | [R] |
url | [RW] |
users | [R] |

### Public Class methods

new(name, topic=nil, users=[], opts={})

Creates a new channel with the given name, optionally setting the topic and an initial users list.

No additional info is created here, because the channel flags and userlists allowed depend on the server.

### Public Instance methods

add_user(user, opts={})

Adds a user to the channel

create_mode(sym, kl)

Create a new mode

delete_user(user)

Removes a user from the channel

get_user(nick)

Returns the user with nick nick, if available

has_op?(user)
has_user?(nick)

Checks if the receiver already has a user with the given nick

has_voice?(user)
inspect()
local?()

A channel is local to a server if it has the ’&’ prefix

modeless?()

A channel is modeless if it has the ’+’ prefix

modes_of(user)
normal?()

A channel is normal if it has the ’#’ prefix

prefix()

The channel prefix

safe?()

A channel is safe if it has the ’!’ prefix

to_irc_channel()

Returns self

user_nicks()

TODO Ho

[Validate]