Changeset d6e2aa8
- Timestamp:
- 2015-11-09T12:21:46Z (9 years ago)
- Branches:
- master
- Children:
- 0d8a9bb0
- Parents:
- d63f37c
- Location:
- protocols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/conference.c
rd63f37c rd6e2aa8 302 302 } 303 303 } 304 305 /* Some program-specific restrictions. */306 imcb_clean_handle(ic, bud->ext_jid);307 304 } 308 305 bud->flags |= JBFLAG_IS_ANONYMOUS; -
protocols/nogaim.c
rd63f37c rd6e2aa8 735 735 } 736 736 737 /* Deprecated: using this function resulted in merging several handles accidentally 738 * Also the irc layer handles this decently nowadays */ 737 739 void imcb_clean_handle(struct im_connection *ic, char *handle) 738 740 { 739 /* Accepts a handle and does whatever is necessary to make it 740 BitlBee-friendly. Currently this means removing everything 741 outside 33-127 (ASCII printable excl spaces), @ (only one 742 is allowed) and ! and : */ 743 char out[strlen(handle) + 1]; 744 int s, d; 745 746 s = d = 0; 747 while (handle[s]) { 748 if (handle[s] > ' ' && handle[s] != '!' && handle[s] != ':' && 749 (handle[s] & 0x80) == 0) { 750 if (handle[s] == '@') { 751 /* See if we got an @ already? */ 752 out[d] = 0; 753 if (strchr(out, '@')) { 754 continue; 755 } 756 } 757 758 out[d++] = handle[s]; 759 } 760 s++; 761 } 762 out[d] = handle[s]; 763 764 strcpy(handle, out); 765 } 741 } -
protocols/nogaim.h
rd63f37c rd6e2aa8 328 328 G_MODULE_EXPORT void imcb_buddy_typing(struct im_connection *ic, const char *handle, guint32 flags); 329 329 G_MODULE_EXPORT struct bee_user *imcb_buddy_by_handle(struct im_connection *ic, const char *handle); 330 G_MODULE_EXPORT void imcb_clean_handle(struct im_connection *ic, char *handle); 330 331 G_GNUC_DEPRECATED G_MODULE_EXPORT void imcb_clean_handle(struct im_connection *ic, char *handle); 331 332 332 333 /* Actions, or whatever. */
Note: See TracChangeset
for help on using the changeset viewer.