Bot::Cobalt::IRC::Server - An IRC server context
## Get a Bot::Cobalt::IRC::Server object from Bot::Cobalt::Core my $server = $core->get_irc_context( $context ); if ( $server->connected ) { my $casemap = $server->casemap; . . . }
Represents an IRC server context.
Bot::Cobalt::Core stores a server context object for every configured context; it can be retrieved using get_irc_context.
The following attributes are available:
The server name.
Note that this is the server we connected to or intend to connect to; not necessarily the announced name of a connected server.
A boolean value indicating whether or not this context is marked as connected.
In the case of core-managed contexts, this is set by Bot::Cobalt::IRC.
The time (epoch seconds) that the server context was marked as connected.
The preferred/configured nickname for this context.
The actual IRC object for this configured context; this will typically be a POE::Component::IRC subclass.
The available CASEMAPPING value for this server.
See "get_irc_casemap" in Bot::Cobalt::Manual::Plugins
The maximum number of modes allowed in a single mode change command.
If the server does not announce MAXMODES, the default is 3.
The maximum number of targets allowed for a single message as specified by MAXTARGETS.
Useful for combining message sends to multiple channels, for example.
my $lower = $server->lowercase($string);
Lowercase a string via "lc_irc" in IRC::Utils using the currently-configured "casemap".
The opposite of "lowercase".
Jon Portnoy <avenj@cobaltirc.org>
http://www.cobaltirc.org
To install Bot::Cobalt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bot::Cobalt
CPAN shell
perl -MCPAN -e shell install Bot::Cobalt
For more information on module installation, please visit the detailed CPAN module installation guide.