Changeset 85023c6
- Timestamp:
- 2007-07-15T15:47:34Z (17 years ago)
- Branches:
- master
- Children:
- 1baaef8
- Parents:
- 1ffb46f
- Location:
- protocols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/conference.c
r1ffb46f r85023c6 180 180 if( bud->ext_jid[i] == '=' || bud->ext_jid[i] == '@' ) 181 181 bud->ext_jid[i] = '_'; 182 183 /* Some program-specific restrictions. */ 184 imcb_clean_handle( ic, bud->ext_jid ); 182 185 } 183 186 bud->flags |= JBFLAG_IS_ANONYMOUS; -
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 } -
protocols/nogaim.h
r1ffb46f r85023c6 201 201 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u_int32_t flags, time_t sent_at ); 202 202 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags ); 203 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); 203 204 204 205 /* Groupchats */
Note: See TracChangeset
for help on using the changeset viewer.