annotate plugins/raw.c @ 9920:a58f010171f9

[gaim-migrate @ 10812] i decided this was a more or less valid request committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 31 Aug 2004 15:50:46 +0000
parents a09ffb82aef1
children a9fb4493ae22
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6387
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
1 #include "conversation.h"
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
2 #include "debug.h"
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 #include "prpl.h"
9821
a09ffb82aef1 [gaim-migrate @ 10692]
Mark Doliner <mark@kingant.net>
parents: 9460
diff changeset
4
a09ffb82aef1 [gaim-migrate @ 10692]
Mark Doliner <mark@kingant.net>
parents: 9460
diff changeset
5 #include "gtkgaim.h"
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
6 #include "gtkplugin.h"
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
7 #include "gtkutils.h"
6387
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
8
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 #ifdef MAX
6387
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
10 # undef MAX
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
11 # undef MIN
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 #endif
6387
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
13
2824
2c39e70dd07c [gaim-migrate @ 2837]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2495
diff changeset
14 #include "protocols/jabber/jabber.h"
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
15 #include "protocols/msn/session.h"
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
16
6387
b9c9f4d6f5d8 [gaim-migrate @ 6892]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
17 #define RAW_PLUGIN_ID "gtk-raw"
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 static GtkWidget *window = NULL;
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
20 static GaimAccount *account = NULL;
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
21 static GaimPlugin *my_plugin = NULL;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
23 static int
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
24 window_closed_cb()
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 {
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
26 gaim_plugin_unload(my_plugin);
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
27
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 return FALSE;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
31 static void
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
32 text_sent_cb(GtkEntry *entry)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 {
4655
fac4c73dd5ad [gaim-migrate @ 4966]
Nathan Walp <nwalp@pidgin.im>
parents: 4165
diff changeset
34 const char *txt;
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
35 GaimConnection *gc;
9460
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
36 const char *prpl_id;
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
37
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
38 if (account == NULL)
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
39 return;
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
40
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
41 gc = gaim_account_get_connection(account);
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
42
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 txt = gtk_entry_get_text(entry);
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
44
9460
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
45 prpl_id = gaim_account_get_protocol_id(account);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
46
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
47 gaim_debug_misc("raw", "prpl_id = %s\n", prpl_id);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
48
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
49 if (strcmp(prpl_id, "prpl-toc") == 0) {
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
50 int *a = (int *)gc->proto_data;
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
51 unsigned short seqno = htons(a[1]++ & 0xffff);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
52 unsigned short len = htons(strlen(txt) + 1);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
53 write(*a, "*\002", 2);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
54 write(*a, &seqno, 2);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
55 write(*a, &len, 2);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
56 write(*a, txt, ntohs(len));
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
57 gaim_debug(GAIM_DEBUG_MISC, "raw", "TOC C: %s\n", txt);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
58
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
59 } else if (strcmp(prpl_id, "prpl-msn") == 0) {
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
60 MsnSession *session = gc->proto_data;
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
61 char buf[strlen(txt) + 3];
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
62
9460
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
63 g_snprintf(buf, sizeof(buf), "%s\r\n", txt);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
64 msn_servconn_write(session->notification->servconn, buf, strlen(buf));
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
65
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
66 } else if (strcmp(prpl_id, "prpl-irc") == 0) {
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
67 write(*(int *)gc->proto_data, txt, strlen(txt));
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
68 write(*(int *)gc->proto_data, "\r\n", 2);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
69 gaim_debug(GAIM_DEBUG_MISC, "raw", "IRC C: %s\n", txt);
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
70
9460
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
71 } else if (strcmp(prpl_id, "prpl-jabber") == 0) {
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
72 jabber_send_raw((JabberStream *)gc->proto_data, txt, -1);
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
73 } else {
eae7e049d639 [gaim-migrate @ 10285]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
74 gaim_debug_error("raw", "Unknown protocol ID %s\n", prpl_id);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 }
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
76
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77 gtk_entry_set_text(entry, "");
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
80 static void
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
81 account_changed_cb(GtkWidget *dropdown, GaimAccount *new_account,
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
82 void *user_data)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 {
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
84 account = new_account;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
87 static gboolean
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
88 plugin_load(GaimPlugin *plugin)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 GtkWidget *hbox;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 GtkWidget *entry;
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
92 GtkWidget *dropdown;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
94 /* Setup the window. */
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
6389
c05c02b6bfc8 [gaim-migrate @ 6894]
Christian Hammond <chipx86@chipx86.com>
parents: 6388
diff changeset
96 gtk_container_set_border_width(GTK_CONTAINER(window), 6);
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
97
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
98 g_signal_connect(G_OBJECT(window), "delete_event",
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
99 G_CALLBACK(window_closed_cb), NULL);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
101 /* Main hbox */
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
102 hbox = gtk_hbox_new(FALSE, 6);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 gtk_container_add(GTK_CONTAINER(window), hbox);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
105 /* Account drop-down menu. */
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
106 dropdown = gaim_gtk_account_option_menu_new(NULL, FALSE,
6647
ed89cd0c675e [gaim-migrate @ 7172]
Christian Hammond <chipx86@chipx86.com>
parents: 6390
diff changeset
107 G_CALLBACK(account_changed_cb), NULL, NULL);
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
108
6390
7788dd90cfe7 [gaim-migrate @ 6895]
Christian Hammond <chipx86@chipx86.com>
parents: 6389
diff changeset
109 if (gaim_connections_get_all())
7788dd90cfe7 [gaim-migrate @ 6895]
Christian Hammond <chipx86@chipx86.com>
parents: 6389
diff changeset
110 account = (GaimAccount *)gaim_connections_get_all()->data;
7788dd90cfe7 [gaim-migrate @ 6895]
Christian Hammond <chipx86@chipx86.com>
parents: 6389
diff changeset
111
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
112 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
113
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
114 /* Entry box */
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 entry = gtk_entry_new();
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
116 gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
117
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
118 g_signal_connect(G_OBJECT(entry), "activate",
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
119 G_CALLBACK(text_sent_cb), NULL);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 gtk_widget_show_all(window);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
123 return TRUE;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
126 static gboolean
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
127 plugin_unload(GaimPlugin *plugin)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
129 if (window)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
130 gtk_widget_destroy(window);
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
131
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 window = NULL;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
133
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
134 return TRUE;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
135 }
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
136
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
137 static GaimPluginInfo info =
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
138 {
8749
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 7746
diff changeset
139 GAIM_PLUGIN_API_VERSION,
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
140 GAIM_PLUGIN_STANDARD,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
141 GAIM_GTK_PLUGIN_TYPE,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
142 0,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
143 NULL,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
144 GAIM_PRIORITY_DEFAULT,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
145 RAW_PLUGIN_ID,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
146 N_("Raw"),
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
147 VERSION,
5424
88b5c9a45075 [gaim-migrate @ 5803]
Luke Schierer <lschiere@pidgin.im>
parents: 5320
diff changeset
148 N_("Lets you send raw input to text-based protocols."),
88b5c9a45075 [gaim-migrate @ 5803]
Luke Schierer <lschiere@pidgin.im>
parents: 5320
diff changeset
149 N_("Lets you send raw input to text-based protocols (Jabber, MSN, IRC, "
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
150 "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."),
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
151 "Eric Warmenhoven <eric@warmenhoven.org>",
6371
8f94cce8faa5 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 6063
diff changeset
152 GAIM_WEBSITE,
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
153 plugin_load,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
154 plugin_unload,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
155 NULL,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
156 NULL,
8993
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
157 NULL,
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
158 NULL,
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
159 NULL
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
160 };
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
161
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
162 static void
5920
7d385de2f9cd [gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents: 5424
diff changeset
163 init_plugin(GaimPlugin *plugin)
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
164 {
6388
9e49daffac97 [gaim-migrate @ 6893]
Christian Hammond <chipx86@chipx86.com>
parents: 6387
diff changeset
165 my_plugin = plugin;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
166 }
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
167
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 5920
diff changeset
168 GAIM_INIT_PLUGIN(raw, init_plugin, info)