Fri, 07 Jun 2024 17:45:00 -0500
IRCv3: Implement join and part message handlers
This only handle the RFC versions, we'll do extended-join later.
The TODO's are not meant to be done in this RR because they require additional code in IRCv3Connection, and once that's done we'll grab these then.
Testing Done:
Connected to my local ergo and had another client join and part a few times while I verified that the member list was updated correctly.
Reviewed at https://reviews.imfreedom.org/r/3235/
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
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:
42229
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:
42229
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:
42229
diff
changeset
|
7 | * source distribution. |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
8 | * |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify |
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
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:
42229
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, |
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
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:
42229
diff
changeset
|
20 | * along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
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:
42229
diff
changeset
|
22 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
41954
diff
changeset
|
23 | #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \ |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
41954
diff
changeset
|
24 | !defined(PURPLE_IRCV3_COMPILATION) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
41954
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:
41954
diff
changeset
|
26 | #endif |
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #ifndef PURPLE_IRCV3_CORE_H |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #define PURPLE_IRCV3_CORE_H |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib.h> |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41774
diff
changeset
|
33 | #define PURPLE_IRCV3_DEFAULT_SERVER "irc.libera.chat" |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41774
diff
changeset
|
34 | #define PURPLE_IRCV3_DEFAULT_PLAIN_PORT 6667 |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41774
diff
changeset
|
35 | #define PURPLE_IRCV3_DEFAULT_TLS_PORT 6697 |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41774
diff
changeset
|
36 | |
|
41774
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | #define PURPLE_IRCV3_DOMAIN (g_quark_from_static_string("ircv3-plugin")) |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | |
|
170078e728c0
Implement a parser for ircv3 and add unit tests to it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | #endif /* PURPLE_IRCV3_CORE_H */ |