Changes in irc.c [43462708:c84e31a]
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r43462708 rc84e31a 74 74 75 75 if( getnameinfo( (struct sockaddr *) &sock, socklen, buf, 76 NI_MAXHOST, NULL, -1, 0 ) == 0 )76 NI_MAXHOST, NULL, 0, 0 ) == 0 ) 77 77 { 78 78 irc->myhost = g_strdup( ipv6_unwrap( buf ) ); … … 85 85 86 86 if( getnameinfo( (struct sockaddr *)&sock, socklen, buf, 87 NI_MAXHOST, NULL, -1, 0 ) == 0 )87 NI_MAXHOST, NULL, 0, 0 ) == 0 ) 88 88 { 89 89 irc->host = g_strdup( ipv6_unwrap( buf ) ); … … 189 189 account_t *account; 190 190 user_t *user, *usertmp; 191 help_t *helpnode, *helpnodetmp;192 191 193 192 log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); … … 266 265 g_hash_table_destroy(irc->watches); 267 266 268 if (irc->help != NULL) {269 helpnode = irc->help;270 while (helpnode != NULL) {271 g_free(helpnode->string);272 273 helpnodetmp = helpnode;274 helpnode = helpnode->next;275 g_free(helpnodetmp);276 }277 }278 267 g_free(irc); 279 268 … … 325 314 if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) == -1 ) 326 315 { 316 /* GLib can do strange things if things are not in the expected charset, 317 so let's be a little bit paranoid here: */ 327 318 if( irc->status & USTATUS_LOGGED_IN ) 319 { 328 320 irc_usermsg( irc, "Error: Charset mismatch detected. The charset " 329 321 "setting is currently set to %s, so please make " … … 333 325 "`help set charset' for more information. Your " 334 326 "message was ignored.", cs ); 335 *conv = 0; 327 *conv = 0; 328 } 329 else 330 { 331 irc_write( irc, ":%s NOTICE AUTH :%s", irc->myhost, 332 "Warning: invalid (non-UTF8) characters received at login time." ); 333 334 strncpy( conv, lines[i], IRC_MAX_LINE ); 335 for( temp = conv; *temp; temp ++ ) 336 if( *temp & 0x80 ) 337 *temp = '?'; 338 } 336 339 } 337 340 lines[i] = conv;
Note: See TracChangeset
for help on using the changeset viewer.