Changeset 29ff5c2 for protocols/nogaim.c
- Timestamp:
- 2015-11-21T00:01:50Z (8 years ago)
- Parents:
- e4f08bf (diff), 8fdeaa5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
re4f08bf r29ff5c2 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 }
Note: See TracChangeset
for help on using the changeset viewer.