Mercurial > pidgin
comparison src/protocols/jabber/jabber.c @ 2501:227cc42ffa6e
[gaim-migrate @ 2514]
i should have hidden something ultra-secret in this.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 14 Oct 2001 11:36:36 +0000 |
parents | 569ae9f2bb89 |
children | e0d4a23aac89 |
comparison
equal
deleted
inserted
replaced
2500:1697ecbf1bcc | 2501:227cc42ffa6e |
---|---|
63 | 63 |
64 #define IQ_NONE -1 | 64 #define IQ_NONE -1 |
65 #define IQ_AUTH 0 | 65 #define IQ_AUTH 0 |
66 #define IQ_ROSTER 1 | 66 #define IQ_ROSTER 1 |
67 | 67 |
68 #define UC_AWAY 0x38 | 68 #define UC_AWAY (0x02 | UC_UNAVAILABLE) |
69 #define UC_CHAT 0x48 | 69 #define UC_CHAT 0x04 |
70 #define UC_XA 0x98 | 70 #define UC_XA (0x08 | UC_UNAVAILABLE) |
71 #define UC_DND 0x118 | 71 #define UC_DND (0x10 | UC_UNAVAILABLE) |
72 | 72 |
73 #define DEFAULT_SERVER "jabber.org" | 73 #define DEFAULT_SERVER "jabber.org" |
74 #define DEFAULT_GROUPCHAT "conference.jabber.org" | 74 #define DEFAULT_GROUPCHAT "conference.jabber.org" |
75 #define DEFAULT_PORT 5222 | 75 #define DEFAULT_PORT 5222 |
76 | 76 |
698 struct buddy *b = NULL; | 698 struct buddy *b = NULL; |
699 jid who; | 699 jid who; |
700 char *buddy; | 700 char *buddy; |
701 xmlnode y; | 701 xmlnode y; |
702 char *show; | 702 char *show; |
703 int state = UC_NORMAL; | 703 int state = 0; |
704 GSList *resources; | 704 GSList *resources; |
705 char *res; | 705 char *res; |
706 struct conversation *cnv = NULL; | 706 struct conversation *cnv = NULL; |
707 struct jabber_chat *jc = NULL; | 707 struct jabber_chat *jc = NULL; |
708 | 708 |
711 type = xmlnode_get_attrib(p->x, "type"); | 711 type = xmlnode_get_attrib(p->x, "type"); |
712 | 712 |
713 if ((y = xmlnode_get_tag(p->x, "show"))) { | 713 if ((y = xmlnode_get_tag(p->x, "show"))) { |
714 show = xmlnode_get_data(y); | 714 show = xmlnode_get_data(y); |
715 if (!show) { | 715 if (!show) { |
716 state = UC_NORMAL; | 716 state = 0; |
717 } else if (!strcasecmp(show, "away")) { | 717 } else if (!strcasecmp(show, "away")) { |
718 state = UC_AWAY; | 718 state = UC_AWAY; |
719 } else if (!strcasecmp(show, "chat")) { | 719 } else if (!strcasecmp(show, "chat")) { |
720 state = UC_CHAT; | 720 state = UC_CHAT; |
721 } else if (!strcasecmp(show, "xa")) { | 721 } else if (!strcasecmp(show, "xa")) { |
722 state = UC_XA; | 722 state = UC_XA; |
723 } else if (!strcasecmp(show, "dnd")) { | 723 } else if (!strcasecmp(show, "dnd")) { |
724 state = UC_DND; | 724 state = UC_DND; |
725 } | 725 } |
726 } else { | 726 } else { |
727 state = UC_NORMAL; | 727 state = 0; |
728 } | 728 } |
729 | 729 |
730 who = jid_new(j->p, from); | 730 who = jid_new(j->p, from); |
731 if (who->user == NULL) { | 731 if (who->user == NULL) { |
732 /* FIXME: transport */ | 732 /* FIXME: transport */ |
1645 m = g_list_append(m, pbm); | 1645 m = g_list_append(m, pbm); |
1646 | 1646 |
1647 return m; | 1647 return m; |
1648 } | 1648 } |
1649 | 1649 |
1650 static GList *jabber_away_states() { | 1650 static GList *jabber_away_states(struct gaim_connection *gc) { |
1651 GList *m = NULL; | 1651 GList *m = NULL; |
1652 | 1652 |
1653 m = g_list_append(m, "Online"); | 1653 m = g_list_append(m, "Online"); |
1654 m = g_list_append(m, "Chatty"); | 1654 m = g_list_append(m, "Chatty"); |
1655 m = g_list_append(m, "Away"); | 1655 m = g_list_append(m, "Away"); |