Mercurial > hg
comparison mcabber/src/jab_iq.c @ 977:5b01de4ac5e1
Cosmetic changes
author | Alexis Hildebrandt <afh [at] 2drop [dot] net> |
---|---|
date | Tue, 10 Oct 2006 20:15:06 +0200 |
parents | 1bdf0f1b16c0 |
children | c89e7993c4d9 |
comparison
equal
deleted
inserted
replaced
976:d530e5fb506a | 977:5b01de4ac5e1 |
---|---|
207 esub |= sub_pending; | 207 esub |= sub_pending; |
208 | 208 |
209 if (!name) | 209 if (!name) |
210 name = cleanalias; | 210 name = cleanalias; |
211 | 211 |
212 // Tricky... :-\ My guess is that if there is no '@', this is an agent | 212 // Tricky... :-\ My guess is that if there is no JID_DOMAIN_SEPARATOR, |
213 if (strchr(cleanalias, '@')) | 213 // this is an agent. |
214 if (strchr(cleanalias, JID_DOMAIN_SEPARATOR)) | |
214 roster_type = ROSTER_TYPE_USER; | 215 roster_type = ROSTER_TYPE_USER; |
215 else | 216 else |
216 roster_type = ROSTER_TYPE_AGENT; | 217 roster_type = ROSTER_TYPE_AGENT; |
217 | 218 |
218 roster_add_user(cleanalias, name, group, roster_type, esub); | 219 roster_add_user(cleanalias, name, group, roster_type, esub); |
251 | 252 |
252 buf = g_strdup_printf("Received IQ:version result from <%s>", bjid); | 253 buf = g_strdup_printf("Received IQ:version result from <%s>", bjid); |
253 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); | 254 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); |
254 | 255 |
255 // bjid should now really be the "bare JID", let's strip the resource | 256 // bjid should now really be the "bare JID", let's strip the resource |
256 p = strchr(bjid, '/'); | 257 p = strchr(bjid, JID_RESOURCE_SEPARATOR); |
257 if (p) *p = '\0'; | 258 if (p) *p = '\0'; |
258 | 259 |
259 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 260 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); |
260 g_free(buf); | 261 g_free(buf); |
261 | 262 |
327 | 328 |
328 buf = g_strdup_printf("Received IQ:time result from <%s>", bjid); | 329 buf = g_strdup_printf("Received IQ:time result from <%s>", bjid); |
329 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); | 330 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); |
330 | 331 |
331 // bjid should now really be the "bare JID", let's strip the resource | 332 // bjid should now really be the "bare JID", let's strip the resource |
332 p = strchr(bjid, '/'); | 333 p = strchr(bjid, JID_RESOURCE_SEPARATOR); |
333 if (p) *p = '\0'; | 334 if (p) *p = '\0'; |
334 | 335 |
335 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 336 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); |
336 g_free(buf); | 337 g_free(buf); |
337 | 338 |