Changeset 85023c6 for protocols/nogaim.c
- Timestamp:
- 2007-07-15T15:47:34Z (17 years ago)
- Branches:
- master
- Children:
- 1baaef8
- Parents:
- 1ffb46f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r1ffb46f r85023c6 99 99 } 100 100 101 102 101 struct prpl *find_protocol(const char *name) 103 102 { … … 1114 1113 ic->acc->prpl->rem_deny( ic, handle ); 1115 1114 } 1115 1116 void imcb_clean_handle( struct im_connection *ic, char *handle ) 1117 { 1118 /* Accepts a handle and does whatever is necessary to make it 1119 BitlBee-friendly. Currently this means removing everything 1120 outside 33-127 (ASCII printable excl spaces), @ (only one 1121 is allowed) and ! and : */ 1122 char out[strlen(handle)+1]; 1123 int s, d; 1124 1125 s = d = 0; 1126 while( handle[s] ) 1127 { 1128 if( handle[s] > ' ' && handle[s] != '!' && handle[s] != ':' && 1129 ( handle[s] & 0x80 ) == 0 ) 1130 { 1131 if( handle[s] == '@' ) 1132 { 1133 /* See if we got an @ already? */ 1134 out[d] = 0; 1135 if( strchr( out, '@' ) ) 1136 continue; 1137 } 1138 1139 out[d++] = handle[s]; 1140 } 1141 s ++; 1142 } 1143 out[d] = handle[s]; 1144 1145 strcpy( handle, out ); 1146 }
Note: See TracChangeset
for help on using the changeset viewer.