class Crirc::Controller::Client
- Crirc::Controller::Client
- Reference
- Object
Included Modules
- Crirc::Binding::Handler
- Crirc::Controller::Command::Chan
- Crirc::Controller::Command::Ping
- Crirc::Controller::Command::Talk
- Crirc::Controller::Command::User
- Crirc::Controller::Controller
Defined in:
crirc/controller/client.crConstructors
Instance Method Summary
-
#chanlist : ChanList
TODO Not used yet
-
#gets(*args, **options)
delegated to the
Network
-
#gets(*args, **options, &)
delegated to the
Network
-
#init
Initialize the connection with the IRC server (send pass, nick and user).
- #network : Network::Client
-
#nick(*args, **options)
delegated to the
Network
-
#nick(*args, **options, &)
delegated to the
Network
-
#on_ready(&b) : Client
Start the callback when the server is ready to receive messages.
-
#puts(*args, **options)
delegated to the
Network
-
#puts(*args, **options, &)
delegated to the
Network
-
#reply(msg, data)
Reply to a given message with a privmsg.
Instance methods inherited from module Crirc::Binding::Handler
docs : Hash(String, String)
docs,
handle(msg : String)handle(msg : Crirc::Protocol::Message) handle, hooks : Hash(Trigger, Array(Hook)) hooks, on(command : String = "PRIVMSG", source : HookRule = nil, arguments : HookRule = nil, message : HookRule = nil, doc : Tuple(String, String)? = nil, &hook : Hook) on
Constructor methods inherited from module Crirc::Binding::Handler
new(**opts)
new
Instance methods inherited from module Crirc::Controller::Controller
gets
gets,
puts(data)
puts
Instance methods inherited from module Crirc::Controller::Command::Chan
invite(chan : Crirc::Protocol::Chan, user : Crirc::Protocol::User)
invite,
join(chans : Enumerable(Crirc::Protocol::Chan), passwords : Enumerable(String) = [""])join(chan : Crirc::Protocol::Chan, password : String = "") join, kick(chans : Enumerable(Crirc::Protocol::Chan), users : Enumerable(Crirc::Protocol::User), msg : String? = nil)
kick(chans : Enumerable(Crirc::Protocol::Chan), user : Crirc::Protocol::User, msg : String? = nil)
kick(chan : Crirc::Protocol::Chan, users : Enumerable(Crirc::Protocol::User), msg : String? = nil)
kick(chan : Crirc::Protocol::Chan, user : Crirc::Protocol::User, msg : String? = nil) kick, list(chans : Enumerable(Crirc::Protocol::Chan?)?)
list(chan : Crirc::Protocol::Chan) list, mode(chan : Crirc::Protocol::Chan, flags : String, user : Crirc::Protocol::User? = nil) mode, names(chans : Enumerable(Crirc::Protocol::Chan)?)
names(chan : Crirc::Protocol::Chan) names, part(chans : Enumerable(Crirc::Protocol::Chan), msg : String? = nil)
part(chan : Crirc::Protocol::Chan, msg : String? = nil) part, topic(chan : Crirc::Protocol::Chan, msg : String? = nil) topic
Instance methods inherited from module Crirc::Controller::Command
puts(data)
puts
Instance methods inherited from module Crirc::Controller::Command::Talk
notice(target : Crirc::Protocol::Target, msg : String)
notice,
privmsg(target : Crirc::Protocol::Target, msg : String)
privmsg
Instance methods inherited from module Crirc::Controller::Command
puts(data)
puts
Instance methods inherited from module Crirc::Controller::Command::User
mode(target : Crirc::Protocol::Target, flags : String)
mode,
whois(target : Crirc::Protocol::Target)
whois,
whowas(target : Crirc::Protocol::Target)
whowas
Instance methods inherited from module Crirc::Controller::Command
puts(data)
puts
Instance methods inherited from module Crirc::Controller::Command::Ping
ping(msg : String? = "0")
ping,
pong(msg : String? = "0")
pong
Instance methods inherited from module Crirc::Controller::Command
puts(data)
puts
Constructor Detail
Instance Method Detail
Start the callback when the server is ready to receive messages.
bot.on_ready do
amazing_stuff(bot)
end
def reply(msg, data)
#
Reply to a given message with a privmsg.
bot.on("JOIN") do |msg, UNDERSCORE|
nick = msg.source.source_nick
context.reply(msg, "Welcome to #{nick}")
end