2 -- These are the callbacks that are available to register.
6 -- This callback is triggered whenever a user performs a CTCP ACTION in a
8 -- @param channel Channel object for where the action was performed
9 -- @param from User who performed the action
10 -- @param message The action which was performed
11 function channel_act(channel, from, message)
15 -- This callback is triggered whenever a user sends a message to a channel.
16 -- @param channel Channel object for where the message was sent
17 -- @param from User who sent the message
18 -- @param message The message which was sent
19 function channel_msg(channel, from, message)
23 -- This callback is triggered whenever a user sends a notice to a channel.
24 -- @param channel Channel object for where the notice was sent
25 -- @param from User who sent the message
26 -- @param message The notice which was sent
27 function channel_notice(channel, from, message)
31 -- This callback is triggered when the connection has completed.
36 -- This callback is triggered when a CTCP command resulted in an error (for
37 -- example, if the remote client doesn't implement that CTCP command).
38 -- @param from User who sent the error response
39 -- @param to Who the response was sent to (either you or a channel you are
41 -- @param message A description of the error
42 function ctcp_error(from, to, message)
46 -- This callback is triggered when a user offers to send you a file using DCC
47 -- SEND. It allows you to determine whether or not you want to accept the file.
48 -- @param from User offering the file
49 -- @param to User who is being offered the file (likely yourself)
50 -- @param filename Name of the file being offered
51 -- @param address IP address of the user offering the file
52 -- @param port Port to connect to at that address
53 -- @param filesize Size of the file being offered
54 -- @return True to accept the file, false to reject it
55 function dcc_send(from, to, filename, address, port, filesize)
59 -- This callback is triggered whenever somebody loses ops.
60 -- @param channel Channel object for where the user lost ops
61 -- @param from User who removed the ops
62 -- @param to User who lost ops
63 function deop(channel, from, to)
67 -- This callback is triggered whenever somebody loses voice.
68 -- @param channel Channel object for where the user lost voice
69 -- @param from User who removed the voice
70 -- @param to User who lost voice
71 function devoice(channel, from, to)
75 -- This callback is triggered whenever an invite to a channel is received.
76 -- @param from User who sent the invite
77 -- @param channel Channel name that the invite was to
78 function invite(from, channel)
82 -- This callback is triggered when a user joins a channel.
83 -- @param channel Channel object for where there was a join
84 -- @param from User who joined
85 function join(channel, from)
89 -- This callback is triggered when a user is kicked from a channel.
90 -- @param channel Channel object for where there was a kick
91 -- @param to User who was kicked
92 -- @param from User who did the kicking
93 function kick(channel, to, from)
97 -- This callback is triggered after a join() command completes.
98 -- @param channel Channel object for the joined channel
99 function me_join(channel)
103 -- This callback is triggered when a user changes their nick.
104 -- @param from User who changed their nick
105 -- @param old_nick The previous nick of that user
106 function nick_change(from, old_nick)
110 -- This callback is triggered when a user is opped.
111 -- @param channel Channel object for where the user was opped
112 -- @param from User who gave the ops
113 -- @param to User who was opped
114 function op(channel, from, to)
118 -- This callback is triggered when a user leaves a channel.
119 -- @param channel Channel object for where the part occurred
120 -- @param from User who left
121 -- @param message Part message from the user
122 function part(channel, from, message)
126 -- This callback is triggered when a user sends a CTCP ACTION in a private
128 -- @param from User who sent the action
129 -- @param message The action that was sent
130 function private_act(from, message)
134 -- This callback is triggered when a user sends a private message.
135 -- @param from User who sent the message
136 -- @param message The message that was sent
137 function private_msg(from, message)
141 -- This callback is triggered when a user sends a private notice.
142 -- @param from User who sent the notice
143 -- @param message The notice that was sent
144 function private_notice(from, message)
148 -- This callback is triggered when a user quits.
149 -- @param from User who quit
150 -- @param message The user's quit message
151 function quit(from, message)
155 -- This callback is triggered when a user changes the topic in a channel. The
156 -- contents of the topic can be seen in the <i>topic</i> field of the channel
158 -- @param channel Channel object for where the topic was changed.
159 function topic_change(channel)
163 -- This callback is triggered when a user is voiced.
164 -- @param channel Channel object for where the user was voiced
165 -- @param from User who gave the voice
166 -- @param to User who was voiced
167 function voice(channel, from, to)