comparison src/protocols/jabber/iq.c @ 9709:4d05b6e9e9cd

[gaim-migrate @ 10570] This patch is freaking massive. Renamed ui.h to gtkdialogs.h Renamed dialogs.c to gtkdialogs.c sed'ed the hell out of the .po files These files are similar to gtkutil.c/.h. They are meant to contain dialogs such as the "New Instant Message" window, which does not belong in gtkblist.c or gtkconv.c, and is called from both places. Eventually the functions in gtkdialogs.c/.h should be changed to conform to Gaim's naming convention. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 08 Aug 2004 00:48:19 +0000
parents 52ea0ab31caa
children 25866d09063d
comparison
equal deleted inserted replaced
9708:d49a19e8320c 9709:4d05b6e9e9cd
167 const char *type, *from, *id; 167 const char *type, *from, *id;
168 JabberIq *iq; 168 JabberIq *iq;
169 char buf[1024]; 169 char buf[1024];
170 xmlnode *query; 170 xmlnode *query;
171 time_t now_t; 171 time_t now_t;
172 struct tm now; 172 struct tm *now;
173 time(&now_t); 173 time(&now_t);
174 localtime_r(&now_t, &now); 174 now = localtime(&now_t);
175 175
176 type = xmlnode_get_attrib(packet, "type"); 176 type = xmlnode_get_attrib(packet, "type");
177 from = xmlnode_get_attrib(packet, "from"); 177 from = xmlnode_get_attrib(packet, "from");
178 id = xmlnode_get_attrib(packet, "id"); 178 id = xmlnode_get_attrib(packet, "id");
179 179
183 jabber_iq_set_id(iq, id); 183 jabber_iq_set_id(iq, id);
184 xmlnode_set_attrib(iq->node, "to", from); 184 xmlnode_set_attrib(iq->node, "to", from);
185 185
186 query = xmlnode_get_child(iq->node, "query"); 186 query = xmlnode_get_child(iq->node, "query");
187 187
188 strftime(buf, sizeof(buf), "%Y%m%dT%T", &now); 188 strftime(buf, sizeof(buf), "%Y%m%dT%T", now);
189 xmlnode_insert_data(xmlnode_new_child(query, "utc"), buf, -1); 189 xmlnode_insert_data(xmlnode_new_child(query, "utc"), buf, -1);
190 strftime(buf, sizeof(buf), "%Z", &now); 190 strftime(buf, sizeof(buf), "%Z", now);
191 xmlnode_insert_data(xmlnode_new_child(query, "tz"), buf, -1); 191 xmlnode_insert_data(xmlnode_new_child(query, "tz"), buf, -1);
192 strftime(buf, sizeof(buf), "%d %b %Y %T", &now); 192 strftime(buf, sizeof(buf), "%d %b %Y %T", now);
193 xmlnode_insert_data(xmlnode_new_child(query, "display"), buf, -1); 193 xmlnode_insert_data(xmlnode_new_child(query, "display"), buf, -1);
194 194
195 jabber_iq_send(iq); 195 jabber_iq_send(iq);
196 } 196 }
197 } 197 }