Module: IRC::Client::ConnectionListener
- Included in:
- ConnectionState, IRC::Commands::Command
- Defined in:
- lib/irc/client/connection_listener.rb
Instance Method Summary collapse
-
#on_connect(connection, server) ⇒ Object
This method gets called when successfully connected to an IRC server.
-
#on_disconnect(connection, server, reason = nil) ⇒ Object
This method gets called when disconnected from a server.
-
#on_error(connection, reason) ⇒ Object
This method gets called an error message was received from the IRC server.
-
#on_join(connection, channel, user) ⇒ Object
This method gets called when a user (possibly us) joins a channel.
-
#on_join_failure(connection, channel, code, reason) ⇒ Object
This message gets called when a channel join attempt failed.
-
#on_kick(connection, channel, kicker_user, kicked_user, reason) ⇒ Object
This method gets called when a user gets kicked from a channel.
-
#on_nick(connection, before, after) ⇒ Object
This method gets called when a user changes it’s nick name.
-
#on_nick_already_in_use(connection, nick_name) ⇒ Object
This method gets called when the chosen nick name is already in use.
-
#on_notice(connection, user, message) ⇒ Object
This method gets called when a notice message was received.
-
#on_part(connection, channel, user) ⇒ Object
This method gets called when a user (possibly us) leaves a channel.
-
#on_part_failure(connection, channel) ⇒ Object
This method gets called when a channel part attempt failed.
-
#on_ping(connection, servers) ⇒ Object
This method gets called when a ping message was received from the server.
-
#on_pong(connection, daemons) ⇒ Object
This method gets called when a pong message was received from the server.
-
#on_private_message(connection, target, message) ⇒ Object
This method gets called when a private message was received from a channel or an user.
-
#on_registration(connection) ⇒ Object
This method gets called when the connection was successfully registered.
-
#on_registration_failure(connection, message) ⇒ Object
This method gets called when an error happend during the connection registration.
-
#on_server_response(connection, message) ⇒ Object
This method gets called when a message from the server was received.
-
#on_welcome(connection, user, text) ⇒ Object
This method gets called when a welcome message was received.
Instance Method Details
#on_connect(connection, server) ⇒ Object
This method gets called when successfully connected to an IRC server.
35 36 |
# File 'lib/irc/client/connection_listener.rb', line 35 def on_connect(connection, server) end |
#on_disconnect(connection, server, reason = nil) ⇒ Object
This method gets called when disconnected from a server.
43 44 |
# File 'lib/irc/client/connection_listener.rb', line 43 def on_disconnect(connection, server, reason = nil) end |
#on_error(connection, reason) ⇒ Object
This method gets called an error message was received from the IRC server.
39 40 |
# File 'lib/irc/client/connection_listener.rb', line 39 def on_error(connection, reason) end |
#on_join(connection, channel, user) ⇒ Object
This method gets called when a user (possibly us) joins a channel.
51 52 |
# File 'lib/irc/client/connection_listener.rb', line 51 def on_join(connection, channel, user) end |
#on_join_failure(connection, channel, code, reason) ⇒ Object
This message gets called when a channel join attempt failed.
55 56 |
# File 'lib/irc/client/connection_listener.rb', line 55 def on_join_failure(connection, channel, code, reason) end |
#on_kick(connection, channel, kicker_user, kicked_user, reason) ⇒ Object
This method gets called when a user gets kicked from a channel.
59 60 |
# File 'lib/irc/client/connection_listener.rb', line 59 def on_kick(connection, channel, kicker_user, kicked_user, reason) end |
#on_nick(connection, before, after) ⇒ Object
This method gets called when a user changes it’s nick name.
63 64 |
# File 'lib/irc/client/connection_listener.rb', line 63 def on_nick(connection, before, after) end |
#on_nick_already_in_use(connection, nick_name) ⇒ Object
This method gets called when the chosen nick name is already in use.
67 68 |
# File 'lib/irc/client/connection_listener.rb', line 67 def on_nick_already_in_use(connection, nick_name) end |
#on_notice(connection, user, message) ⇒ Object
This method gets called when a notice message was received.
47 48 |
# File 'lib/irc/client/connection_listener.rb', line 47 def on_notice(connection, user, ) end |
#on_part(connection, channel, user) ⇒ Object
This method gets called when a user (possibly us) leaves a channel.
71 72 |
# File 'lib/irc/client/connection_listener.rb', line 71 def on_part(connection, channel, user) end |
#on_part_failure(connection, channel) ⇒ Object
This method gets called when a channel part attempt failed.
75 76 |
# File 'lib/irc/client/connection_listener.rb', line 75 def on_part_failure(connection, channel) end |
#on_ping(connection, servers) ⇒ Object
This method gets called when a ping message was received from the server.
79 80 |
# File 'lib/irc/client/connection_listener.rb', line 79 def on_ping(connection, servers) end |
#on_pong(connection, daemons) ⇒ Object
This method gets called when a pong message was received from the server.
83 84 |
# File 'lib/irc/client/connection_listener.rb', line 83 def on_pong(connection, daemons) end |
#on_private_message(connection, target, message) ⇒ Object
This method gets called when a private message was received from a channel or an user.
87 88 |
# File 'lib/irc/client/connection_listener.rb', line 87 def (connection, target, ) end |
#on_registration(connection) ⇒ Object
This method gets called when the connection was successfully registered.
91 92 |
# File 'lib/irc/client/connection_listener.rb', line 91 def on_registration(connection) end |
#on_registration_failure(connection, message) ⇒ Object
This method gets called when an error happend during the connection registration.
95 96 |
# File 'lib/irc/client/connection_listener.rb', line 95 def on_registration_failure(connection, ) end |
#on_server_response(connection, message) ⇒ Object
This method gets called when a message from the server was received.
99 100 |
# File 'lib/irc/client/connection_listener.rb', line 99 def on_server_response(connection, ) end |
#on_welcome(connection, user, text) ⇒ Object
This method gets called when a welcome message was received.
103 104 |
# File 'lib/irc/client/connection_listener.rb', line 103 def on_welcome(connection, user, text) end |