Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
| 12055 | 1 | /* |
| 15884 | 2 | * purple |
| 12055 | 3 | * |
| 15884 | 4 | * Purple is the legal property of its developers, whose names are too numerous |
| 12055 | 5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 6 | * source distribution. | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16786
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 12055 | 21 | */ |
| 22 | ||
| 23 | #include "internal.h" | |
| 24 | #include "plugin.h" | |
| 25 | #include "notify.h" | |
| 26 | #include "util.h" | |
| 27 | #include "version.h" | |
| 28 | ||
| 15884 | 29 | PurplePlugin *plugin_handle = NULL; |
| 12055 | 30 | |
| 15884 | 31 | static gboolean outgoing_msg_cb(PurpleAccount *account, const char *who, char **message, |
| 32 | PurpleConversation *conv, PurpleMessageFlags flags, gpointer null) | |
| 12055 | 33 | { |
| 34 | char *m; | |
| 35 | char **ms = g_strsplit(*message, "<u>", -1); | |
| 36 | m = g_strjoinv("<font face=\"monospace\" color=\"#00b025\">", ms); | |
| 37 | g_strfreev(ms); | |
| 38 | ||
| 39 | ms = g_strsplit(m, "</u>", -1); | |
| 40 | g_free(m); | |
| 41 | m = g_strjoinv("</font>", ms); | |
| 42 | g_free(*message); | |
| 43 | *message = m; | |
| 44 | return FALSE; | |
| 45 | } | |
| 46 | ||
| 47 | static gboolean | |
| 15884 | 48 | plugin_load(PurplePlugin *plugin) |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
13234
diff
changeset
|
49 | { |
| 15884 | 50 | void *handle = purple_conversations_get_handle(); |
| 12055 | 51 | plugin_handle = plugin; |
| 15884 | 52 | purple_signal_connect(handle, "writing-im-msg", plugin, |
| 53 | PURPLE_CALLBACK(outgoing_msg_cb), NULL); | |
| 54 | purple_signal_connect(handle, "sending-im-msg", plugin, | |
| 55 | PURPLE_CALLBACK(outgoing_msg_cb), NULL); | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
13234
diff
changeset
|
56 | |
| 12055 | 57 | return TRUE; |
| 58 | } | |
| 59 | ||
| 60 | ||
| 15884 | 61 | static PurplePluginInfo info = |
| 12055 | 62 | { |
| 15884 | 63 | PURPLE_PLUGIN_MAGIC, |
| 64 | PURPLE_MAJOR_VERSION, | |
| 65 | PURPLE_MINOR_VERSION, | |
| 66 | PURPLE_PLUGIN_STANDARD, | |
| 12055 | 67 | NULL, |
| 68 | 0, | |
| 69 | NULL, | |
| 15884 | 70 | PURPLE_PRIORITY_DEFAULT, |
| 12055 | 71 | "codeinline", |
| 72 | "Code Inline", | |
| 73 | "1.0", | |
| 74 | "Formats text as code", | |
| 75 | "Changes the formatting of any outgoing text such that " | |
| 76 | "anything underlined will be received green and monospace.", | |
| 77 | "Sean Egan <seanegan@gmail.com>", | |
|
15924
1e6022a75ba9
Use PURPLE_WEBSITE instead of listing the website directly (which was wrong because of the sed).
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
78 | PURPLE_WEBSITE, |
| 12055 | 79 | plugin_load, |
| 80 | NULL, | |
| 81 | NULL, | |
| 82 | NULL, | |
| 83 | NULL, | |
| 84 | NULL, | |
|
16786
65c04c7e5c8a
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15924
diff
changeset
|
85 | NULL, |
|
65c04c7e5c8a
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15924
diff
changeset
|
86 | /* padding */ |
|
65c04c7e5c8a
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15924
diff
changeset
|
87 | NULL, |
|
65c04c7e5c8a
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15924
diff
changeset
|
88 | NULL, |
|
65c04c7e5c8a
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15924
diff
changeset
|
89 | NULL, |
| 12055 | 90 | NULL |
| 91 | }; | |
| 92 | ||
| 93 | static void | |
| 15884 | 94 | init_plugin(PurplePlugin *plugin) |
| 12055 | 95 | { |
| 96 | } | |
| 97 | ||
|
25633
feee0c7e503f
Fix some more mis-identified plugins, like 3b3526a0...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
98 | PURPLE_INIT_PLUGIN(codeinline, init_plugin, info) |