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

An IRC Server represents the Server the client is connected to.

Methods

External Aliases

hostname -> to_s

Attributes

capabilities  [R] 
chanmodes  [R] 
channels  [R] 
hostname  [R] 
supports  [R] 
usermodes  [R] 
users  [R] 
version  [R] 

Public Class methods

Create a new Server, with all instance variables reset to nil (for scalar variables), empty channel and user lists and @supports initialized to the default values for all known supported features.

Public Instance methods

Returns the casemap of the server.

Returns the Channel with the given name on the server, creating it if necessary. This is a short form for new_channel(str, nil, [], false)

Clears the server

Remove Channel name from the list of Channels

Remove User someuser from the list of Users. someuser must be specified with the full Netmask.

Finds all Users on server whose Netmask matches mask

get_chan(name)

Alias for get_channel

Returns the channel with name name, if available

Returns the user with nick nick, if available

has_chan?(name)

Alias for has_channel?

Checks if the receiver already has a channel with the given name

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

Convert a prefix (@, +, %, …) to the corresponding mode (o, v, h, …). See also prefix_for_mode

Create a new Channel object bound to the receiver and add it to the list of Channels on the receiver, unless the channel was present already. In this case, the default action is to raise an exception, unless fails is set to false. An exception can also be raised if str is nil or empty, again only if fails is set to true; otherwise, the method just returns nil

Create a new Netmask object with the appropriate casemap

Create a new User object bound to the receiver and add it to the list of Users on the receiver, unless the User was present already. In this case, the default action is to raise an exception, unless fails is set to false. An exception can also be raised if str is nil or empty, again only if fails is set to true; otherwise, the method just returns nil

This method is used to parse a 005 RPL_ISUPPORT line

See the RPL_ISUPPORT draft

This method is used to parse a 004 RPL_MY_INFO line

Convert a mode (o, v, h, …) to the corresponding prefix (@, +, %, …). See also mode_for_prefix

Resets the server capabilities

Resets the Channel and User list

Returns the User with the given Netmask on the server, creating it if necessary. This is a short form for new_user(str, false)

Returns the actual User or Channel object matching name

Returns User or Channel depending on what name can be a name of

[Validate]