protocols/ircv3/purpleircv3messagehandlers.h

Tue, 22 Apr 2025 00:22:44 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 22 Apr 2025 00:22:44 -0500
changeset 43238
58bca4467196
parent 43236
ce4987105a4e
child 43254
27610c58b03b
permissions
-rw-r--r--

IRCv3: Handle the WHOTOPIC and CHANNEL_URL messages

Testing Done:
Joined `#pidgin` on libera and verified that the messages were handled.

Reviewed at https://reviews.imfreedom.org/r/3983/

41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
7 * source distribution.
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
8 *
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
9 * This library is free software; you can redistribute it and/or modify
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
14 * This library is distributed in the hope that it will be useful,
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
20 * along with this library; if not, see <https://www.gnu.org/licenses/>.
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42503
diff changeset
22
42229
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
23 #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
24 !defined(PURPLE_IRCV3_COMPILATION)
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
25 # error "only <libpurple/protocols/ircv3.h> may be included directly"
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
26 #endif
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #ifndef PURPLE_IRCV3_MESSAGE_HANDLERS_H
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #define PURPLE_IRCV3_MESSAGE_HANDLERS_H
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib.h>
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42769
c488d7af2923 Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents: 42652
diff changeset
33 #include <ibis.h>
c488d7af2923 Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents: 42652
diff changeset
34
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 #include <purple.h>
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
42472
409148c5c5b7 Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42333
diff changeset
37 #include "purpleircv3version.h"
42333
a34601ac633c Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents: 42275
diff changeset
38
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 G_BEGIN_DECLS
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
43228
6f895d255386 IRCv3: add support for away-notify
Gary Kramlich <grim@reaperworld.com>
parents: 43199
diff changeset
41 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_away(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
42780
c1af98cbd43a IRCv3: Implement join and part message handlers
Gary Kramlich <grim@reaperworld.com>
parents: 42769
diff changeset
42 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_join(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
c1af98cbd43a IRCv3: Implement join and part message handlers
Gary Kramlich <grim@reaperworld.com>
parents: 42769
diff changeset
43 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_part(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
42925
3c9b77d62b0d IRCv3: Handle RPL_NAMREPLY
Gary Kramlich <grim@reaperworld.com>
parents: 42883
diff changeset
44 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_namreply(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
42883
51a0fe1e2500 IRCv3: Handle incoming typing notifications
Gary Kramlich <grim@reaperworld.com>
parents: 42780
diff changeset
45 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_tagmsg(IbisClient *client, const char *command, IbisMessage *ibis_message, gpointer data);
42769
c488d7af2923 Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents: 42652
diff changeset
46 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_privmsg(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
c488d7af2923 Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents: 42652
diff changeset
47 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_topic(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43238
58bca4467196 IRCv3: Handle the WHOTOPIC and CHANNEL_URL messages
Gary Kramlich <grim@reaperworld.com>
parents: 43236
diff changeset
48 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_whotopic(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
58bca4467196 IRCv3: Handle the WHOTOPIC and CHANNEL_URL messages
Gary Kramlich <grim@reaperworld.com>
parents: 43236
diff changeset
49 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_channel_url(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43007
e61836350fce IRCv3: handle the QUIT message
Gary Kramlich <grim@reaperworld.com>
parents: 42925
diff changeset
50 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_quit(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43015
a743311c9c2c IRCv3: Finally handle NICK messages
Gary Kramlich <grim@reaperworld.com>
parents: 43007
diff changeset
51 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_nick(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43024
8a7be63f83e4 IRCv3: Handle ERROR messages
Gary Kramlich <grim@reaperworld.com>
parents: 43015
diff changeset
52 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_error(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43028
dda093fe275e IRCv3: Create notifications for incoming WALLOPS messages
Gary Kramlich <grim@reaperworld.com>
parents: 43024
diff changeset
53 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_wallops(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43067
7e8b86e7dc43 IRCv3: Implement the KICK command
Gary Kramlich <grim@reaperworld.com>
parents: 43028
diff changeset
54 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_kick(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43199
99b283ab8116 IRCv3: handle mode messages for channel modes
Gary Kramlich <grim@reaperworld.com>
parents: 43067
diff changeset
55 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_mode(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
43236
ce4987105a4e IRCv3: Do a who after joining a channel
Gary Kramlich <grim@reaperworld.com>
parents: 43228
diff changeset
56 G_GNUC_INTERNAL gboolean purple_ircv3_message_handler_whoreply(IbisClient *client, const char *command, IbisMessage *message, gpointer data);
41813
86302ce7e3c1 Add support for handling PRIVMSG and NOTICE messages from the server
Gary Kramlich <grim@reaperworld.com>
parents: 41807
diff changeset
57
41796
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 G_END_DECLS
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
ebe4ff278b02 Use the parser on ircv3 messages and handle pings
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 #endif /* PURPLE_IRCV3_MESSAGE_HANDLERS_H */

mercurial