Mon, 04 Dec 2023 02:21:08 -0600
Implement CTCP ACTION and VERSION
Testing Done:
Used irssi to send `CTCP VERSION` to a channel and the pidgin3 user directly and verified the response was sent and that the default message was still displayed.
Bugs closed: PIDGIN-17721
Reviewed at https://reviews.imfreedom.org/r/2863/
|
42505
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation; either version 2 of the License, or |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \ |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | !defined(PURPLE_IRCV3_COMPILATION) |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | # error "only <libpurple/protocols/ircv3.h> may be included directly" |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #endif |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #ifndef PURPLE_IRCV3_FORMATTING_H |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #define PURPLE_IRCV3_FORMATTING_H |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #include <glib.h> |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #include "purpleircv3version.h" |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | G_BEGIN_DECLS |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | /** |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | * purple_ircv3_formatting_strip: |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | * @text: (nullable): The text to strip. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | * Removes all formatting from @text and returns the result. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * Returns: (transfer full) (nullable): The result of stripping @text. |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * Since: 3.0.0 |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | */ |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | char *purple_ircv3_formatting_strip(const char *text); |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | G_END_DECLS |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | |
|
cc095f9ce1f3
IRCv3: strip formatting from incoming messages
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | #endif /* PURPLE_IRCV3_FORMATTING_H */ |