libpurple/protocols/jabber/usernick.c

Tue, 04 Jan 2011 06:55:30 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 04 Jan 2011 06:55:30 +0000
changeset 31294
73607ab89c6f
parent 29782
ca4fedd9e890
child 34329
ddbc1337332c
child 34935
686fa55b0deb
child 36496
e7fe371c60a6
permissions
-rw-r--r--

Remove trailing whitespace

17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
1 /*
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
2 * purple - Jabber Protocol Plugin
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
3 *
28322
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28321
diff changeset
4 * Purple is the legal property of its developers, whose names are too numerous
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28321
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28321
diff changeset
6 * source distribution.
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
7 *
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
11 * (at your option) any later version.
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
12 *
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
16 * GNU General Public License for more details.
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
17 *
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
28321
c8d617c408ab Update various header copyrights thanks to licensecheck.
Paul Aurich <darkrain42@pidgin.im>
parents: 27016
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
21 *
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
22 */
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
23
19898
218e4bb04853 Fix mingw build of xmpp prpl
Daniel Atallah <datallah@pidgin.im>
parents: 17804
diff changeset
24 #include "internal.h"
218e4bb04853 Fix mingw build of xmpp prpl
Daniel Atallah <datallah@pidgin.im>
parents: 17804
diff changeset
25
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
26 #include "usernick.h"
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
27 #include "pep.h"
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
28 #include <string.h>
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
29 #include "internal.h"
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
30 #include "request.h"
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
31 #include "status.h"
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
32
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
33 static void jabber_nick_cb(JabberStream *js, const char *from, xmlnode *items) {
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
34 /* it doesn't make sense to have more than one item here, so let's just pick the first one */
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
35 xmlnode *item = xmlnode_get_child(items, "item");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
36 JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
37 xmlnode *nick;
20169
497e1cd1e059 Merged xmpp leak fixes
Evan Schoenberg <evands@pidgin.im>
parents: 19994
diff changeset
38 char *nickname = NULL;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
39
26997
e30b31076fcb Handle User Nick notifications via <presence/> stanzas (receive-only). Refs #864.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
40 /* ignore the nick of people not on our buddy list */
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
41 if (!buddy || !item)
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
42 return;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
43
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
44 nick = xmlnode_get_child_with_namespace(item, "nick", "http://jabber.org/protocol/nick");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
45 if (!nick)
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
46 return;
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
47 nickname = xmlnode_get_data(nick);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
48 serv_got_alias(js->gc, from, nickname);
20169
497e1cd1e059 Merged xmpp leak fixes
Evan Schoenberg <evands@pidgin.im>
parents: 19994
diff changeset
49 g_free(nickname);
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
50 }
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
51
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
52 static void do_nick_set(JabberStream *js, const char *nick) {
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
53 xmlnode *publish, *nicknode;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
54
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
55 publish = xmlnode_new("publish");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
56 xmlnode_set_attrib(publish,"node","http://jabber.org/protocol/nick");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
57 nicknode = xmlnode_new_child(xmlnode_new_child(publish, "item"), "nick");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
58 xmlnode_set_namespace(nicknode, "http://jabber.org/protocol/nick");
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
59
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
60 if(nick && nick[0] != '\0')
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
61 xmlnode_insert_data(nicknode, nick, -1);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
62
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
63 jabber_pep_publish(js, publish);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
64 /* publish is freed by jabber_pep_publish -> jabber_iq_send -> jabber_iq_free
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
65 (yay for well-defined memory management rules) */
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
66 }
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
67
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
68 static void do_nick_got_own_nick_cb(JabberStream *js, const char *from, xmlnode *items) {
20169
497e1cd1e059 Merged xmpp leak fixes
Evan Schoenberg <evands@pidgin.im>
parents: 19994
diff changeset
69 char *oldnickname = NULL;
27016
1e21b1e058c0 On errors, don't pretend we did fetch something, pass NULL.
Paul Aurich <darkrain42@pidgin.im>
parents: 26997
diff changeset
70 xmlnode *item = NULL;
31294
73607ab89c6f Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents: 29782
diff changeset
71
27016
1e21b1e058c0 On errors, don't pretend we did fetch something, pass NULL.
Paul Aurich <darkrain42@pidgin.im>
parents: 26997
diff changeset
72 if (items)
1e21b1e058c0 On errors, don't pretend we did fetch something, pass NULL.
Paul Aurich <darkrain42@pidgin.im>
parents: 26997
diff changeset
73 item = xmlnode_get_child(items,"item");
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
74
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
75 if(item) {
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
76 xmlnode *nick = xmlnode_get_child_with_namespace(item,"nick","http://jabber.org/protocol/nick");
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
77 if(nick)
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
78 oldnickname = xmlnode_get_data(nick);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
79 }
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
80
21653
621c47778132 merge of '73ae9aeda3c58fbf8437421da68d19d06f93e686'
Evan Schoenberg <evands@pidgin.im>
parents: 21233
diff changeset
81 purple_request_input(js->gc, _("Set User Nickname"), _("Please specify a new nickname for you."),
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
82 _("This information is visible to all contacts on your contact list, so choose something appropriate."),
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
83 oldnickname, FALSE, FALSE, NULL, _("Set"), PURPLE_CALLBACK(do_nick_set), _("Cancel"), NULL,
21653
621c47778132 merge of '73ae9aeda3c58fbf8437421da68d19d06f93e686'
Evan Schoenberg <evands@pidgin.im>
parents: 21233
diff changeset
84 purple_connection_get_account(js->gc), NULL, NULL, js);
20169
497e1cd1e059 Merged xmpp leak fixes
Evan Schoenberg <evands@pidgin.im>
parents: 19994
diff changeset
85 g_free(oldnickname);
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
86 }
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
87
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
88 static void do_nick_set_nick(PurplePluginAction *action) {
29782
ca4fedd9e890 jabber: Allow jabber_pep_request_item() to take NULL for JID; server's routing takes care of the rest
Paul Aurich <darkrain42@pidgin.im>
parents: 28322
diff changeset
89 PurpleConnection *gc = action->context;
ca4fedd9e890 jabber: Allow jabber_pep_request_item() to take NULL for JID; server's routing takes care of the rest
Paul Aurich <darkrain42@pidgin.im>
parents: 28322
diff changeset
90 JabberStream *js = purple_connection_get_protocol_data(gc);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 21653
diff changeset
91
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
92 /* since the nickname might have been changed by another resource of this account, we always have to request the old one
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
93 from the server to present as the default for the new one */
29782
ca4fedd9e890 jabber: Allow jabber_pep_request_item() to take NULL for JID; server's routing takes care of the rest
Paul Aurich <darkrain42@pidgin.im>
parents: 28322
diff changeset
94 jabber_pep_request_item(js, NULL, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb);
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
95 }
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
96
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
97 void jabber_nick_init(void) {
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 21653
diff changeset
98 jabber_add_feature("http://jabber.org/protocol/nick", jabber_pep_namespace_only_when_pep_enabled_cb);
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 21653
diff changeset
99 jabber_pep_register_handler("http://jabber.org/protocol/nick", jabber_nick_cb);
17804
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
100 }
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
101
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
102 void jabber_nick_init_action(GList **m) {
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
103 PurplePluginAction *act = purple_plugin_action_new(_("Set Nickname..."), do_nick_set_nick);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
104 *m = g_list_append(*m, act);
fcf478d290f6 User Nickname now sets the buddy's server_alias, which means that no UI changes are required for supporting this XEP. Also forgot to add usernick.[hc].
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
105 }

mercurial