Wed, 12 Sep 2007 19:57:45 +0000
Fixing usernick.c and, for some strange reason, request.h
|
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 | * |
|
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
|
4 | * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com> |
|
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
|
5 | * |
|
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
|
6 | * 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
|
7 | * 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
|
8 | * 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
|
9 | * (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
|
10 | * |
|
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 | * 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
|
12 | * 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
|
13 | * 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
|
14 | * 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
|
15 | * |
|
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 | * 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
|
17 | * along with this program; if not, write to the Free Software |
|
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 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
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 | * |
|
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
|
20 | */ |
|
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 | |
|
19898
218e4bb04853
Fix mingw build of xmpp prpl
Daniel Atallah <datallah@pidgin.im>
parents:
17804
diff
changeset
|
22 | #include "internal.h" |
|
218e4bb04853
Fix mingw build of xmpp prpl
Daniel Atallah <datallah@pidgin.im>
parents:
17804
diff
changeset
|
23 | |
|
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
|
24 | #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
|
25 | #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
|
26 | #include <assert.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 <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
|
28 | #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
|
29 | #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
|
30 | #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
|
31 | |
|
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 | 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
|
33 | /* 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
|
34 | 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
|
35 | 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
|
36 | xmlnode *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
|
37 | const char *nickname = NULL; |
|
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
|
38 | |
|
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
|
39 | /* ignore the tune of people not on our buddy list */ |
|
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
|
40 | 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
|
41 | 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
|
42 | |
|
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
|
43 | 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
|
44 | 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
|
45 | 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
|
46 | 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
|
47 | |
|
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); |
|
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
|
49 | } |
|
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 | 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
|
52 | xmlnode *publish, *nicknode; |
|
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 | |
|
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
|
54 | 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
|
55 | 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
|
56 | 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
|
57 | xmlnode_set_namespace(nicknode, "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
|
58 | |
|
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
|
59 | 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
|
60 | xmlnode_insert_data(nicknode, nick, -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
|
61 | |
|
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
|
62 | 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
|
63 | /* 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
|
64 | (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
|
65 | } |
|
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 | static void do_nick_got_own_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
|
68 | const char *oldnickname = NULL; |
|
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
|
69 | 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
|
70 | |
|
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
|
71 | 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
|
72 | 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
|
73 | 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
|
74 | 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
|
75 | } |
|
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 | |
|
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 | purple_request_input(js->gc, _("Set User Nickname"), _("Please specify a new nickname for you."), |
|
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 | _("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
|
79 | oldnickname, FALSE, FALSE, NULL, _("Set"), PURPLE_CALLBACK(do_nick_set), _("Cancel"), NULL, |
|
19999
857111632b11
Fixing usernick.c and, for some strange reason, request.h
Gabriel Schulhof <nix@go-nix.ca>
parents:
19898
diff
changeset
|
80 | purple_connection_get_account(js->gc), NULL, NULL, "blist", js); |
|
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
|
81 | } |
|
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 | |
|
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 | static void do_nick_set_nick(PurplePluginAction *action) { |
|
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
|
84 | PurpleConnection *gc = (PurpleConnection *) action->context; |
|
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
|
85 | JabberStream *js = gc->proto_data; |
|
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 | char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); |
|
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 | /* 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
|
89 | from the server to present as the default for the new 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
|
90 | jabber_pep_request_item(js, jid, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb); |
|
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
|
91 | g_free(jid); |
|
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 | } |
|
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 | |
|
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
|
94 | void jabber_nick_init(void) { |
|
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 | jabber_add_feature("nick", "http://jabber.org/protocol/nick", jabber_pep_namespace_only_when_pep_enabled_cb); |
|
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 | jabber_pep_register_handler("nickn", "http://jabber.org/protocol/nick", jabber_nick_cb); |
|
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 | } |
|
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
|
98 | |
|
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
|
99 | 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
|
100 | 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
|
101 | *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
|
102 | } |