@@ -45,41 +45,6 @@ def handle_register(self):
4545 """ The client successfully registered to the server. """
4646 pass
4747
48- def handle_ping (self , server ):
49- """ Received a ping message from the server.
50-
51- Args:
52- server (str): name or ip of the server.
53- """
54- pass
55-
56- def handle_response (self , response , message ):
57- """ A numeric response was received from the server.
58-
59- See the IRC client protocol specification for valid numeric response
60- codes and their meaning. There are extra handler methods for many
61- common responses, but this general handler is always called first.
62-
63- Args:
64- response (int): 3-digit response code (between 0 and 399)
65- message (str): the whole, raw message
66- """
67- pass
68-
69- def handle_error (self , error , ** params ):
70- """ An irc error message was received from the server.
71-
72- The error codes are defined in :py:class:`Err<fredirc.Err>`.
73- The contents of the params dictionary depend on the specific error.
74- See the documentation of :py:class:`Err<fredirc.Err>` for details.
75-
76- Args:
77- error (int): 3-digit error code (between 400 and 599)
78- params (dict): Parameters of the error message, each consisting of \
79- a parameter name and a value.
80- """
81- pass
82-
8348 def handle_channel_message (self , channel , message , sender = None ):
8449 """ Received a message to a channel.
8550
@@ -107,7 +72,7 @@ def handle_private_message(self, message, sender=None):
10772 pass
10873
10974 def handle_join (self , channel , nick ):
110- """ Called when a user joined the channel.
75+ """ Called when another user joined the channel.
11176
11277 To handle joins of the IRCClient itself, use
11378 :py:meth:`.handle_own_join`.
@@ -129,7 +94,7 @@ def handle_own_join(self, channel):
12994 pass
13095
13196 def handle_part (self , channel , nick , message = None ):
132- """ Called when a user left the channel.
97+ """ Called when another user left the channel.
13398
13499 To handle partings of the IRCClient itself, use
135100 :py:meth:`.handle_own_part`.
@@ -152,9 +117,7 @@ def handle_own_part(self, channel):
152117 pass
153118
154119 def handle_kick (self , channel , nick , initiator , reason ):
155- """ A user got kicked from a channel.
156-
157- Might be the IRCClient itself.
120+ """ Another user got kicked from a channel.
158121
159122 Args:
160123 channel (str): the channel
@@ -163,8 +126,17 @@ def handle_kick(self, channel, nick, initiator, reason):
163126 """
164127 pass
165128
129+ def handle_own_kick (self , channel , initiator , reason ):
130+ """ The IRCClient got kicked from a channel.
131+
132+ Args:
133+ channel (str): the channel
134+ reason (str): reason for the kick (might be None)
135+ """
136+ pass
137+
166138 def handle_got_op (self , channel , nick , initiator ):
167- """ A user received operator status.
139+ """ Another user received operator status.
168140
169141 Args:
170142 channel (str): name of the channel
@@ -173,8 +145,17 @@ def handle_got_op(self, channel, nick, initiator):
173145 """
174146 pass
175147
148+ def handle_own_got_op (self , channel , initiator ):
149+ """ The IRCClient received operator status.
150+
151+ Args:
152+ channel (str): name of the channel
153+ initiator (str): the user who granted the operator rights
154+ """
155+ pass
156+
176157 def handle_lost_op (self , channel , nick , initiator ):
177- """ A user lost operator status.
158+ """ Another user lost operator status.
178159
179160 Args:
180161 channel (str): name of the channel
@@ -183,8 +164,17 @@ def handle_lost_op(self, channel, nick, initiator):
183164 """
184165 pass
185166
167+ def handle_own_lost_op (self , channel , initiator ):
168+ """ The IRCClient lost operator status.
169+
170+ Args:
171+ channel (str): name of the channel
172+ initiator (str): the user who initiated the mode change
173+ """
174+ pass
175+
186176 def handle_got_voice (self , channel , nick , initiator ):
187- """ A user received voice rights.
177+ """ Another user received voice rights.
188178
189179 Args:
190180 channel (str): name of the channel
@@ -193,8 +183,17 @@ def handle_got_voice(self, channel, nick, initiator):
193183 """
194184 pass
195185
186+ def handle_own_got_voice (self , channel , initiator ):
187+ """ The IRCClient received voice rights.
188+
189+ Args:
190+ channel (str): name of the channel
191+ initiator (str): the user who granted the voice rights
192+ """
193+ pass
194+
196195 def handle_lost_voice (self , channel , nick , initiator ):
197- """ A user lost voide rights.
196+ """ Another user lost voice rights.
198197
199198 Args:
200199 channel (str): name of the channel
@@ -203,6 +202,74 @@ def handle_lost_voice(self, channel, nick, initiator):
203202 """
204203 pass
205204
205+ def handle_own_lost_voice (self , channel , initiator ):
206+ """ The IRCClient lost voice rights.
207+
208+ Args:
209+ channel (str): name of the channel
210+ initiator (str): the user who initiated the mode change
211+ """
212+ pass
213+
214+ def handle_nick_change (self , old_nick , new_nick ):
215+ """ A user's nick name changed.
216+
217+ To handle nick changes of the IRCClient itself, use
218+ :py:meth:`.handle_own_nick_change`.
219+
220+ Args:
221+ old_nick (str): The nick name of the user until now.
222+ new_nick (str): The new nick name of the user.
223+ """
224+ pass
225+
226+ def handle_own_nick_change (self , old_nick , new_nick ):
227+ """ The IRCCLient's nick name changed.
228+
229+ The :py:attr:`nick<.IRCClient.nick>`-property will already hold
230+ the new nick when this handler is called.
231+
232+ Args:
233+ old_nick (str): The old nick name.
234+ new_nick (str): The new nick name.
235+ """
236+ pass
237+
238+ def handle_response (self , response , message ):
239+ """ A numeric response was received from the server.
240+
241+ See the IRC client protocol specification for valid numeric response
242+ codes and their meaning. There are extra handler methods for many
243+ common responses, but this general handler is always called first.
244+
245+ Args:
246+ response (int): 3-digit response code (between 0 and 399)
247+ message (str): the whole, raw message
248+ """
249+ pass
250+
251+ def handle_error (self , error , ** params ):
252+ """ An irc error message was received from the server.
253+
254+ The error codes are defined in :py:class:`Err<fredirc.Err>`.
255+ The contents of the params dictionary depend on the specific error.
256+ See the documentation of :py:class:`Err<fredirc.Err>` for details.
257+
258+ Args:
259+ error (int): 3-digit error code (between 400 and 599)
260+ params (dict): Parameters of the error message, each consisting of \
261+ a parameter name and a value.
262+ """
263+ pass
264+
265+ def handle_ping (self , server ):
266+ """ Received a ping message from the server.
267+
268+ Args:
269+ server (str): name or ip of the server.
270+ """
271+ pass
272+
206273 def handle_unhandled_message (self , message ):
207274 """ This handler is called whenever a message is not handled by any
208275 other handler.
0 commit comments