Mercurial > pidgin
changeset 12020:440d9354b67f
[gaim-migrate @ 14313]
Apparently this works for some people? I'd thought G_MODULE_BIND_LOCAL
would not allow stuff like this.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 09 Nov 2005 03:09:55 +0000 |
parents | 4c05f4dd3ab9 |
children | 1a86417abfc8 |
files | plugins/raw.c |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/raw.c Wed Nov 09 02:59:02 2005 +0000 +++ b/plugins/raw.c Wed Nov 09 03:09:55 2005 +0000 @@ -1,9 +1,5 @@ /* - * Gaim - Replace certain misspelled words with their correct form. - * - * Signification changes were made by Benjamin Kahn ("xkahn") and - * Richard Laager ("rlaager") in April 2005--you may want to contact - * them if you have questions. + * Gaim - Send raw data across the connections of some protocols. * * Gaim is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this @@ -36,6 +32,9 @@ #include "gtkplugin.h" #include "gtkutils.h" +#include "protocols/jabber/jabber.h" +#include "protocols/msn/session.h" + #ifdef MAX # undef MAX # undef MIN @@ -83,11 +82,21 @@ write(*a, txt, ntohs(len)); gaim_debug(GAIM_DEBUG_MISC, "raw", "TOC C: %s\n", txt); + } else if (strcmp(prpl_id, "prpl-msn") == 0) { + MsnSession *session = gc->proto_data; + char buf[strlen(txt) + 3]; + + g_snprintf(buf, sizeof(buf), "%s\r\n", txt); + msn_servconn_write(session->notification->servconn, buf, strlen(buf)); + } else if (strcmp(prpl_id, "prpl-irc") == 0) { write(*(int *)gc->proto_data, txt, strlen(txt)); write(*(int *)gc->proto_data, "\r\n", 2); gaim_debug(GAIM_DEBUG_MISC, "raw", "IRC C: %s\n", txt); + } else if (strcmp(prpl_id, "prpl-jabber") == 0) { + jabber_send_raw((JabberStream *)gc->proto_data, txt, -1); + } else { gaim_debug_error("raw", "Unknown protocol ID %s\n", prpl_id); } @@ -166,7 +175,7 @@ N_("Raw"), VERSION, N_("Lets you send raw input to text-based protocols."), - N_("Lets you send raw input to text-based protocols (IRC, " + N_("Lets you send raw input to text-based protocols (Jabber, MSN, IRC, " "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."), "Eric Warmenhoven <eric@warmenhoven.org>", GAIM_WEBSITE,