summaryrefslogtreecommitdiff
path: root/libpurple
diff options
context:
space:
mode:
authorEtan Reisner <deryni@pidgin.im>2009-07-04 17:36:07 +0000
committerEtan Reisner <deryni@pidgin.im>2009-07-04 17:36:07 +0000
commit62c835cb7a7357bc153224167d2afdb4fd2fe6da (patch)
treea97f85c87db5781b20310e1b9a850236a5fb640e /libpurple
parente2a4d94325fa80c200ea4dc64ad222d0e5c9ad28 (diff)
parent6753db57afba23f93d963424a0a5bdfbfa79240a (diff)
downloadpidgin-62c835cb7a7357bc153224167d2afdb4fd2fe6da.tar.gz
merge of '9147f6a00811b00ad8a36a9ccf04291f2b5ae50d'
and 'd9dc5a8507a756a79d13db892272fd50b54f8a65'
Diffstat (limited to 'libpurple')
-rw-r--r--libpurple/account.c19
-rw-r--r--libpurple/buddyicon.h2
-rw-r--r--libpurple/log.c2
-rw-r--r--libpurple/plugin.c7
-rw-r--r--libpurple/plugin.h9
-rw-r--r--libpurple/plugins/perl/Makefile.am5
-rw-r--r--libpurple/plugins/perl/common/Makefile.PL.in12
-rw-r--r--libpurple/plugins/perl/perl.c12
-rw-r--r--libpurple/protocols/jabber/jabber.c2
-rw-r--r--libpurple/protocols/jabber/libxmpp.c2
-rw-r--r--libpurple/protocols/myspace/message.c3
-rw-r--r--libpurple/prpl.c3
-rwxr-xr-xlibpurple/purple-remote1
13 files changed, 60 insertions, 19 deletions
diff --git a/libpurple/account.c b/libpurple/account.c
index 1b1d2f1d1e..c0b7d9a054 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -1132,29 +1132,32 @@ void
purple_account_connect(PurpleAccount *account)
{
PurplePlugin *prpl;
+ const char *password, *username;
PurplePluginProtocolInfo *prpl_info;
- const char *password;
g_return_if_fail(account != NULL);
- purple_debug_info("account", "Connecting to account %s\n",
- purple_account_get_username(account));
+ username = purple_account_get_username(account);
- if (!purple_account_get_enabled(account, purple_core_get_ui()))
+ if (!purple_account_get_enabled(account, purple_core_get_ui())) {
+ purple_debug_info("account",
+ "Account %s not enabled, not connecting.\n",
+ username);
return;
+ }
prpl = purple_find_prpl(purple_account_get_protocol_id(account));
- if (prpl == NULL)
- {
+ if (prpl == NULL) {
gchar *message;
- message = g_strdup_printf(_("Missing protocol plugin for %s"),
- purple_account_get_username(account));
+ message = g_strdup_printf(_("Missing protocol plugin for %s"), username);
purple_notify_error(account, _("Connection Error"), message, NULL);
g_free(message);
return;
}
+ purple_debug_info("account", "Connecting to account %s.\n", username);
+
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
password = purple_account_get_password(account);
if ((password == NULL) &&
diff --git a/libpurple/buddyicon.h b/libpurple/buddyicon.h
index 0669804ea2..7fbecbb9a8 100644
--- a/libpurple/buddyicon.h
+++ b/libpurple/buddyicon.h
@@ -189,8 +189,6 @@ char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
* takes ownership of and will free.
* @param icon_len The length of the icon data.
* @param checksum A protocol checksum from the prpl or @c NULL.
- *
- * @return The buddy icon set, or NULL if no icon was set.
*/
void
purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
diff --git a/libpurple/log.c b/libpurple/log.c
index 0f8da9d5dd..4a329674ee 100644
--- a/libpurple/log.c
+++ b/libpurple/log.c
@@ -1129,7 +1129,7 @@ static void log_get_log_sets_common(GHashTable *sets)
/* set->buddy is always set below */
set->normalized_name = g_strdup(purple_normalize(account, name));
- /* Chat for .chat or .system at the end of the name to determine the type. */
+ /* Check for .chat or .system at the end of the name to determine the type. */
if (len >= 7) {
gchar *tmp = &name[len - 7];
if (purple_strequal(tmp, ".system")) {
diff --git a/libpurple/plugin.c b/libpurple/plugin.c
index 24efa53fb2..c9baadfb40 100644
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -861,6 +861,7 @@ purple_plugin_destroy(PurplePlugin *plugin)
}
g_list_free(loader_info->exts);
+ loader_info->exts = NULL;
}
plugin_loaders = g_list_remove(plugin_loaders, plugin);
@@ -1222,6 +1223,12 @@ purple_plugins_add_search_path(const char *path)
search_paths = g_list_append(search_paths, g_strdup(path));
}
+GList *
+purple_plugins_get_search_paths()
+{
+ return search_paths;
+}
+
void
purple_plugins_unload_all(void)
{
diff --git a/libpurple/plugin.h b/libpurple/plugin.h
index 0374418dfd..9225aecd92 100644
--- a/libpurple/plugin.h
+++ b/libpurple/plugin.h
@@ -512,6 +512,15 @@ void *purple_plugin_ipc_call(PurplePlugin *plugin, const char *command,
void purple_plugins_add_search_path(const char *path);
/**
+ * Returns a list of plugin search paths.
+ *
+ * @constreturn A list of searched paths.
+ *
+ * @since 2.6.0
+ */
+GList *purple_plugins_get_search_paths(void);
+
+/**
* Unloads all loaded plugins.
*/
void purple_plugins_unload_all(void);
diff --git a/libpurple/plugins/perl/Makefile.am b/libpurple/plugins/perl/Makefile.am
index 62c652a73e..3843e42db2 100644
--- a/libpurple/plugins/perl/Makefile.am
+++ b/libpurple/plugins/perl/Makefile.am
@@ -99,7 +99,7 @@ common/Makefile: common/Makefile.PL
${LN_S} -f $$srcloc/$$f $$f; \
done; \
fi
- @cd common && $(perlpath) Makefile.PL $(PERL_MM_PARAMS)
+ @cd common && $(perlpath) Makefile.PL
common/Makefile.PL: common/Makefile.PL.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
@@ -108,7 +108,7 @@ all-local: common/Makefile
@for dir in $(perl_dirs); do \
cd $$dir && \
if [ ! -f Makefile ]; then \
- $(perlpath) Makefile.PL $(PERL_MM_PARAMS); \
+ $(perlpath) Makefile.PL; \
fi && \
($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \
$(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
@@ -164,6 +164,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libpurple \
-I$(top_builddir)/libpurple \
+ -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)\" \
$(DEBUG_CFLAGS) \
$(GLIB_CFLAGS) \
$(PLUGIN_CFLAGS) \
diff --git a/libpurple/plugins/perl/common/Makefile.PL.in b/libpurple/plugins/perl/common/Makefile.PL.in
index f59fc7f14f..07ec65d694 100644
--- a/libpurple/plugins/perl/common/Makefile.PL.in
+++ b/libpurple/plugins/perl/common/Makefile.PL.in
@@ -13,4 +13,16 @@ WriteMakefile(
'INC' => '-I. -I@srcdir@ -I@top_srcdir@ -I@top_srcdir@/libpurple @GLIB_CFLAGS@',
'OBJECT' => '$(O_FILES)', # link all the C files too
# 'OPTIMIZE' => '-g', # For debugging
+ 'INSTALLDIRS' => 'vendor',
+ 'INSTALL_BASE' => '$(prefix)',
+ 'INSTALLVENDORARCH' => '$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/perl',
+ 'INSTALLVENDORMAN3DIR' => '$(mandir)/man3',
+ 'macro' => {
+ 'prefix' => '@prefix@',
+ 'exec_prefix' => '@exec_prefix@',
+ 'libdir' => '@libdir@',
+ 'mandir' => '@mandir@',
+ 'datarootdir' => '@datarootdir@',
+ 'PURPLE_MAJOR_VERSION' => '@PURPLE_MAJOR_VERSION@',
+ },
);
diff --git a/libpurple/plugins/perl/perl.c b/libpurple/plugins/perl/perl.c
index cba35647e2..b7c46a2e4b 100644
--- a/libpurple/plugins/perl/perl.c
+++ b/libpurple/plugins/perl/perl.c
@@ -131,6 +131,7 @@ xs_init(pTHX)
#endif
{
char *file = __FILE__;
+ GList *search_paths = purple_plugins_get_search_paths();
dXSUB_SYS;
/* This one allows dynamic loading of perl modules in perl scripts by
@@ -139,6 +140,17 @@ xs_init(pTHX)
#ifdef _WIN32
newXS("Win32CORE::bootstrap", boot_Win32CORE, file);
#endif
+
+ while (search_paths != NULL) {
+ gchar *uselib;
+ const gchar *search_path = search_paths->data;
+ search_paths = g_list_next(search_paths);
+
+ uselib = g_strdup_printf("unshift @INC, \"%s%cperl\";",
+ search_path, G_DIR_SEPARATOR);
+ eval_pv(uselib, TRUE);
+ g_free(uselib);
+ }
}
static void
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index fb31c88181..194b897718 100644
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -908,7 +908,7 @@ jabber_registration_result_cb(JabberStream *js, const char *from,
if (type == JABBER_IQ_RESULT) {
if(js->registration) {
buf = g_strdup_printf(_("Registration of %s@%s successful"),
- js->user->node, js->user->domain);
+ js->user->node, js->user->domain);
if(account->registration_cb)
(account->registration_cb)(account, TRUE, account->registration_cb_user_data);
} else {
diff --git a/libpurple/protocols/jabber/libxmpp.c b/libpurple/protocols/jabber/libxmpp.c
index d1403246da..89978896b3 100644
--- a/libpurple/protocols/jabber/libxmpp.c
+++ b/libpurple/protocols/jabber/libxmpp.c
@@ -288,7 +288,7 @@ init_plugin(PurplePlugin *plugin)
purple_account_user_split_set_reverse(split, FALSE);
prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
- option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", FALSE);
+ option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", TRUE);
prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
option);
diff --git a/libpurple/protocols/myspace/message.c b/libpurple/protocols/myspace/message.c
index f52287c09e..2311c49239 100644
--- a/libpurple/protocols/myspace/message.c
+++ b/libpurple/protocols/myspace/message.c
@@ -19,9 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
-#include "internal.h"
-#include "message.h"
#include "myspace.h"
+#include "message.h"
static void msim_msg_debug_string_element(gpointer data, gpointer user_data);
diff --git a/libpurple/prpl.c b/libpurple/prpl.c
index f423486407..23eb4faa11 100644
--- a/libpurple/prpl.c
+++ b/libpurple/prpl.c
@@ -282,7 +282,8 @@ purple_prpl_got_user_status(PurpleAccount *account, const char *name,
g_slist_free(list);
- /* we get to re-use the last status we found */
+ /* The buddy is no longer online, they are therefore by definition not
+ * still typing to us. */
if (!purple_status_is_online(status))
serv_got_typing_stopped(purple_account_get_connection(account), name);
}
diff --git a/libpurple/purple-remote b/libpurple/purple-remote
index 89fa0a1714..498a5a5f8a 100755
--- a/libpurple/purple-remote
+++ b/libpurple/purple-remote
@@ -161,7 +161,6 @@ def execute(uri):
purple.PurpleSavedstatusSetSubstatus(current, account, type, message)
purple.PurpleSavedstatusActivateForAccount(current, account)
else:
- accounts = purple.PurpleAccountsGetAllActive()
saved = purple.PurpleSavedstatusNew("", status_type)
purple.PurpleSavedstatusSetMessage(saved, message)
purple.PurpleSavedstatusActivate(saved)