annotate plugins/perl/common/Cmds.xs @ 13807:a415805c7456

[gaim-migrate @ 16232] Don Seiler submitted this patch to bug #1426339. It compensates for a jabber server error where some broken servers send more than one group name with a buddy. Or something like that. In any case, the server was broken and Gaim didn't handle it very gracefully, and it's a one-line fix. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 08 Jun 2006 04:27:04 +0000
parents 3ab3e68df807
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
2 #include "../perl-handlers.h"
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
3
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
4 MODULE = Gaim::Cmd PACKAGE = Gaim::Cmd PREFIX = gaim_cmd_
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
5 PROTOTYPES: ENABLE
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
6
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
7 void
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
8 gaim_cmd_help(conv, command)
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
9 Gaim::Conversation conv
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
10 const gchar *command
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
11 PREINIT:
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
12 GList *l;
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13 PPCODE:
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
14 for (l = gaim_cmd_help(conv, command); l != NULL; l = l->next) {
12892
3ab3e68df807 [gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12882
diff changeset
15 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
16 }
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
17
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
18 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19 gaim_cmd_list(conv)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
20 Gaim::Conversation conv
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
21 PREINIT:
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
22 GList *l;
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
23 PPCODE:
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
24 for (l = gaim_cmd_list(conv); l != NULL; l = l->next) {
12892
3ab3e68df807 [gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12882
diff changeset
25 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
26 }
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
27
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
28 Gaim::Cmd::Id
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
29 gaim_cmd_register(plugin, command, args, priority, flag, prpl_id, func, helpstr, data = 0)
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
30 Gaim::Plugin plugin
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
31 const gchar *command
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
32 const gchar *args
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
33 Gaim::Cmd::Priority priority
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
34 Gaim::Cmd::Flag flag
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
35 const gchar *prpl_id
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
36 SV *func
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
37 const gchar *helpstr
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
38 SV *data
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
39 CODE:
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
40 RETVAL = gaim_perl_cmd_register(plugin, command, args, priority, flag,
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
41 prpl_id, func, helpstr, data);
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
42 OUTPUT:
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
43 RETVAL
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
44
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
45 void
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
46 gaim_cmd_unregister(id)
12882
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
47 Gaim::Cmd::Id id
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
48 CODE:
e1603fd610fa [gaim-migrate @ 15234]
Etan Reisner <pidgin@unreliablesource.net>
parents: 11290
diff changeset
49 gaim_perl_cmd_unregister(id);