-
=== modified file 'conf.c'
|
|
|
|
| 197 | 197 | if( ini == NULL ) return -1; |
| 198 | 198 | while( ini_read( ini ) ) |
| 199 | 199 | { |
| 200 | | if( g_strcasecmp( ini->section, "settings" ) == 0 ) |
| | 200 | if( g_ascii_strcasecmp( ini->section, "settings" ) == 0 ) |
| 201 | 201 | { |
| 202 | | if( g_strcasecmp( ini->key, "runmode" ) == 0 ) |
| | 202 | if( g_ascii_strcasecmp( ini->key, "runmode" ) == 0 ) |
| 203 | 203 | { |
| 204 | | if( g_strcasecmp( ini->value, "daemon" ) == 0 ) |
| | 204 | if( g_ascii_strcasecmp( ini->value, "daemon" ) == 0 ) |
| 205 | 205 | conf->runmode = RUNMODE_DAEMON; |
| 206 | | else if( g_strcasecmp( ini->value, "forkdaemon" ) == 0 ) |
| | 206 | else if( g_ascii_strcasecmp( ini->value, "forkdaemon" ) == 0 ) |
| 207 | 207 | conf->runmode = RUNMODE_FORKDAEMON; |
| 208 | 208 | else |
| 209 | 209 | conf->runmode = RUNMODE_INETD; |
| 210 | 210 | } |
| 211 | | else if( g_strcasecmp( ini->key, "pidfile" ) == 0 ) |
| | 211 | else if( g_ascii_strcasecmp( ini->key, "pidfile" ) == 0 ) |
| 212 | 212 | { |
| 213 | 213 | g_free( conf->pidfile ); |
| 214 | 214 | conf->pidfile = g_strdup( ini->value ); |
| 215 | 215 | } |
| 216 | | else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) |
| | 216 | else if( g_ascii_strcasecmp( ini->key, "daemoninterface" ) == 0 ) |
| 217 | 217 | { |
| 218 | 218 | g_free( conf->iface_in ); |
| 219 | 219 | conf->iface_in = g_strdup( ini->value ); |
| 220 | 220 | } |
| 221 | | else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) |
| | 221 | else if( g_ascii_strcasecmp( ini->key, "daemonport" ) == 0 ) |
| 222 | 222 | { |
| 223 | 223 | g_free( conf->port ); |
| 224 | 224 | conf->port = g_strdup( ini->value ); |
| 225 | 225 | } |
| 226 | | else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 ) |
| | 226 | else if( g_ascii_strcasecmp( ini->key, "clientinterface" ) == 0 ) |
| 227 | 227 | { |
| 228 | 228 | g_free( conf->iface_out ); |
| 229 | 229 | conf->iface_out = g_strdup( ini->value ); |
| 230 | 230 | } |
| 231 | | else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) |
| | 231 | else if( g_ascii_strcasecmp( ini->key, "authmode" ) == 0 ) |
| 232 | 232 | { |
| 233 | | if( g_strcasecmp( ini->value, "registered" ) == 0 ) |
| | 233 | if( g_ascii_strcasecmp( ini->value, "registered" ) == 0 ) |
| 234 | 234 | conf->authmode = AUTHMODE_REGISTERED; |
| 235 | | else if( g_strcasecmp( ini->value, "closed" ) == 0 ) |
| | 235 | else if( g_ascii_strcasecmp( ini->value, "closed" ) == 0 ) |
| 236 | 236 | conf->authmode = AUTHMODE_CLOSED; |
| 237 | 237 | else |
| 238 | 238 | conf->authmode = AUTHMODE_OPEN; |
| 239 | 239 | } |
| 240 | | else if( g_strcasecmp( ini->key, "authpassword" ) == 0 ) |
| | 240 | else if( g_ascii_strcasecmp( ini->key, "authpassword" ) == 0 ) |
| 241 | 241 | { |
| 242 | 242 | g_free( conf->auth_pass ); |
| 243 | 243 | conf->auth_pass = g_strdup( ini->value ); |
| 244 | 244 | } |
| 245 | | else if( g_strcasecmp( ini->key, "operpassword" ) == 0 ) |
| | 245 | else if( g_ascii_strcasecmp( ini->key, "operpassword" ) == 0 ) |
| 246 | 246 | { |
| 247 | 247 | g_free( conf->oper_pass ); |
| 248 | 248 | conf->oper_pass = g_strdup( ini->value ); |
| 249 | 249 | } |
| 250 | | else if( g_strcasecmp( ini->key, "hostname" ) == 0 ) |
| | 250 | else if( g_ascii_strcasecmp( ini->key, "hostname" ) == 0 ) |
| 251 | 251 | { |
| 252 | 252 | g_free( conf->hostname ); |
| 253 | 253 | conf->hostname = g_strdup( ini->value ); |
| 254 | 254 | } |
| 255 | | else if( g_strcasecmp( ini->key, "configdir" ) == 0 ) |
| | 255 | else if( g_ascii_strcasecmp( ini->key, "configdir" ) == 0 ) |
| 256 | 256 | { |
| 257 | 257 | g_free( conf->configdir ); |
| 258 | 258 | conf->configdir = g_strdup( ini->value ); |
| 259 | 259 | } |
| 260 | | else if( g_strcasecmp( ini->key, "motdfile" ) == 0 ) |
| | 260 | else if( g_ascii_strcasecmp( ini->key, "motdfile" ) == 0 ) |
| 261 | 261 | { |
| 262 | 262 | g_free( conf->motdfile ); |
| 263 | 263 | conf->motdfile = g_strdup( ini->value ); |
| 264 | 264 | } |
| 265 | | else if( g_strcasecmp( ini->key, "account_storage" ) == 0 ) |
| | 265 | else if( g_ascii_strcasecmp( ini->key, "account_storage" ) == 0 ) |
| 266 | 266 | { |
| 267 | 267 | g_free( conf->primary_storage ); |
| 268 | 268 | conf->primary_storage = g_strdup( ini->value ); |
| 269 | 269 | } |
| 270 | | else if( g_strcasecmp( ini->key, "account_storage_migrate" ) == 0 ) |
| | 270 | else if( g_ascii_strcasecmp( ini->key, "account_storage_migrate" ) == 0 ) |
| 271 | 271 | { |
| 272 | 272 | g_strfreev( conf->migrate_storage ); |
| 273 | 273 | conf->migrate_storage = g_strsplit_set( ini->value, " \t,;", -1 ); |
| 274 | 274 | } |
| 275 | | else if( g_strcasecmp( ini->key, "pinginterval" ) == 0 ) |
| | 275 | else if( g_ascii_strcasecmp( ini->key, "pinginterval" ) == 0 ) |
| 276 | 276 | { |
| 277 | 277 | if( sscanf( ini->value, "%d", &i ) != 1 ) |
| 278 | 278 | { |
| … |
… |
|
| 281 | 281 | } |
| 282 | 282 | conf->ping_interval = i; |
| 283 | 283 | } |
| 284 | | else if( g_strcasecmp( ini->key, "pingtimeout" ) == 0 ) |
| | 284 | else if( g_ascii_strcasecmp( ini->key, "pingtimeout" ) == 0 ) |
| 285 | 285 | { |
| 286 | 286 | if( sscanf( ini->value, "%d", &i ) != 1 ) |
| 287 | 287 | { |
| … |
… |
|
| 290 | 290 | } |
| 291 | 291 | conf->ping_timeout = i; |
| 292 | 292 | } |
| 293 | | else if( g_strcasecmp( ini->key, "proxy" ) == 0 ) |
| | 293 | else if( g_ascii_strcasecmp( ini->key, "proxy" ) == 0 ) |
| 294 | 294 | { |
| 295 | 295 | url_t *url = g_new0( url_t, 1 ); |
| 296 | 296 | |
| … |
… |
|
| 314 | 314 | |
| 315 | 315 | g_free( url ); |
| 316 | 316 | } |
| 317 | | else if( g_strcasecmp( ini->key, "user" ) == 0 ) |
| | 317 | else if( g_ascii_strcasecmp( ini->key, "user" ) == 0 ) |
| 318 | 318 | { |
| 319 | 319 | g_free( conf->user ); |
| 320 | 320 | conf->user = g_strdup( ini->value ); |
| 321 | 321 | } |
| 322 | | else if( g_strcasecmp( ini->key, "ft_max_size" ) == 0 ) |
| | 322 | else if( g_ascii_strcasecmp( ini->key, "ft_max_size" ) == 0 ) |
| 323 | 323 | { |
| 324 | 324 | size_t ft_max_size; |
| 325 | 325 | if( sscanf( ini->value, "%zu", &ft_max_size ) != 1 ) |
| … |
… |
|
| 329 | 329 | } |
| 330 | 330 | conf->ft_max_size = ft_max_size; |
| 331 | 331 | } |
| 332 | | else if( g_strcasecmp( ini->key, "ft_max_kbps" ) == 0 ) |
| | 332 | else if( g_ascii_strcasecmp( ini->key, "ft_max_kbps" ) == 0 ) |
| 333 | 333 | { |
| 334 | 334 | if( sscanf( ini->value, "%d", &i ) != 1 ) |
| 335 | 335 | { |
| … |
… |
|
| 338 | 338 | } |
| 339 | 339 | conf->ft_max_kbps = i; |
| 340 | 340 | } |
| 341 | | else if( g_strcasecmp( ini->key, "ft_listen" ) == 0 ) |
| | 341 | else if( g_ascii_strcasecmp( ini->key, "ft_listen" ) == 0 ) |
| 342 | 342 | { |
| 343 | 343 | g_free( conf->ft_listen ); |
| 344 | 344 | conf->ft_listen = g_strdup( ini->value ); |
| 345 | 345 | } |
| 346 | | else if( g_strcasecmp( ini->key, "protocols" ) == 0 ) |
| | 346 | else if( g_ascii_strcasecmp( ini->key, "protocols" ) == 0 ) |
| 347 | 347 | { |
| 348 | 348 | g_strfreev( conf->protocols ); |
| 349 | 349 | conf->protocols = g_strsplit_set( ini->value, " \t,;", -1 ); |
| 350 | 350 | } |
| 351 | | else if( g_strcasecmp( ini->key, "cafile" ) == 0 ) |
| | 351 | else if( g_ascii_strcasecmp( ini->key, "cafile" ) == 0 ) |
| 352 | 352 | { |
| 353 | 353 | g_free( conf->cafile ); |
| 354 | 354 | conf->cafile = g_strdup( ini->value ); |
| … |
… |
|
| 360 | 360 | /* For now just ignore unknown keys... */ |
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | | else if( g_strcasecmp( ini->section, "defaults" ) != 0 ) |
| | 363 | else if( g_ascii_strcasecmp( ini->section, "defaults" ) != 0 ) |
| 364 | 364 | { |
| 365 | 365 | fprintf( stderr, "Error: Unknown section [%s] in configuration file (line %d). " |
| 366 | 366 | "BitlBee configuration must be put in a [settings] section!\n", ini->section, ini->line ); |
| … |
… |
|
| 380 | 380 | if( ini == NULL ) return; |
| 381 | 381 | while( ini_read( ini ) ) |
| 382 | 382 | { |
| 383 | | if( g_strcasecmp( ini->section, "defaults" ) == 0 ) |
| | 383 | if( g_ascii_strcasecmp( ini->section, "defaults" ) == 0 ) |
| 384 | 384 | { |
| 385 | 385 | set_t *s = set_find( &irc->b->set, ini->key ); |
| 386 | 386 | |
-
=== modified file 'help.c'
|
|
|
|
| 134 | 134 | |
| 135 | 135 | for( h = *help; h; h = h->next ) |
| 136 | 136 | { |
| 137 | | if( h->title != NULL && g_strcasecmp( h->title, title ) == 0 ) |
| | 137 | if( h->title != NULL && g_ascii_strcasecmp( h->title, title ) == 0 ) |
| 138 | 138 | break; |
| 139 | 139 | } |
| 140 | 140 | if( h && h->length > 0 ) |
| … |
… |
|
| 177 | 177 | |
| 178 | 178 | for( h = *help; h; h = h->next ) |
| 179 | 179 | { |
| 180 | | if( g_strcasecmp( h->title, title ) == 0 ) |
| | 180 | if( g_ascii_strcasecmp( h->title, title ) == 0 ) |
| 181 | 181 | return 0; |
| 182 | 182 | |
| 183 | 183 | l = h; |
-
=== modified file 'ipc.c'
|
|
|
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /* CLIENT == On initial connects, HELLO is after /RESTARTs. */ |
| 64 | | if( g_strcasecmp( cmd[0], "CLIENT" ) == 0 ) |
| | 64 | if( g_ascii_strcasecmp( cmd[0], "CLIENT" ) == 0 ) |
| 65 | 65 | ipc_to_children_str( "OPERMSG :Client connecting (PID=%d): %s@%s (%s)\r\n", |
| 66 | 66 | (int) ( child ? child->pid : -1 ), cmd[2], cmd[1], cmd[3] ); |
| 67 | 67 | } |
| … |
… |
|
| 522 | 522 | return; |
| 523 | 523 | |
| 524 | 524 | for( i = 0; commands[i].command; i ++ ) |
| 525 | | if( g_strcasecmp( commands[i].command, cmd[0] ) == 0 ) |
| | 525 | if( g_ascii_strcasecmp( commands[i].command, cmd[0] ) == 0 ) |
| 526 | 526 | { |
| 527 | 527 | /* There is no typo in this line: */ |
| 528 | 528 | for( j = 1; cmd[j]; j ++ ); j --; |
-
=== modified file 'irc.c'
|
|
|
|
| 894 | 894 | gsize test_bytes = 0; |
| 895 | 895 | GIConv ic, oc; |
| 896 | 896 | |
| 897 | | if( g_strcasecmp( value, "none" ) == 0 ) |
| | 897 | if( g_ascii_strcasecmp( value, "none" ) == 0 ) |
| 898 | 898 | value = g_strdup( "utf-8" ); |
| 899 | 899 | |
| 900 | 900 | if( ( oc = g_iconv_open( value, "utf-8" ) ) == (GIConv) -1 ) |
-
=== modified file 'irc_channel.c'
|
|
|
|
| 587 | 587 | else |
| 588 | 588 | ic->last_target = iu; |
| 589 | 589 | } |
| 590 | | else if( g_strcasecmp( set_getstr( &irc->b->set, "default_target" ), "last" ) == 0 && |
| | 590 | else if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "default_target" ), "last" ) == 0 && |
| 591 | 591 | ic->last_target && g_slist_find( irc->users, ic->last_target ) ) |
| 592 | 592 | iu = ic->last_target; |
| 593 | 593 | else |
-
=== modified file 'irc_commands.c'
|
|
|
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /* Don't treat CTCP actions as real CTCPs, just convert them right now. */ |
| 338 | | if( g_strncasecmp( cmd[2], "\001ACTION", 7 ) == 0 ) |
| | 338 | if( g_ascii_strncasecmp( cmd[2], "\001ACTION", 7 ) == 0 ) |
| 339 | 339 | { |
| 340 | 340 | cmd[2] += 4; |
| 341 | 341 | memcpy( cmd[2], "/me", 3 ); |
| … |
… |
|
| 762 | 762 | return; |
| 763 | 763 | |
| 764 | 764 | for( i = 0; irc_commands[i].command; i++ ) |
| 765 | | if( g_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 ) |
| | 765 | if( g_ascii_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 ) |
| 766 | 766 | { |
| 767 | 767 | /* There should be no typo in the next line: */ |
| 768 | 768 | for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --; |
-
=== modified file 'irc_im.c'
|
|
|
|
| 237 | 237 | } |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | | if( ( g_strcasecmp( set_getstr( &bee->set, "strip_html" ), "always" ) == 0 ) || |
| | 240 | if( ( g_ascii_strcasecmp( set_getstr( &bee->set, "strip_html" ), "always" ) == 0 ) || |
| 241 | 241 | ( ( bu->ic->flags & OPT_DOES_HTML ) && set_getbool( &bee->set, "strip_html" ) ) ) |
| 242 | 242 | { |
| 243 | 243 | char *s = g_strdup( msg ); |
| … |
… |
|
| 479 | 479 | |
| 480 | 480 | static gboolean bee_irc_user_ctcp( irc_user_t *iu, char *const *ctcp ) |
| 481 | 481 | { |
| 482 | | if( ctcp[1] && g_strcasecmp( ctcp[0], "DCC" ) == 0 |
| 483 | | && g_strcasecmp( ctcp[1], "SEND" ) == 0 ) |
| | 482 | if( ctcp[1] && g_ascii_strcasecmp( ctcp[0], "DCC" ) == 0 |
| | 483 | && g_ascii_strcasecmp( ctcp[1], "SEND" ) == 0 ) |
| 484 | 484 | { |
| 485 | 485 | if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->transfer_request ) |
| 486 | 486 | { |
| … |
… |
|
| 491 | 491 | return TRUE; |
| 492 | 492 | } |
| 493 | 493 | } |
| 494 | | else if( g_strcasecmp( ctcp[0], "TYPING" ) == 0 ) |
| | 494 | else if( g_ascii_strcasecmp( ctcp[0], "TYPING" ) == 0 ) |
| 495 | 495 | { |
| 496 | 496 | if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->send_typing && ctcp[1] ) |
| 497 | 497 | { |
| … |
… |
|
| 505 | 505 | return TRUE; |
| 506 | 506 | } |
| 507 | 507 | } |
| 508 | | else if( g_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu ) |
| | 508 | else if( g_ascii_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu ) |
| 509 | 509 | { |
| 510 | 510 | GString *supp = g_string_new( "Supported CTCPs:" ); |
| 511 | 511 | GList *l; |
-
=== modified file 'irc_send.c'
|
|
|
|
| 338 | 338 | } |
| 339 | 339 | if( *s == 0 || *s == '\n' ) |
| 340 | 340 | { |
| 341 | | if( g_strncasecmp( line, "/me ", 4 ) == 0 && ( !prefix || !*prefix ) && |
| 342 | | g_strcasecmp( type, "PRIVMSG" ) == 0 ) |
| | 341 | if( g_ascii_strncasecmp( line, "/me ", 4 ) == 0 && ( !prefix || !*prefix ) && |
| | 342 | g_ascii_strcasecmp( type, "PRIVMSG" ) == 0 ) |
| 343 | 343 | { |
| 344 | 344 | strcpy( raw_msg, "\001ACTION " ); |
| 345 | 345 | strncat( raw_msg, line + 4, s - line - 4 ); |
-
=== modified file 'irc_user.c'
|
|
|
|
| 229 | 229 | |
| 230 | 230 | static gboolean root_ctcp( irc_user_t *iu, char * const *ctcp ) |
| 231 | 231 | { |
| 232 | | if( g_strcasecmp( ctcp[0], "VERSION" ) == 0 ) |
| | 232 | if( g_ascii_strcasecmp( ctcp[0], "VERSION" ) == 0 ) |
| 233 | 233 | { |
| 234 | 234 | irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001", |
| 235 | 235 | ctcp[0], PACKAGE " " BITLBEE_VERSION " " ARCH "/" CPU ); |
| 236 | 236 | } |
| 237 | | else if( g_strcasecmp( ctcp[0], "PING" ) == 0 ) |
| | 237 | else if( g_ascii_strcasecmp( ctcp[0], "PING" ) == 0 ) |
| 238 | 238 | { |
| 239 | 239 | irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001", |
| 240 | 240 | ctcp[0], ctcp[1] ? : "" ); |
-
=== modified file 'lib/misc.c'
|
|
|
|
| 176 | 176 | taglen = in - cs - 1; /* not <0 because the above loop runs at least once */ |
| 177 | 177 | if( *in ) |
| 178 | 178 | { |
| 179 | | if( g_strncasecmp( cs+1, "b", taglen) == 0 ) |
| 180 | | *(s++) = '\x02'; |
| 181 | | else if( g_strncasecmp( cs+1, "/b", taglen) == 0 ) |
| 182 | | *(s++) = '\x02'; |
| 183 | | else if( g_strncasecmp( cs+1, "i", taglen) == 0 ) |
| 184 | | *(s++) = '\x1f'; |
| 185 | | else if( g_strncasecmp( cs+1, "/i", taglen) == 0 ) |
| 186 | | *(s++) = '\x1f'; |
| 187 | | else if( g_strncasecmp( cs+1, "br", taglen) == 0 ) |
| | 179 | if( g_ascii_strncasecmp( cs+1, "b", taglen) == 0 ) |
| | 180 | *(s++) = '\x02'; |
| | 181 | else if( g_ascii_strncasecmp( cs+1, "/b", taglen) == 0 ) |
| | 182 | *(s++) = '\x02'; |
| | 183 | else if( g_ascii_strncasecmp( cs+1, "i", taglen) == 0 ) |
| | 184 | *(s++) = '\x1f'; |
| | 185 | else if( g_ascii_strncasecmp( cs+1, "/i", taglen) == 0 ) |
| | 186 | *(s++) = '\x1f'; |
| | 187 | else if( g_ascii_strncasecmp( cs+1, "br", taglen) == 0 ) |
| 188 | 188 | *(s++) = '\n'; |
| 189 | 189 | in ++; |
| 190 | 190 | } |
| … |
… |
|
| 204 | 204 | matched = 0; |
| 205 | 205 | |
| 206 | 206 | for( i = 0; *ent[i].code; i ++ ) |
| 207 | | if( g_strncasecmp( ent[i].code, cs, strlen( ent[i].code ) ) == 0 ) |
| | 207 | if( g_ascii_strncasecmp( ent[i].code, cs, strlen( ent[i].code ) ) == 0 ) |
| 208 | 208 | { |
| 209 | 209 | int j; |
| 210 | 210 | |
| … |
… |
|
| 366 | 366 | { |
| 367 | 367 | int i; |
| 368 | 368 | |
| 369 | | if( g_strncasecmp( src, "::ffff:", 7 ) != 0 ) |
| | 369 | if( g_ascii_strncasecmp( src, "::ffff:", 7 ) != 0 ) |
| 370 | 370 | return src; |
| 371 | 371 | |
| 372 | 372 | for( i = 7; src[i]; i ++ ) |
| … |
… |
|
| 485 | 485 | if( *value == 0 ) |
| 486 | 486 | return 0; |
| 487 | 487 | |
| 488 | | if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) ) |
| | 488 | if( ( g_ascii_strcasecmp( value, "true" ) == 0 ) || ( g_ascii_strcasecmp( value, "yes" ) == 0 ) || ( g_ascii_strcasecmp( value, "on" ) == 0 ) ) |
| 489 | 489 | return 1; |
| 490 | | if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) ) |
| | 490 | if( ( g_ascii_strcasecmp( value, "false" ) == 0 ) || ( g_ascii_strcasecmp( value, "no" ) == 0 ) || ( g_ascii_strcasecmp( value, "off" ) == 0 ) ) |
| 491 | 491 | return 1; |
| 492 | 492 | |
| 493 | 493 | while( *value ) |
| … |
… |
|
| 503 | 503 | { |
| 504 | 504 | int i; |
| 505 | 505 | |
| 506 | | if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) ) |
| | 506 | if( ( g_ascii_strcasecmp( value, "true" ) == 0 ) || ( g_ascii_strcasecmp( value, "yes" ) == 0 ) || ( g_ascii_strcasecmp( value, "on" ) == 0 ) ) |
| 507 | 507 | return 1; |
| 508 | | if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) ) |
| | 508 | if( ( g_ascii_strcasecmp( value, "false" ) == 0 ) || ( g_ascii_strcasecmp( value, "no" ) == 0 ) || ( g_ascii_strcasecmp( value, "off" ) == 0 ) ) |
| 509 | 509 | return 0; |
| 510 | 510 | |
| 511 | 511 | if( sscanf( value, "%d", &i ) == 1 ) |
| … |
… |
|
| 744 | 744 | while( ( i + hlen ) < len ) |
| 745 | 745 | { |
| 746 | 746 | /* Maybe this is a bit over-commented, but I just hate this part... */ |
| 747 | | if( g_strncasecmp( text + i, header, hlen ) == 0 ) |
| | 747 | if( g_ascii_strncasecmp( text + i, header, hlen ) == 0 ) |
| 748 | 748 | { |
| 749 | 749 | /* Skip to the (probable) end of the header */ |
| 750 | 750 | i += hlen; |
-
=== modified file 'lib/url.c'
|
|
|
|
| 42 | 42 | } |
| 43 | 43 | else |
| 44 | 44 | { |
| 45 | | if( g_strncasecmp( set_url, "http", i - set_url ) == 0 ) |
| | 45 | if( g_ascii_strncasecmp( set_url, "http", i - set_url ) == 0 ) |
| 46 | 46 | url->proto = PROTO_HTTP; |
| 47 | | else if( g_strncasecmp( set_url, "https", i - set_url ) == 0 ) |
| | 47 | else if( g_ascii_strncasecmp( set_url, "https", i - set_url ) == 0 ) |
| 48 | 48 | url->proto = PROTO_HTTPS; |
| 49 | | else if( g_strncasecmp( set_url, "socks4", i - set_url ) == 0 ) |
| | 49 | else if( g_ascii_strncasecmp( set_url, "socks4", i - set_url ) == 0 ) |
| 50 | 50 | url->proto = PROTO_SOCKS4; |
| 51 | | else if( g_strncasecmp( set_url, "socks5", i - set_url ) == 0 ) |
| | 51 | else if( g_ascii_strncasecmp( set_url, "socks5", i - set_url ) == 0 ) |
| 52 | 52 | url->proto = PROTO_SOCKS5; |
| 53 | 53 | else |
| 54 | 54 | return 0; |
-
=== modified file 'lib/xmltree.c'
|
|
|
|
| 29 | 29 | |
| 30 | 30 | #include "xmltree.h" |
| 31 | 31 | |
| 32 | | #define g_strcasecmp g_ascii_strcasecmp |
| 33 | | #define g_strncasecmp g_ascii_strncasecmp |
| | 32 | #define g_ascii_strcasecmp g_ascii_strcasecmp |
| | 33 | #define g_ascii_strncasecmp g_ascii_strncasecmp |
| 34 | 34 | |
| 35 | 35 | static void xt_start_element( GMarkupParseContext *ctx, const gchar *element_name, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error ) |
| 36 | 36 | { |
| … |
… |
|
| 183 | 183 | /* If handler.name == NULL it means it should always match. */ |
| 184 | 184 | if( ( xt->handlers[i].name == NULL || |
| 185 | 185 | /* If it's not, compare. There should always be a name. */ |
| 186 | | g_strcasecmp( xt->handlers[i].name, node->name ) == 0 ) && |
| | 186 | g_ascii_strcasecmp( xt->handlers[i].name, node->name ) == 0 ) && |
| 187 | 187 | /* If handler.parent == NULL, it's a match. */ |
| 188 | 188 | ( xt->handlers[i].parent == NULL || |
| 189 | 189 | /* If there's a parent node, see if the name matches. */ |
| 190 | | ( node->parent ? g_strcasecmp( xt->handlers[i].parent, node->parent->name ) == 0 : |
| | 190 | ( node->parent ? g_ascii_strcasecmp( xt->handlers[i].parent, node->parent->name ) == 0 : |
| 191 | 191 | /* If there's no parent, the handler should mention <root> as a parent. */ |
| 192 | 192 | strcmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) ) |
| 193 | 193 | { |
| … |
… |
|
| 476 | 476 | { |
| 477 | 477 | char *colon; |
| 478 | 478 | |
| 479 | | if( g_strcasecmp( node->name, name ) == 0 || |
| | 479 | if( g_ascii_strcasecmp( node->name, name ) == 0 || |
| 480 | 480 | ( ( colon = strchr( node->name, ':' ) ) && |
| 481 | | g_strcasecmp( colon + 1, name ) == 0 ) ) |
| | 481 | g_ascii_strcasecmp( colon + 1, name ) == 0 ) ) |
| 482 | 482 | break; |
| 483 | 483 | |
| 484 | 484 | node = node->next; |
| … |
… |
|
| 512 | 512 | |
| 513 | 513 | while( node ) |
| 514 | 514 | { |
| 515 | | if( g_strncasecmp( node->name, name, n ) == 0 || |
| | 515 | if( g_ascii_strncasecmp( node->name, name, n ) == 0 || |
| 516 | 516 | ( ( colon = strchr( node->name, ':' ) ) && |
| 517 | | g_strncasecmp( colon + 1, name, n ) == 0 ) ) |
| | 517 | g_ascii_strncasecmp( colon + 1, name, n ) == 0 ) ) |
| 518 | 518 | break; |
| 519 | 519 | |
| 520 | 520 | node = node->next; |
| … |
… |
|
| 536 | 536 | return NULL; |
| 537 | 537 | |
| 538 | 538 | for( i = 0; node->attr[i].key; i ++ ) |
| 539 | | if( g_strcasecmp( node->attr[i].key, key ) == 0 ) |
| | 539 | if( g_ascii_strcasecmp( node->attr[i].key, key ) == 0 ) |
| 540 | 540 | break; |
| 541 | 541 | |
| 542 | 542 | /* This is an awful hack that only takes care of namespace prefixes |
-
=== modified file 'nick.c'
|
|
|
|
| 143 | 143 | while( isdigit( *fmt ) ) |
| 144 | 144 | len = len * 10 + ( *(fmt++) - '0' ); |
| 145 | 145 | } |
| 146 | | else if( g_strncasecmp( fmt, "nick", 4 ) == 0 ) |
| | 146 | else if( g_ascii_strncasecmp( fmt, "nick", 4 ) == 0 ) |
| 147 | 147 | { |
| 148 | 148 | part = bu->nick ? : bu->handle; |
| 149 | 149 | fmt += 4; |
| 150 | 150 | ok |= TRUE; |
| 151 | 151 | break; |
| 152 | 152 | } |
| 153 | | else if( g_strncasecmp( fmt, "handle", 6 ) == 0 ) |
| | 153 | else if( g_ascii_strncasecmp( fmt, "handle", 6 ) == 0 ) |
| 154 | 154 | { |
| 155 | 155 | part = bu->handle; |
| 156 | 156 | fmt += 6; |
| 157 | 157 | ok |= TRUE; |
| 158 | 158 | break; |
| 159 | 159 | } |
| 160 | | else if( g_strncasecmp( fmt, "full_name", 9 ) == 0 ) |
| | 160 | else if( g_ascii_strncasecmp( fmt, "full_name", 9 ) == 0 ) |
| 161 | 161 | { |
| 162 | 162 | part = bu->fullname; |
| 163 | 163 | fmt += 9; |
| 164 | 164 | ok |= part && *part; |
| 165 | 165 | break; |
| 166 | 166 | } |
| 167 | | else if( g_strncasecmp( fmt, "first_name", 10 ) == 0 ) |
| | 167 | else if( g_ascii_strncasecmp( fmt, "first_name", 10 ) == 0 ) |
| 168 | 168 | { |
| 169 | 169 | part = bu->fullname; |
| 170 | 170 | fmt += 10; |
| … |
… |
|
| 172 | 172 | chop = ' '; |
| 173 | 173 | break; |
| 174 | 174 | } |
| 175 | | else if( g_strncasecmp( fmt, "group", 5 ) == 0 ) |
| | 175 | else if( g_ascii_strncasecmp( fmt, "group", 5 ) == 0 ) |
| 176 | 176 | { |
| 177 | 177 | part = bu->group ? bu->group->name : NULL; |
| 178 | 178 | fmt += 5; |
| 179 | 179 | break; |
| 180 | 180 | } |
| 181 | | else if( g_strncasecmp( fmt, "account", 7 ) == 0 ) |
| | 181 | else if( g_ascii_strncasecmp( fmt, "account", 7 ) == 0 ) |
| 182 | 182 | { |
| 183 | 183 | part = bu->ic->acc->tag; |
| 184 | 184 | fmt += 7; |
-
=== modified file 'otr.c'
|
|
|
|
| 425 | 425 | color=5; /* red */ |
| 426 | 426 | |
| 427 | 427 | /* in a query window, keep "/me " uncolored at the beginning */ |
| 428 | | if(g_strncasecmp(msg, "/me ", 4) == 0 |
| | 428 | if(g_ascii_strncasecmp(msg, "/me ", 4) == 0 |
| 429 | 429 | && irc_user_msgdest(iu) == irc->user->nick) { |
| 430 | 430 | msg += 4; /* skip */ |
| 431 | 431 | pre = "/me "; |
| … |
… |
|
| 472 | 472 | /* consider OTR plaintext to be HTML if otr_does_html is set */ |
| 473 | 473 | if(ctx && ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED && |
| 474 | 474 | set_getbool(&ic->bee->set, "otr_does_html") && |
| 475 | | (g_strncasecmp(msg, "<html>", 6) != 0)) { |
| | 475 | (g_ascii_strncasecmp(msg, "<html>", 6) != 0)) { |
| 476 | 476 | emsg = escape_html(msg); |
| 477 | 477 | } |
| 478 | 478 | |
-
=== modified file 'protocols/account.c'
|
|
|
|
| 266 | 266 | |
| 267 | 267 | for( a = bee->accounts; a; a = a->next ) |
| 268 | 268 | { |
| 269 | | if( g_strcasecmp( id, a->prpl->name ) == 0 ) |
| | 269 | if( g_ascii_strcasecmp( id, a->prpl->name ) == 0 ) |
| 270 | 270 | { |
| 271 | 271 | if( !ret ) |
| 272 | 272 | ret = a; |
| … |
… |
|
| 290 | 290 | account_t *a; |
| 291 | 291 | |
| 292 | 292 | for( a = bee->accounts; a; a = a->next ) |
| 293 | | if( a->tag && g_strcasecmp( tag, a->tag ) == 0 ) |
| | 293 | if( a->tag && g_ascii_strcasecmp( tag, a->tag ) == 0 ) |
| 294 | 294 | return a; |
| 295 | 295 | |
| 296 | 296 | return NULL; |
-
=== modified file 'protocols/bee_chat.c'
|
|
|
|
| 87 | 87 | char *s; |
| 88 | 88 | |
| 89 | 89 | /* Gaim sends own messages through this too. IRC doesn't want this, so kill them */ |
| 90 | | if( g_strcasecmp( who, ic->acc->user ) == 0 ) |
| | 90 | if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 ) |
| 91 | 91 | return; |
| 92 | 92 | |
| 93 | 93 | bu = bee_user_by_handle( bee, ic, who ); |
| 94 | 94 | |
| 95 | 95 | s = set_getstr( &ic->bee->set, "strip_html" ); |
| 96 | | if( ( g_strcasecmp( s, "always" ) == 0 ) || |
| | 96 | if( ( g_ascii_strcasecmp( s, "always" ) == 0 ) || |
| 97 | 97 | ( ( ic->flags & OPT_DOES_HTML ) && s ) ) |
| 98 | 98 | strip_html( msg ); |
| 99 | 99 | |
| … |
… |
|
| 132 | 132 | |
| 133 | 133 | if( who == NULL) |
| 134 | 134 | bu = NULL; |
| 135 | | else if( g_strcasecmp( who, ic->acc->user ) == 0 ) |
| | 135 | else if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 ) |
| 136 | 136 | bu = bee->user; |
| 137 | 137 | else |
| 138 | 138 | bu = bee_user_by_handle( bee, ic, who ); |
| 139 | 139 | |
| 140 | | if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) || |
| | 140 | if( ( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) || |
| 141 | 141 | ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) ) |
| 142 | 142 | strip_html( topic ); |
| 143 | 143 | |
| … |
… |
|
| 182 | 182 | imcb_log( ic, "User %s removed from conversation %p (%s)", handle, c, reason ? reason : "" ); |
| 183 | 183 | |
| 184 | 184 | /* It might be yourself! */ |
| 185 | | if( g_strcasecmp( handle, ic->acc->user ) == 0 ) |
| | 185 | if( g_ascii_strcasecmp( handle, ic->acc->user ) == 0 ) |
| 186 | 186 | { |
| 187 | 187 | if( c->joined == 0 ) |
| 188 | 188 | return; |
| … |
… |
|
| 204 | 204 | struct im_connection *ic = c->ic; |
| 205 | 205 | char *buf = NULL; |
| 206 | 206 | |
| 207 | | if( ( ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| | 207 | if( ( ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| 208 | 208 | { |
| 209 | 209 | buf = escape_html( msg ); |
| 210 | 210 | msg = buf; |
-
=== modified file 'protocols/bee_user.c'
|
|
|
|
| 93 | 93 | char *buf = NULL; |
| 94 | 94 | int st; |
| 95 | 95 | |
| 96 | | if( ( bu->ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| | 96 | if( ( bu->ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| 97 | 97 | { |
| 98 | 98 | buf = escape_html( msg ); |
| 99 | 99 | msg = buf; |
| … |
… |
|
| 164 | 164 | |
| 165 | 165 | if( !( bu = bee_user_by_handle( bee, ic, handle ) ) ) |
| 166 | 166 | { |
| 167 | | if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 ) |
| | 167 | if( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 ) |
| 168 | 168 | { |
| 169 | 169 | bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL ); |
| 170 | 170 | } |
| 171 | 171 | else |
| 172 | 172 | { |
| 173 | | if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "ignore" ) != 0 ) |
| | 173 | if( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "ignore" ) != 0 ) |
| 174 | 174 | { |
| 175 | 175 | imcb_log( ic, "imcb_buddy_status() for unknown handle %s:\n" |
| 176 | 176 | "flags = %d, state = %s, message = %s", handle, flags, |
| … |
… |
|
| 254 | 254 | { |
| 255 | 255 | char *h = set_getstr( &bee->set, "handle_unknown" ); |
| 256 | 256 | |
| 257 | | if( g_strcasecmp( h, "ignore" ) == 0 ) |
| | 257 | if( g_ascii_strcasecmp( h, "ignore" ) == 0 ) |
| 258 | 258 | { |
| 259 | 259 | return; |
| 260 | 260 | } |
| 261 | | else if( g_strncasecmp( h, "add", 3 ) == 0 ) |
| | 261 | else if( g_ascii_strncasecmp( h, "add", 3 ) == 0 ) |
| 262 | 262 | { |
| 263 | 263 | bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL ); |
| 264 | 264 | } |
-
=== modified file 'protocols/jabber/io.c'
|
|
|
|
| 204 | 204 | this by hand. :-( */ |
| 205 | 205 | if( !( jd->flags & JFLAG_STREAM_STARTED ) && jd->xt && jd->xt->root ) |
| 206 | 206 | { |
| 207 | | if( g_strcasecmp( jd->xt->root->name, "stream:stream" ) == 0 ) |
| | 207 | if( g_ascii_strcasecmp( jd->xt->root->name, "stream:stream" ) == 0 ) |
| 208 | 208 | { |
| 209 | 209 | jd->flags |= JFLAG_STREAM_STARTED; |
| 210 | 210 | |
| … |
… |
|
| 326 | 326 | struct xt_node *c, *reply; |
| 327 | 327 | int trytls; |
| 328 | 328 | |
| 329 | | trytls = g_strcasecmp( set_getstr( &ic->acc->set, "tls" ), "try" ) == 0; |
| | 329 | trytls = g_ascii_strcasecmp( set_getstr( &ic->acc->set, "tls" ), "try" ) == 0; |
| 330 | 330 | c = xt_find_node( node->children, "starttls" ); |
| 331 | 331 | if( c && !jd->ssl ) |
| 332 | 332 | { |
-
=== modified file 'protocols/jabber/jabber.c'
|
|
|
|
| 333 | 333 | char *s; |
| 334 | 334 | int st; |
| 335 | 335 | |
| 336 | | if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| | 336 | if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| 337 | 337 | return jabber_write( ic, message, strlen( message ) ); |
| 338 | 338 | |
| 339 | | if( g_strcasecmp( who, JABBER_OAUTH_HANDLE ) == 0 && |
| | 339 | if( g_ascii_strcasecmp( who, JABBER_OAUTH_HANDLE ) == 0 && |
| 340 | 340 | !( jd->flags & OPT_LOGGED_IN ) && jd->fd == -1 ) |
| 341 | 341 | { |
| 342 | 342 | if( sasl_oauth2_get_refresh_token( ic, message ) ) |
| … |
… |
|
| 437 | 437 | { |
| 438 | 438 | struct jabber_data *jd = ic->proto_data; |
| 439 | 439 | |
| 440 | | if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| | 440 | if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| 441 | 441 | { |
| 442 | 442 | jd->flags |= JFLAG_XMLCONSOLE; |
| 443 | 443 | imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); |
| … |
… |
|
| 452 | 452 | { |
| 453 | 453 | struct jabber_data *jd = ic->proto_data; |
| 454 | 454 | |
| 455 | | if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| | 455 | if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) |
| 456 | 456 | { |
| 457 | 457 | jd->flags &= ~JFLAG_XMLCONSOLE; |
| 458 | 458 | /* Not necessary for now. And for now the code isn't too |
| … |
… |
|
| 608 | 608 | |
| 609 | 609 | void *jabber_buddy_action( struct bee_user *bu, const char *action, char * const args[], void *data ) |
| 610 | 610 | { |
| 611 | | if( g_strcasecmp( action, "VERSION" ) == 0 ) |
| | 611 | if( g_ascii_strcasecmp( action, "VERSION" ) == 0 ) |
| 612 | 612 | { |
| 613 | 613 | struct jabber_buddy *bud; |
| 614 | 614 | |
| … |
… |
|
| 647 | 647 | ret->chat_free_settings = jabber_chat_free_settings; |
| 648 | 648 | ret->keepalive = jabber_keepalive; |
| 649 | 649 | ret->send_typing = jabber_send_typing; |
| 650 | | ret->handle_cmp = g_strcasecmp; |
| | 650 | ret->handle_cmp = g_ascii_strcasecmp; |
| 651 | 651 | ret->transfer_request = jabber_si_transfer_request; |
| 652 | 652 | ret->buddy_action_list = jabber_buddy_action_list; |
| 653 | 653 | ret->buddy_action = jabber_buddy_action; |
-
=== modified file 'protocols/jabber/jabber_util.c'
|
|
|
|
| 67 | 67 | |
| 68 | 68 | char *set_eval_tls( set_t *set, char *value ) |
| 69 | 69 | { |
| 70 | | if( g_strcasecmp( value, "try" ) == 0 ) |
| | 70 | if( g_ascii_strcasecmp( value, "try" ) == 0 ) |
| 71 | 71 | return value; |
| 72 | 72 | else |
| 73 | 73 | return set_eval_bool( set, value ); |
| … |
… |
|
| 245 | 245 | return NULL; |
| 246 | 246 | |
| 247 | 247 | for( i = 0; jabber_away_state_list[i].full_name; i ++ ) |
| 248 | | if( g_strcasecmp( jabber_away_state_list[i].code, code ) == 0 ) |
| | 248 | if( g_ascii_strcasecmp( jabber_away_state_list[i].code, code ) == 0 ) |
| 249 | 249 | return jabber_away_state_list + i; |
| 250 | 250 | |
| 251 | 251 | return NULL; |
| … |
… |
|
| 259 | 259 | return NULL; |
| 260 | 260 | |
| 261 | 261 | for( i = 0; jabber_away_state_list[i].full_name; i ++ ) |
| 262 | | if( g_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 ) |
| | 262 | if( g_ascii_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 ) |
| 263 | 263 | return jabber_away_state_list + i; |
| 264 | 264 | |
| 265 | 265 | return NULL; |
-
=== modified file 'protocols/jabber/sasl.c'
|
|
|
|
| 89 | 89 | c = node->children; |
| 90 | 90 | while( ( c = xt_find_node( c, "mechanism" ) ) ) |
| 91 | 91 | { |
| 92 | | if( c->text && g_strcasecmp( c->text, "PLAIN" ) == 0 ) |
| | 92 | if( c->text && g_ascii_strcasecmp( c->text, "PLAIN" ) == 0 ) |
| 93 | 93 | sup_plain = 1; |
| 94 | | else if( c->text && g_strcasecmp( c->text, "DIGEST-MD5" ) == 0 ) |
| | 94 | else if( c->text && g_ascii_strcasecmp( c->text, "DIGEST-MD5" ) == 0 ) |
| 95 | 95 | sup_digest = 1; |
| 96 | | else if( c->text && g_strcasecmp( c->text, "X-OAUTH2" ) == 0 ) |
| | 96 | else if( c->text && g_ascii_strcasecmp( c->text, "X-OAUTH2" ) == 0 ) |
| 97 | 97 | sup_gtalk = 1; |
| 98 | | else if( c->text && g_strcasecmp( c->text, "X-FACEBOOK-PLATFORM" ) == 0 ) |
| | 98 | else if( c->text && g_ascii_strcasecmp( c->text, "X-FACEBOOK-PLATFORM" ) == 0 ) |
| 99 | 99 | sup_fb = 1; |
| 100 | | else if( c->text && g_strcasecmp( c->text, "X-MESSENGER-OAUTH2" ) == 0 ) |
| | 100 | else if( c->text && g_ascii_strcasecmp( c->text, "X-MESSENGER-OAUTH2" ) == 0 ) |
| 101 | 101 | sup_ms = 1; |
| 102 | 102 | |
| 103 | 103 | if( c->text ) |
| … |
… |
|
| 206 | 206 | while( isspace( *data ) || *data == ',' ) |
| 207 | 207 | data ++; |
| 208 | 208 | |
| 209 | | if( g_strncasecmp( data, field, len ) == 0 && data[len] == '=' ) |
| | 209 | if( g_ascii_strncasecmp( data, field, len ) == 0 && data[len] == '=' ) |
| 210 | 210 | { |
| 211 | 211 | i = strlen( field ) + 1; |
| 212 | 212 | } |
| … |
… |
|
| 229 | 229 | while( isspace( data[i] ) || data[i] == ',' ) |
| 230 | 230 | i ++; |
| 231 | 231 | |
| 232 | | if( g_strncasecmp( data + i, field, len ) == 0 && |
| | 232 | if( g_ascii_strncasecmp( data + i, field, len ) == 0 && |
| 233 | 233 | data[i+len] == '=' ) |
| 234 | 234 | { |
| 235 | 235 | i += len + 1; |
-
=== modified file 'protocols/msn/msn.c'
|
|
|
|
| 372 | 372 | |
| 373 | 373 | void *msn_buddy_action( struct bee_user *bu, const char *action, char * const args[], void *data ) |
| 374 | 374 | { |
| 375 | | if( g_strcasecmp( action, "NUDGE" ) == 0 ) |
| | 375 | if( g_ascii_strcasecmp( action, "NUDGE" ) == 0 ) |
| 376 | 376 | msn_buddy_msg( bu->ic, bu->handle, NUDGE_MESSAGE, 0 ); |
| 377 | 377 | |
| 378 | 378 | return NULL; |
| … |
… |
|
| 403 | 403 | ret->add_deny = msn_add_deny; |
| 404 | 404 | ret->rem_deny = msn_rem_deny; |
| 405 | 405 | ret->send_typing = msn_send_typing; |
| 406 | | ret->handle_cmp = g_strcasecmp; |
| | 406 | ret->handle_cmp = g_ascii_strcasecmp; |
| 407 | 407 | ret->buddy_data_add = msn_buddy_data_add; |
| 408 | 408 | ret->buddy_data_free = msn_buddy_data_free; |
| 409 | 409 | ret->buddy_action_list = msn_buddy_action_list; |
-
=== modified file 'protocols/msn/msn_util.c'
|
|
|
|
| 64 | 64 | { |
| 65 | 65 | int i; |
| 66 | 66 | for( i = 0; i < md->groupcount; i ++ ) |
| 67 | | if( g_strcasecmp( md->grouplist[i], group ) == 0 ) |
| | 67 | if( g_ascii_strcasecmp( md->grouplist[i], group ) == 0 ) |
| 68 | 68 | { |
| 69 | 69 | g_snprintf( groupid, sizeof( groupid ), " %d", i ); |
| 70 | 70 | break; |
| … |
… |
|
| 79 | 79 | for( l = md->grpq; l; l = l->next ) |
| 80 | 80 | { |
| 81 | 81 | ga = l->data; |
| 82 | | if( g_strcasecmp( ga->group, group ) == 0 ) |
| | 82 | if( g_ascii_strcasecmp( ga->group, group ) == 0 ) |
| 83 | 83 | break; |
| 84 | 84 | } |
| 85 | 85 | |
| … |
… |
|
| 145 | 145 | { |
| 146 | 146 | int i; |
| 147 | 147 | for( i = 0; i < md->groupcount; i ++ ) |
| 148 | | if( g_strcasecmp( md->grouplist[i], group ) == 0 ) |
| | 148 | if( g_ascii_strcasecmp( md->grouplist[i], group ) == 0 ) |
| 149 | 149 | { |
| 150 | 150 | g_snprintf( groupid, sizeof( groupid ), " %d", i ); |
| 151 | 151 | break; |
| … |
… |
|
| 501 | 501 | { |
| 502 | 502 | struct msn_group *mg = l->data; |
| 503 | 503 | |
| 504 | | if( g_strcasecmp( mg->name, name ) == 0 ) |
| | 504 | if( g_ascii_strcasecmp( mg->name, name ) == 0 ) |
| 505 | 505 | return mg; |
| 506 | 506 | } |
| 507 | 507 | |
| … |
… |
|
| 517 | 517 | { |
| 518 | 518 | struct msn_group *mg = l->data; |
| 519 | 519 | |
| 520 | | if( g_strcasecmp( mg->id, id ) == 0 ) |
| | 520 | if( g_ascii_strcasecmp( mg->id, id ) == 0 ) |
| 521 | 521 | return mg; |
| 522 | 522 | } |
| 523 | 523 | |
-
=== modified file 'protocols/msn/ns.c'
|
|
|
|
| 532 | 532 | { |
| 533 | 533 | struct msn_groupadd *ga = l->data; |
| 534 | 534 | next = l->next; |
| 535 | | if( g_strcasecmp( ga->group, group ) == 0 ) |
| | 535 | if( g_ascii_strcasecmp( ga->group, group ) == 0 ) |
| 536 | 536 | { |
| 537 | 537 | if( !msn_buddy_list_add( ic, "FL", ga->who, ga->who, group ) ) |
| 538 | 538 | return 0; |
| … |
… |
|
| 606 | 606 | |
| 607 | 607 | if( strcmp( cmd[0], "MSG" ) == 0 ) |
| 608 | 608 | { |
| 609 | | if( g_strcasecmp( cmd[1], "Hotmail" ) == 0 ) |
| | 609 | if( g_ascii_strcasecmp( cmd[1], "Hotmail" ) == 0 ) |
| 610 | 610 | { |
| 611 | 611 | char *ct = get_rfc822_header( msg, "Content-Type:", msglen ); |
| 612 | 612 | |
| 613 | 613 | if( !ct ) |
| 614 | 614 | return( 1 ); |
| 615 | 615 | |
| 616 | | if( g_strncasecmp( ct, "application/x-msmsgssystemmessage", 33 ) == 0 ) |
| | 616 | if( g_ascii_strncasecmp( ct, "application/x-msmsgssystemmessage", 33 ) == 0 ) |
| 617 | 617 | { |
| 618 | 618 | char *mtype; |
| 619 | 619 | char *arg1; |
| … |
… |
|
| 633 | 633 | g_free( arg1 ); |
| 634 | 634 | g_free( mtype ); |
| 635 | 635 | } |
| 636 | | else if( g_strncasecmp( ct, "text/x-msmsgsprofile", 20 ) == 0 ) |
| | 636 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgsprofile", 20 ) == 0 ) |
| 637 | 637 | { |
| 638 | 638 | /* We don't care about this profile for now... */ |
| 639 | 639 | } |
| 640 | | else if( g_strncasecmp( ct, "text/x-msmsgsinitialemailnotification", 37 ) == 0 ) |
| | 640 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgsinitialemailnotification", 37 ) == 0 ) |
| 641 | 641 | { |
| 642 | 642 | if( set_getbool( &ic->acc->set, "mail_notifications" ) ) |
| 643 | 643 | { |
| … |
… |
|
| 651 | 651 | g_free( folders ); |
| 652 | 652 | } |
| 653 | 653 | } |
| 654 | | else if( g_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 ) |
| | 654 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 ) |
| 655 | 655 | { |
| 656 | 656 | if( set_getbool( &ic->acc->set, "mail_notifications" ) ) |
| 657 | 657 | { |
| … |
… |
|
| 665 | 665 | g_free( fromname ); |
| 666 | 666 | } |
| 667 | 667 | } |
| 668 | | else if( g_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 ) |
| | 668 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 ) |
| 669 | 669 | { |
| 670 | 670 | /* Sorry, but this one really is *USELESS* */ |
| 671 | 671 | } |
| … |
… |
|
| 797 | 797 | domain ++; |
| 798 | 798 | |
| 799 | 799 | if( ( d = adl->children ) == NULL || |
| 800 | | g_strcasecmp( xt_find_attr( d, "n" ), domain ) != 0 ) |
| | 800 | g_ascii_strcasecmp( xt_find_attr( d, "n" ), domain ) != 0 ) |
| 801 | 801 | { |
| 802 | 802 | d = xt_new_node( "d", NULL, NULL ); |
| 803 | 803 | xt_add_attr( d, "n", domain ); |
-
=== modified file 'protocols/msn/sb.c'
|
|
|
|
| 506 | 506 | return( 0 ); |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | | if( sb->who && g_strcasecmp( cmd[1], sb->who ) == 0 ) |
| | 509 | if( sb->who && g_ascii_strcasecmp( cmd[1], sb->who ) == 0 ) |
| 510 | 510 | { |
| 511 | 511 | /* The user we wanted to talk to is finally there, let's send the queued messages then. */ |
| 512 | 512 | struct msn_message *m; |
| … |
… |
|
| 689 | 689 | if( !ct ) |
| 690 | 690 | return( 1 ); |
| 691 | 691 | |
| 692 | | if( g_strncasecmp( ct, "text/plain", 10 ) == 0 ) |
| | 692 | if( g_ascii_strncasecmp( ct, "text/plain", 10 ) == 0 ) |
| 693 | 693 | { |
| 694 | 694 | g_free( ct ); |
| 695 | 695 | |
| … |
… |
|
| 711 | 711 | } |
| 712 | 712 | #if 0 |
| 713 | 713 | // Disable MSN ft support for now. |
| 714 | | else if( g_strncasecmp( ct, "text/x-msmsgsinvite", 19 ) == 0 ) |
| | 714 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgsinvite", 19 ) == 0 ) |
| 715 | 715 | { |
| 716 | 716 | char *command = get_rfc822_header( body, "Invitation-Command:", blen ); |
| 717 | 717 | char *cookie = get_rfc822_header( body, "Invitation-Cookie:", blen ); |
| … |
… |
|
| 730 | 730 | icookie = strtoul( cookie, NULL, 10 ); |
| 731 | 731 | g_free( cookie ); |
| 732 | 732 | |
| 733 | | if( g_strncasecmp( command, "INVITE", 6 ) == 0 ) { |
| | 733 | if( g_ascii_strncasecmp( command, "INVITE", 6 ) == 0 ) { |
| 734 | 734 | msn_invitation_invite( sb, cmd[1], icookie, body, blen ); |
| 735 | | } else if( g_strncasecmp( command, "ACCEPT", 6 ) == 0 ) { |
| | 735 | } else if( g_ascii_strncasecmp( command, "ACCEPT", 6 ) == 0 ) { |
| 736 | 736 | msn_invitation_accept( sb, cmd[1], icookie, body, blen ); |
| 737 | | } else if( g_strncasecmp( command, "CANCEL", 6 ) == 0 ) { |
| | 737 | } else if( g_ascii_strncasecmp( command, "CANCEL", 6 ) == 0 ) { |
| 738 | 738 | msn_invitation_cancel( sb, cmd[1], icookie, body, blen ); |
| 739 | 739 | } else { |
| 740 | 740 | imcb_log( ic, "Warning: Received invalid invitation with " |
| … |
… |
|
| 744 | 744 | g_free( command ); |
| 745 | 745 | } |
| 746 | 746 | #endif |
| 747 | | else if( g_strncasecmp( ct, "application/x-msnmsgrp2p", 24 ) == 0 ) |
| | 747 | else if( g_ascii_strncasecmp( ct, "application/x-msnmsgrp2p", 24 ) == 0 ) |
| 748 | 748 | { |
| 749 | 749 | /* Not currently implemented. Don't warn about it since |
| 750 | 750 | this seems to be used for avatars now. */ |
| 751 | 751 | g_free( ct ); |
| 752 | 752 | } |
| 753 | | else if( g_strncasecmp( ct, "text/x-msmsgscontrol", 20 ) == 0 ) |
| | 753 | else if( g_ascii_strncasecmp( ct, "text/x-msmsgscontrol", 20 ) == 0 ) |
| 754 | 754 | { |
| 755 | 755 | char *who = get_rfc822_header( msg, "TypingUser:", msglen ); |
| 756 | 756 | |
-
=== modified file 'protocols/msn/soap.c'
|
|
|
|
| 699 | 699 | if( ( p = xt_find_path( node, "groupIds/guid" ) ) ) |
| 700 | 700 | group_id = p->text; |
| 701 | 701 | |
| 702 | | if( type && g_strcasecmp( type, "me" ) == 0 ) |
| | 702 | if( type && g_ascii_strcasecmp( type, "me" ) == 0 ) |
| 703 | 703 | { |
| 704 | 704 | set_t *set = set_find( &ic->acc->set, "display_name" ); |
| 705 | 705 | g_free( set->value ); |
-
=== modified file 'protocols/msn/tables.c'
|
|
|
|
| 44 | 44 | int i; |
| 45 | 45 | |
| 46 | 46 | for( i = 0; *msn_away_state_list[i].code; i ++ ) |
| 47 | | if( g_strcasecmp( msn_away_state_list[i].code, code ) == 0 ) |
| | 47 | if( g_ascii_strcasecmp( msn_away_state_list[i].code, code ) == 0 ) |
| 48 | 48 | return( msn_away_state_list + i ); |
| 49 | 49 | |
| 50 | 50 | return NULL; |
| … |
… |
|
| 55 | 55 | int i; |
| 56 | 56 | |
| 57 | 57 | for( i = 0; *msn_away_state_list[i].code; i ++ ) |
| 58 | | if( g_strcasecmp( msn_away_state_list[i].name, name ) == 0 ) |
| | 58 | if( g_ascii_strcasecmp( msn_away_state_list[i].name, name ) == 0 ) |
| 59 | 59 | return( msn_away_state_list + i ); |
| 60 | 60 | |
| 61 | 61 | return NULL; |
-
=== modified file 'protocols/nogaim.c'
|
|
|
|
| 97 | 97 | |
| 98 | 98 | for (i = 0; global.conf->protocols && global.conf->protocols[i]; i++) |
| 99 | 99 | { |
| 100 | | if (g_strcasecmp(p->name, global.conf->protocols[i]) == 0) |
| | 100 | if (g_ascii_strcasecmp(p->name, global.conf->protocols[i]) == 0) |
| 101 | 101 | refused = FALSE; |
| 102 | 102 | } |
| 103 | 103 | |
| … |
… |
|
| 115 | 115 | { |
| 116 | 116 | struct prpl *proto = gl->data; |
| 117 | 117 | |
| 118 | | if( g_strcasecmp( proto->name, name ) == 0 ) |
| | 118 | if( g_ascii_strcasecmp( proto->name, name ) == 0 ) |
| 119 | 119 | return proto; |
| 120 | 120 | } |
| 121 | 121 | |
| … |
… |
|
| 203 | 203 | text = g_strdup_vprintf( format, params ); |
| 204 | 204 | va_end( params ); |
| 205 | 205 | |
| 206 | | if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) || |
| | 206 | if( ( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) || |
| 207 | 207 | ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) ) |
| 208 | 208 | strip_html( text ); |
| 209 | 209 | |
| … |
… |
|
| 534 | 534 | { |
| 535 | 535 | char *buf = NULL; |
| 536 | 536 | |
| 537 | | if( ( c->ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| | 537 | if( ( c->ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) ) |
| 538 | 538 | { |
| 539 | 539 | buf = escape_html( msg ); |
| 540 | 540 | msg = buf; |
| … |
… |
|
| 594 | 594 | int i, j; |
| 595 | 595 | |
| 596 | 596 | for( m = gcm; m; m = m->next ) |
| 597 | | if( g_strncasecmp( m->data, away, strlen( m->data ) ) == 0 ) |
| | 597 | if( g_ascii_strncasecmp( m->data, away, strlen( m->data ) ) == 0 ) |
| 598 | 598 | { |
| 599 | 599 | /* At least the Yahoo! module works better if message |
| 600 | 600 | contains no data unless it adds something to what |
| … |
… |
|
| 610 | 610 | int keep_message; |
| 611 | 611 | |
| 612 | 612 | for( j = 0; imc_away_alias_list[i][j]; j ++ ) |
| 613 | | if( g_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 ) |
| | 613 | if( g_ascii_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 ) |
| 614 | 614 | { |
| 615 | 615 | keep_message = strlen( away ) != strlen( imc_away_alias_list[i][j] ); |
| 616 | 616 | break; |
| … |
… |
|
| 623 | 623 | for( j = 0; imc_away_alias_list[i][j]; j ++ ) |
| 624 | 624 | { |
| 625 | 625 | for( m = gcm; m; m = m->next ) |
| 626 | | if( g_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 ) |
| | 626 | if( g_ascii_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 ) |
| 627 | 627 | { |
| 628 | 628 | if( !keep_message ) |
| 629 | 629 | *message = NULL; |
-
=== modified file 'protocols/oscar/oscar.c'
|
|
|
|
| 1841 | 1841 | if (state == NULL) |
| 1842 | 1842 | state = ""; |
| 1843 | 1843 | |
| 1844 | | if (!g_strcasecmp(state, _("Visible"))) { |
| | 1844 | if (!g_ascii_strcasecmp(state, _("Visible"))) { |
| 1845 | 1845 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); |
| 1846 | 1846 | return; |
| 1847 | | } else if (!g_strcasecmp(state, _("Invisible"))) { |
| | 1847 | } else if (!g_ascii_strcasecmp(state, _("Invisible"))) { |
| 1848 | 1848 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE); |
| 1849 | 1849 | return; |
| 1850 | 1850 | } else if (message == NULL) { |
| … |
… |
|
| 1894 | 1894 | |
| 1895 | 1895 | if (state == NULL) { |
| 1896 | 1896 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); |
| 1897 | | } else if (!g_strcasecmp(state, "Away")) { |
| | 1897 | } else if (!g_ascii_strcasecmp(state, "Away")) { |
| 1898 | 1898 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); |
| 1899 | 1899 | ic->away = g_strdup(msg); |
| 1900 | 1900 | od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY; |
| 1901 | | } else if (!g_strcasecmp(state, "Do Not Disturb")) { |
| | 1901 | } else if (!g_ascii_strcasecmp(state, "Do Not Disturb")) { |
| 1902 | 1902 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY); |
| 1903 | 1903 | ic->away = g_strdup(msg); |
| 1904 | 1904 | od->sess->aim_icq_state = AIM_MTYPE_AUTODND; |
| 1905 | | } else if (!g_strcasecmp(state, "Not Available")) { |
| | 1905 | } else if (!g_ascii_strcasecmp(state, "Not Available")) { |
| 1906 | 1906 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY); |
| 1907 | 1907 | ic->away = g_strdup(msg); |
| 1908 | 1908 | od->sess->aim_icq_state = AIM_MTYPE_AUTONA; |
| 1909 | | } else if (!g_strcasecmp(state, "Occupied")) { |
| | 1909 | } else if (!g_ascii_strcasecmp(state, "Occupied")) { |
| 1910 | 1910 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY); |
| 1911 | 1911 | ic->away = g_strdup(msg); |
| 1912 | 1912 | od->sess->aim_icq_state = AIM_MTYPE_AUTOBUSY; |
| 1913 | | } else if (!g_strcasecmp(state, "Free For Chat")) { |
| | 1913 | } else if (!g_ascii_strcasecmp(state, "Free For Chat")) { |
| 1914 | 1914 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT); |
| 1915 | 1915 | ic->away = g_strdup(msg); |
| 1916 | 1916 | od->sess->aim_icq_state = AIM_MTYPE_AUTOFFC; |
| 1917 | | } else if (!g_strcasecmp(state, "Invisible")) { |
| | 1917 | } else if (!g_ascii_strcasecmp(state, "Invisible")) { |
| 1918 | 1918 | aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE); |
| 1919 | 1919 | ic->away = g_strdup(msg); |
| 1920 | 1920 | } else { |
| … |
… |
|
| 2324 | 2324 | |
| 2325 | 2325 | if ((encoding == NULL) || encoding[0] == '\0') { |
| 2326 | 2326 | /* gaim_debug_info("oscar", "Empty encoding, assuming UTF-8\n");*/ |
| 2327 | | } else if (!g_strcasecmp(encoding, "iso-8859-1")) { |
| | 2327 | } else if (!g_ascii_strcasecmp(encoding, "iso-8859-1")) { |
| 2328 | 2328 | do_iconv("iso-8859-1", "UTF-8", text, utf8, textlen, 8192); |
| 2329 | | } else if (!g_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1")) { |
| | 2329 | } else if (!g_ascii_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1")) { |
| 2330 | 2330 | do_iconv("Windows-1252", "UTF-8", text, utf8, textlen, 8192); |
| 2331 | | } else if (!g_strcasecmp(encoding, "unicode-2-0")) { |
| | 2331 | } else if (!g_ascii_strcasecmp(encoding, "unicode-2-0")) { |
| 2332 | 2332 | do_iconv("UCS-2BE", "UTF-8", text, utf8, textlen, 8192); |
| 2333 | | } else if (g_strcasecmp(encoding, "us-ascii") && strcmp(encoding, "utf-8")) { |
| | 2333 | } else if (g_ascii_strcasecmp(encoding, "us-ascii") && strcmp(encoding, "utf-8")) { |
| 2334 | 2334 | /* gaim_debug_warning("oscar", "Unrecognized character encoding \"%s\", " |
| 2335 | 2335 | "attempting to convert to UTF-8 anyway\n", encoding);*/ |
| 2336 | 2336 | do_iconv(encoding, "UTF-8", text, utf8, textlen, 8192); |
-
=== modified file 'protocols/purple/purple.c'
|
|
|
|
| 368 | 368 | break; |
| 369 | 369 | |
| 370 | 370 | if( state_txt != NULL && |
| 371 | | g_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 ) |
| | 371 | g_ascii_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 ) |
| 372 | 372 | break; |
| 373 | 373 | } |
| 374 | 374 | |
| … |
… |
|
| 1303 | 1303 | funcs.get_info = purple_get_info; |
| 1304 | 1304 | funcs.keepalive = purple_keepalive; |
| 1305 | 1305 | funcs.send_typing = purple_send_typing; |
| 1306 | | funcs.handle_cmp = g_strcasecmp; |
| | 1306 | funcs.handle_cmp = g_ascii_strcasecmp; |
| 1307 | 1307 | /* TODO(wilmer): Set these only for protocols that support them? */ |
| 1308 | 1308 | funcs.chat_msg = purple_chat_msg; |
| 1309 | 1309 | funcs.chat_with = purple_chat_with; |
| … |
… |
|
| 1336 | 1336 | |
| 1337 | 1337 | /* libpurple doesn't define a protocol called OSCAR, but we |
| 1338 | 1338 | need it to be compatible with normal BitlBee. */ |
| 1339 | | if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 ) |
| | 1339 | if( g_ascii_strcasecmp( prot->info->id, "prpl-aim" ) == 0 ) |
| 1340 | 1340 | { |
| 1341 | 1341 | ret = g_memdup( &funcs, sizeof( funcs ) ); |
| 1342 | 1342 | ret->name = "oscar"; |
-
=== modified file 'protocols/skype/skype.c'
|
|
|
|
| 1272 | 1272 | int i; |
| 1273 | 1273 | |
| 1274 | 1274 | for (i = 0; skype_away_state_list[i].full_name; i++) |
| 1275 | | if (g_strcasecmp(skype_away_state_list[i].full_name, name) == 0) |
| | 1275 | if (g_ascii_strcasecmp(skype_away_state_list[i].full_name, name) == 0) |
| 1276 | 1276 | return skype_away_state_list + i; |
| 1277 | 1277 | |
| 1278 | 1278 | return NULL; |
| … |
… |
|
| 1563 | 1563 | args = args; |
| 1564 | 1564 | data = data; |
| 1565 | 1565 | |
| 1566 | | if (!g_strcasecmp(action, "CALL")) |
| | 1566 | if (!g_ascii_strcasecmp(action, "CALL")) |
| 1567 | 1567 | skype_call(bu->ic, bu->handle); |
| 1568 | | else if (!g_strcasecmp(action, "HANGUP")) |
| | 1568 | else if (!g_ascii_strcasecmp(action, "HANGUP")) |
| 1569 | 1569 | skype_hangup(bu->ic); |
| 1570 | 1570 | |
| 1571 | 1571 | return NULL; |
| … |
… |
|
| 1591 | 1591 | ret->chat_leave = skype_chat_leave; |
| 1592 | 1592 | ret->chat_invite = skype_chat_invite; |
| 1593 | 1593 | ret->chat_with = skype_chat_with; |
| 1594 | | ret->handle_cmp = g_strcasecmp; |
| | 1594 | ret->handle_cmp = g_ascii_strcasecmp; |
| 1595 | 1595 | ret->chat_topic = skype_chat_topic; |
| 1596 | 1596 | #if BITLBEE_VERSION_CODE > BITLBEE_VER(3, 0, 1) |
| 1597 | 1597 | ret->buddy_action_list = skype_buddy_action_list; |
-
=== modified file 'protocols/twitter/twitter.c'
|
|
|
|
| 82 | 82 | |
| 83 | 83 | if (set_getbool(&ic->acc->set, "oauth") && !td->oauth_info) |
| 84 | 84 | twitter_oauth_start(ic); |
| 85 | | else if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") != 0 && |
| | 85 | else if (g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") != 0 && |
| 86 | 86 | !(td->flags & TWITTER_HAVE_FRIENDS)) { |
| 87 | 87 | imcb_log(ic, "Getting contact list"); |
| 88 | 88 | twitter_get_friends_ids(ic, -1); |
| … |
… |
|
| 189 | 189 | |
| 190 | 190 | static char *set_eval_mode(set_t * set, char *value) |
| 191 | 191 | { |
| 192 | | if (g_strcasecmp(value, "one") == 0 || |
| 193 | | g_strcasecmp(value, "many") == 0 || g_strcasecmp(value, "chat") == 0) |
| | 192 | if (g_ascii_strcasecmp(value, "one") == 0 || |
| | 193 | g_ascii_strcasecmp(value, "many") == 0 || g_ascii_strcasecmp(value, "chat") == 0) |
| 194 | 194 | return value; |
| 195 | 195 | else |
| 196 | 196 | return NULL; |
| … |
… |
|
| 387 | 387 | struct twitter_data *td = ic->proto_data; |
| 388 | 388 | int plen = strlen(td->prefix); |
| 389 | 389 | |
| 390 | | if (g_strncasecmp(who, td->prefix, plen) == 0 && who[plen] == '_' && |
| 391 | | g_strcasecmp(who + plen + 1, ic->acc->user) == 0) { |
| | 390 | if (g_ascii_strncasecmp(who, td->prefix, plen) == 0 && who[plen] == '_' && |
| | 391 | g_ascii_strcasecmp(who + plen + 1, ic->acc->user) == 0) { |
| 392 | 392 | if (set_getbool(&ic->acc->set, "oauth") && |
| 393 | 393 | td->oauth_info && td->oauth_info->token == NULL) { |
| 394 | 394 | char pin[strlen(message) + 1], *s; |
| … |
… |
|
| 506 | 506 | return; |
| 507 | 507 | } else if (!set_getbool(&ic->acc->set, "commands")) { |
| 508 | 508 | /* Not supporting commands. */ |
| 509 | | } else if (g_strcasecmp(cmd[0], "undo") == 0) { |
| | 509 | } else if (g_ascii_strcasecmp(cmd[0], "undo") == 0) { |
| 510 | 510 | guint64 id; |
| 511 | 511 | |
| 512 | 512 | if (cmd[1] == NULL) |
| … |
… |
|
| 521 | 521 | |
| 522 | 522 | g_free(cmds); |
| 523 | 523 | return; |
| 524 | | } else if (g_strcasecmp(cmd[0], "follow") == 0 && cmd[1]) { |
| | 524 | } else if (g_ascii_strcasecmp(cmd[0], "follow") == 0 && cmd[1]) { |
| 525 | 525 | twitter_add_buddy(ic, cmd[1], NULL); |
| 526 | 526 | g_free(cmds); |
| 527 | 527 | return; |
| 528 | | } else if (g_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) { |
| | 528 | } else if (g_ascii_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) { |
| 529 | 529 | twitter_remove_buddy(ic, cmd[1], NULL); |
| 530 | 530 | g_free(cmds); |
| 531 | 531 | return; |
| 532 | | } else if ((g_strcasecmp(cmd[0], "report") == 0 || |
| 533 | | g_strcasecmp(cmd[0], "spam") == 0) && cmd[1]) { |
| | 532 | } else if ((g_ascii_strcasecmp(cmd[0], "report") == 0 || |
| | 533 | g_ascii_strcasecmp(cmd[0], "spam") == 0) && cmd[1]) { |
| 534 | 534 | char * screen_name; |
| 535 | 535 | guint64 id; |
| 536 | 536 | screen_name = cmd[1]; |
| … |
… |
|
| 547 | 547 | twitter_report_spam(ic, screen_name); |
| 548 | 548 | g_free(cmds); |
| 549 | 549 | return; |
| 550 | | } else if (g_strcasecmp(cmd[0], "rt") == 0 && cmd[1]) { |
| | 550 | } else if (g_ascii_strcasecmp(cmd[0], "rt") == 0 && cmd[1]) { |
| 551 | 551 | struct twitter_user_data *tud; |
| 552 | 552 | bee_user_t *bu; |
| 553 | 553 | guint64 id; |
| … |
… |
|
| 573 | 573 | |
| 574 | 574 | g_free(cmds); |
| 575 | 575 | return; |
| 576 | | } else if (g_strcasecmp(cmd[0], "reply") == 0 && cmd[1] && cmd[2]) { |
| | 576 | } else if (g_ascii_strcasecmp(cmd[0], "reply") == 0 && cmd[1] && cmd[2]) { |
| 577 | 577 | struct twitter_user_data *tud; |
| 578 | 578 | bee_user_t *bu = NULL; |
| 579 | 579 | guint64 id = 0; |
| … |
… |
|
| 605 | 605 | } |
| 606 | 606 | message = new = g_strdup_printf("@%s %s", bu->handle, message + (cmd[2] - cmd[0])); |
| 607 | 607 | in_reply_to = id; |
| 608 | | } else if (g_strcasecmp(cmd[0], "post") == 0) { |
| | 608 | } else if (g_ascii_strcasecmp(cmd[0], "post") == 0) { |
| 609 | 609 | message += 5; |
| 610 | 610 | } |
| 611 | 611 | |
| … |
… |
|
| 669 | 669 | ret->rem_deny = twitter_rem_deny; |
| 670 | 670 | ret->buddy_data_add = twitter_buddy_data_add; |
| 671 | 671 | ret->buddy_data_free = twitter_buddy_data_free; |
| 672 | | ret->handle_cmp = g_strcasecmp; |
| | 672 | ret->handle_cmp = g_ascii_strcasecmp; |
| 673 | 673 | |
| 674 | 674 | register_protocol(ret); |
| 675 | 675 | |
-
=== modified file 'protocols/twitter/twitter_lib.c'
|
|
|
|
| 152 | 152 | // The buddy is not in the list, add the buddy and set the status to logged in. |
| 153 | 153 | imcb_add_buddy(ic, name, NULL); |
| 154 | 154 | imcb_rename_buddy(ic, name, fullname); |
| 155 | | if (g_strcasecmp(mode, "chat") == 0) { |
| | 155 | if (g_ascii_strcasecmp(mode, "chat") == 0) { |
| 156 | 156 | /* Necessary so that nicks always get translated to the |
| 157 | 157 | exact Twitter username. */ |
| 158 | 158 | imcb_buddy_nick_hint(ic, name, name); |
| 159 | 159 | imcb_chat_add_buddy(td->timeline_gc, name); |
| 160 | | } else if (g_strcasecmp(mode, "many") == 0) |
| | 160 | } else if (g_ascii_strcasecmp(mode, "many") == 0) |
| 161 | 161 | imcb_buddy_status(ic, name, OPT_LOGGED_IN, NULL, NULL); |
| 162 | 162 | } |
| 163 | 163 | } |
| … |
… |
|
| 233 | 233 | // The root <statuses> node should hold the list of statuses <status> |
| 234 | 234 | // Walk over the nodes children. |
| 235 | 235 | for (child = node->children; child; child = child->next) { |
| 236 | | if (g_strcasecmp("ids", child->name) == 0) { |
| | 236 | if (g_ascii_strcasecmp("ids", child->name) == 0) { |
| 237 | 237 | struct xt_node *idc; |
| 238 | 238 | for (idc = child->children; idc; idc = idc->next) |
| 239 | | if (g_strcasecmp(idc->name, "id") == 0) |
| | 239 | if (g_ascii_strcasecmp(idc->name, "id") == 0) |
| 240 | 240 | txl->list = g_slist_prepend(txl->list, |
| 241 | 241 | g_memdup(idc->text, idc->text_len + 1)); |
| 242 | | } else if (g_strcasecmp("next_cursor", child->name) == 0) { |
| | 242 | } else if (g_ascii_strcasecmp("next_cursor", child->name) == 0) { |
| 243 | 243 | twitter_xt_next_cursor(child, txl); |
| 244 | 244 | } |
| 245 | 245 | } |
| … |
… |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /* Create the room now that we "logged in". */ |
| 287 | | if (!td->timeline_gc && g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0) |
| | 287 | if (!td->timeline_gc && g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0) |
| 288 | 288 | twitter_groupchat_init(ic); |
| 289 | 289 | |
| 290 | 290 | txl = g_new0(struct twitter_xml_list, 1); |
| … |
… |
|
| 407 | 407 | |
| 408 | 408 | // Walk over the nodes children. |
| 409 | 409 | for (child = node->children; child; child = child->next) { |
| 410 | | if (g_strcasecmp("name", child->name) == 0) { |
| | 410 | if (g_ascii_strcasecmp("name", child->name) == 0) { |
| 411 | 411 | txu->name = g_memdup(child->text, child->text_len + 1); |
| 412 | | } else if (g_strcasecmp("screen_name", child->name) == 0) { |
| | 412 | } else if (g_ascii_strcasecmp("screen_name", child->name) == 0) { |
| 413 | 413 | txu->screen_name = g_memdup(child->text, child->text_len + 1); |
| 414 | 414 | } |
| 415 | 415 | } |
| … |
… |
|
| 432 | 432 | // The root <users> node should hold the list of users <user> |
| 433 | 433 | // Walk over the nodes children. |
| 434 | 434 | for (child = node->children; child; child = child->next) { |
| 435 | | if (g_strcasecmp("user", child->name) == 0) { |
| | 435 | if (g_ascii_strcasecmp("user", child->name) == 0) { |
| 436 | 436 | txu = g_new0(struct twitter_xml_user, 1); |
| 437 | 437 | twitter_xt_get_user(child, txu); |
| 438 | 438 | // Put the item in the front of the list. |
| … |
… |
|
| 463 | 463 | |
| 464 | 464 | // Walk over the nodes children. |
| 465 | 465 | for (child = node->children; child; child = child->next) { |
| 466 | | if (g_strcasecmp("text", child->name) == 0) { |
| | 466 | if (g_ascii_strcasecmp("text", child->name) == 0) { |
| 467 | 467 | txs->text = g_memdup(child->text, child->text_len + 1); |
| 468 | | } else if (g_strcasecmp("retweeted_status", child->name) == 0) { |
| | 468 | } else if (g_ascii_strcasecmp("retweeted_status", child->name) == 0) { |
| 469 | 469 | rt = child; |
| 470 | | } else if (g_strcasecmp("created_at", child->name) == 0) { |
| | 470 | } else if (g_ascii_strcasecmp("created_at", child->name) == 0) { |
| 471 | 471 | struct tm parsed; |
| 472 | 472 | |
| 473 | 473 | /* Very sensitive to changes to the formatting of |
| … |
… |
|
| 475 | 475 | is UTC since C time handling functions suck. */ |
| 476 | 476 | if (strptime(child->text, TWITTER_TIME_FORMAT, &parsed) != NULL) |
| 477 | 477 | txs->created_at = mktime_utc(&parsed); |
| 478 | | } else if (g_strcasecmp("user", child->name) == 0) { |
| | 478 | } else if (g_ascii_strcasecmp("user", child->name) == 0) { |
| 479 | 479 | txs->user = g_new0(struct twitter_xml_user, 1); |
| 480 | 480 | twitter_xt_get_user(child, txs->user); |
| 481 | | } else if (g_strcasecmp("id", child->name) == 0) { |
| | 481 | } else if (g_ascii_strcasecmp("id", child->name) == 0) { |
| 482 | 482 | txs->id = g_ascii_strtoull(child->text, NULL, 10); |
| 483 | | } else if (g_strcasecmp("in_reply_to_status_id", child->name) == 0) { |
| | 483 | } else if (g_ascii_strcasecmp("in_reply_to_status_id", child->name) == 0) { |
| 484 | 484 | txs->reply_to = g_ascii_strtoull(child->text, NULL, 10); |
| 485 | 485 | } |
| 486 | 486 | } |
| … |
… |
|
| 549 | 549 | // The root <statuses> node should hold the list of statuses <status> |
| 550 | 550 | // Walk over the nodes children. |
| 551 | 551 | for (child = node->children; child; child = child->next) { |
| 552 | | if (g_strcasecmp("status", child->name) == 0) { |
| | 552 | if (g_ascii_strcasecmp("status", child->name) == 0) { |
| 553 | 553 | txs = g_new0(struct twitter_xml_status, 1); |
| 554 | 554 | twitter_xt_get_status(child, txs); |
| 555 | 555 | // Put the item in the front of the list. |
| … |
… |
|
| 564 | 564 | tud->last_time = txs->created_at; |
| 565 | 565 | } |
| 566 | 566 | } |
| 567 | | } else if (g_strcasecmp("next_cursor", child->name) == 0) { |
| | 567 | } else if (g_ascii_strcasecmp("next_cursor", child->name) == 0) { |
| 568 | 568 | twitter_xt_next_cursor(child, txl); |
| 569 | 569 | } |
| 570 | 570 | } |
| … |
… |
|
| 659 | 659 | msg = twitter_msg_add_id(ic, status, ""); |
| 660 | 660 | |
| 661 | 661 | // Say it! |
| 662 | | if (g_strcasecmp(td->user, status->user->screen_name) == 0) { |
| | 662 | if (g_ascii_strcasecmp(td->user, status->user->screen_name) == 0) { |
| 663 | 663 | imcb_chat_log(gc, "You: %s", msg ? msg : status->text); |
| 664 | 664 | } else { |
| 665 | 665 | twitter_add_buddy(ic, status->user->screen_name, status->user->name); |
| … |
… |
|
| 688 | 688 | gboolean mode_one; |
| 689 | 689 | guint64 last_id = 0; |
| 690 | 690 | |
| 691 | | mode_one = g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") == 0; |
| | 691 | mode_one = g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") == 0; |
| 692 | 692 | |
| 693 | 693 | if (mode_one) { |
| 694 | 694 | g_snprintf(from, sizeof(from) - 1, "%s_%s", td->prefix, ic->acc->user); |
| … |
… |
|
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | // See if the user wants to see the messages in a groupchat window or as private messages. |
| 792 | | if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0) |
| | 792 | if (g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0) |
| 793 | 793 | twitter_groupchat(ic, output); |
| 794 | 794 | else |
| 795 | 795 | twitter_private_message_chat(ic, output); |
-
=== modified file 'protocols/yahoo/yahoo.c'
|
|
|
|
| 73 | 73 | /* This should get rid of the markup noise at the beginning of the string. */ |
| 74 | 74 | while( *in ) |
| 75 | 75 | { |
| 76 | | if( g_strncasecmp( in, "<font", 5 ) == 0 || |
| 77 | | g_strncasecmp( in, "<fade", 5 ) == 0 || |
| 78 | | g_strncasecmp( in, "<alt", 4 ) == 0 ) |
| | 76 | if( g_ascii_strncasecmp( in, "<font", 5 ) == 0 || |
| | 77 | g_ascii_strncasecmp( in, "<fade", 5 ) == 0 || |
| | 78 | g_ascii_strncasecmp( in, "<alt", 4 ) == 0 ) |
| 79 | 79 | { |
| 80 | 80 | char *s = strchr( in, '>' ); |
| 81 | 81 | if( !s ) |
| … |
… |
|
| 142 | 142 | yd->logged_in = FALSE; |
| 143 | 143 | yd->current_status = YAHOO_STATUS_AVAILABLE; |
| 144 | 144 | |
| 145 | | if( ( s = strchr( acc->user, '@' ) ) && g_strcasecmp( s, "@yahoo.com" ) == 0 ) |
| | 145 | if( ( s = strchr( acc->user, '@' ) ) && g_ascii_strcasecmp( s, "@yahoo.com" ) == 0 ) |
| 146 | 146 | imcb_error( ic, "Your Yahoo! username should just be a username. " |
| 147 | 147 | "Do not include any @domain part." ); |
| 148 | 148 | |
| … |
… |
|
| 208 | 208 | { |
| 209 | 209 | /* Use these states only if msg doesn't contain additional |
| 210 | 210 | info since away messages are only supported with CUSTOM. */ |
| 211 | | if( g_strcasecmp( state, "Be Right Back" ) == 0 ) |
| | 211 | if( g_ascii_strcasecmp( state, "Be Right Back" ) == 0 ) |
| 212 | 212 | yd->current_status = YAHOO_STATUS_BRB; |
| 213 | | else if( g_strcasecmp( state, "Busy" ) == 0 ) |
| | 213 | else if( g_ascii_strcasecmp( state, "Busy" ) == 0 ) |
| 214 | 214 | yd->current_status = YAHOO_STATUS_BUSY; |
| 215 | | else if( g_strcasecmp( state, "Not At Home" ) == 0 ) |
| | 215 | else if( g_ascii_strcasecmp( state, "Not At Home" ) == 0 ) |
| 216 | 216 | yd->current_status = YAHOO_STATUS_NOTATHOME; |
| 217 | | else if( g_strcasecmp( state, "Not At Desk" ) == 0 ) |
| | 217 | else if( g_ascii_strcasecmp( state, "Not At Desk" ) == 0 ) |
| 218 | 218 | yd->current_status = YAHOO_STATUS_NOTATDESK; |
| 219 | | else if( g_strcasecmp( state, "Not In Office" ) == 0 ) |
| | 219 | else if( g_ascii_strcasecmp( state, "Not In Office" ) == 0 ) |
| 220 | 220 | yd->current_status = YAHOO_STATUS_NOTINOFFICE; |
| 221 | | else if( g_strcasecmp( state, "On Phone" ) == 0 ) |
| | 221 | else if( g_ascii_strcasecmp( state, "On Phone" ) == 0 ) |
| 222 | 222 | yd->current_status = YAHOO_STATUS_ONPHONE; |
| 223 | | else if( g_strcasecmp( state, "On Vacation" ) == 0 ) |
| | 223 | else if( g_ascii_strcasecmp( state, "On Vacation" ) == 0 ) |
| 224 | 224 | yd->current_status = YAHOO_STATUS_ONVACATION; |
| 225 | | else if( g_strcasecmp( state, "Out To Lunch" ) == 0 ) |
| | 225 | else if( g_ascii_strcasecmp( state, "Out To Lunch" ) == 0 ) |
| 226 | 226 | yd->current_status = YAHOO_STATUS_OUTTOLUNCH; |
| 227 | | else if( g_strcasecmp( state, "Stepped Out" ) == 0 ) |
| | 227 | else if( g_ascii_strcasecmp( state, "Stepped Out" ) == 0 ) |
| 228 | 228 | yd->current_status = YAHOO_STATUS_STEPPEDOUT; |
| 229 | | else if( g_strcasecmp( state, "Invisible" ) == 0 ) |
| | 229 | else if( g_ascii_strcasecmp( state, "Invisible" ) == 0 ) |
| 230 | 230 | yd->current_status = YAHOO_STATUS_INVISIBLE; |
| 231 | 231 | else |
| 232 | 232 | yd->current_status = YAHOO_STATUS_CUSTOM; |
| … |
… |
|
| 286 | 286 | { |
| 287 | 287 | struct byahoo_buddygroups *bg = bgl->data; |
| 288 | 288 | |
| 289 | | if( g_strcasecmp( bg->buddy, who ) == 0 && |
| 290 | | g_strcasecmp( bg->group, bu->group->name ) == 0 ) |
| | 289 | if( g_ascii_strcasecmp( bg->buddy, who ) == 0 && |
| | 290 | g_ascii_strcasecmp( bg->group, bu->group->name ) == 0 ) |
| 291 | 291 | { |
| 292 | 292 | g_free( bg->group ); |
| 293 | 293 | bg->group = g_strdup( group ); |
| … |
… |
|
| 309 | 309 | { |
| 310 | 310 | struct byahoo_buddygroups *bg = bgl->data; |
| 311 | 311 | |
| 312 | | if( g_strcasecmp( bg->buddy, who ) == 0 ) |
| | 312 | if( g_ascii_strcasecmp( bg->buddy, who ) == 0 ) |
| 313 | 313 | yahoo_remove_buddy( yd->y2_id, who, bg->group ); |
| 314 | 314 | } |
| 315 | 315 | } |
| … |
… |
|
| 398 | 398 | ret->chat_leave = byahoo_chat_leave; |
| 399 | 399 | ret->chat_with = byahoo_chat_with; |
| 400 | 400 | |
| 401 | | ret->handle_cmp = g_strcasecmp; |
| | 401 | ret->handle_cmp = g_ascii_strcasecmp; |
| 402 | 402 | |
| 403 | 403 | ret->auth_allow = byahoo_auth_allow; |
| 404 | 404 | ret->auth_deny = byahoo_auth_deny; |
| … |
… |
|
| 865 | 865 | char txt[1024]; |
| 866 | 866 | YList *m; |
| 867 | 867 | |
| 868 | | if( g_strcasecmp( who, ic->acc->user ) == 0 ) |
| | 868 | if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 ) |
| 869 | 869 | /* WTF, Yahoo! seems to echo these now? */ |
| 870 | 870 | return; |
| 871 | 871 | |
| … |
… |
|
| 879 | 879 | inv->ic = ic; |
| 880 | 880 | |
| 881 | 881 | for( m = members; m; m = m->next ) |
| 882 | | if( g_strcasecmp( m->data, ic->acc->user ) != 0 ) |
| | 882 | if( g_ascii_strcasecmp( m->data, ic->acc->user ) != 0 ) |
| 883 | 883 | imcb_chat_add_buddy( inv->c, m->data ); |
| 884 | 884 | |
| 885 | 885 | g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", room, who, msg ); |
-
=== modified file 'query.c'
|
|
|
|
| 65 | 65 | irc->queries = q; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | | if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "lifo" ) == 0 || irc->queries == q ) |
| | 68 | if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "lifo" ) == 0 || irc->queries == q ) |
| 69 | 69 | query_display( irc, q ); |
| 70 | 70 | |
| 71 | 71 | return( q ); |
| … |
… |
|
| 186 | 186 | { |
| 187 | 187 | query_t *q; |
| 188 | 188 | |
| 189 | | if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "fifo" ) == 0 ) |
| | 189 | if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "fifo" ) == 0 ) |
| 190 | 190 | q = irc->queries; |
| 191 | 191 | else |
| 192 | 192 | for( q = irc->queries; q && q->next; q = q->next ); |
-
=== modified file 'root_commands.c'
|
|
|
|
| 55 | 55 | |
| 56 | 56 | len = strlen( cmd[0] ); |
| 57 | 57 | for( i = 0; root_commands[i].command; i++ ) |
| 58 | | if( g_strncasecmp( root_commands[i].command, cmd[0], len ) == 0 ) |
| | 58 | if( g_ascii_strncasecmp( root_commands[i].command, cmd[0], len ) == 0 ) |
| 59 | 59 | { |
| 60 | 60 | if( root_commands[i+1].command && |
| 61 | | g_strncasecmp( root_commands[i+1].command, cmd[0], len ) == 0 ) |
| | 61 | g_ascii_strncasecmp( root_commands[i+1].command, cmd[0], len ) == 0 ) |
| 62 | 62 | /* Only match on the first letters if the match is unique. */ |
| 63 | 63 | break; |
| 64 | 64 | |
| … |
… |
|
| 315 | 315 | char *set_name = NULL, *value = NULL; |
| 316 | 316 | gboolean del = FALSE; |
| 317 | 317 | |
| 318 | | if( cmd[1] && g_strncasecmp( cmd[1], "-del", 4 ) == 0 ) |
| | 318 | if( cmd[1] && g_ascii_strncasecmp( cmd[1], "-del", 4 ) == 0 ) |
| 319 | 319 | { |
| 320 | 320 | MIN_ARGS( 2, 0 ); |
| 321 | 321 | set_name = cmd[2]; |
| … |
… |
|
| 405 | 405 | |
| 406 | 406 | len = strlen( cmd[1] ); |
| 407 | 407 | |
| 408 | | if( len >= 1 && g_strncasecmp( cmd[1], "add", len ) == 0 ) |
| | 408 | if( len >= 1 && g_ascii_strncasecmp( cmd[1], "add", len ) == 0 ) |
| 409 | 409 | { |
| 410 | 410 | struct prpl *prpl; |
| 411 | 411 | |
| … |
… |
|
| 470 | 470 | |
| 471 | 471 | return; |
| 472 | 472 | } |
| 473 | | else if( len >= 1 && g_strncasecmp( cmd[1], "list", len ) == 0 ) |
| | 473 | else if( len >= 1 && g_ascii_strncasecmp( cmd[1], "list", len ) == 0 ) |
| 474 | 474 | { |
| 475 | 475 | int i = 0; |
| 476 | 476 | |
| … |
… |
|
| 502 | 502 | { |
| 503 | 503 | /* Try the following two only if cmd[2] == NULL */ |
| 504 | 504 | } |
| 505 | | else if( len >= 2 && g_strncasecmp( cmd[1], "on", len ) == 0 ) |
| | 505 | else if( len >= 2 && g_ascii_strncasecmp( cmd[1], "on", len ) == 0 ) |
| 506 | 506 | { |
| 507 | 507 | if ( irc->b->accounts ) |
| 508 | 508 | { |
| … |
… |
|
| 525 | 525 | |
| 526 | 526 | return; |
| 527 | 527 | } |
| 528 | | else if( len >= 2 && g_strncasecmp( cmd[1], "off", len ) == 0 ) |
| | 528 | else if( len >= 2 && g_ascii_strncasecmp( cmd[1], "off", len ) == 0 ) |
| 529 | 529 | { |
| 530 | 530 | irc_rootmsg( irc, "Deactivating all active (re)connections..." ); |
| 531 | 531 | |
| … |
… |
|
| 546 | 546 | /* At least right now, don't accept on/off/set/del as account IDs even |
| 547 | 547 | if they're a proper match, since people not familiar with the new |
| 548 | 548 | syntax yet may get a confusing/nasty surprise. */ |
| 549 | | if( g_strcasecmp( cmd[1], "on" ) == 0 || |
| 550 | | g_strcasecmp( cmd[1], "off" ) == 0 || |
| 551 | | g_strcasecmp( cmd[1], "set" ) == 0 || |
| 552 | | g_strcasecmp( cmd[1], "del" ) == 0 || |
| | 549 | if( g_ascii_strcasecmp( cmd[1], "on" ) == 0 || |
| | 550 | g_ascii_strcasecmp( cmd[1], "off" ) == 0 || |
| | 551 | g_ascii_strcasecmp( cmd[1], "set" ) == 0 || |
| | 552 | g_ascii_strcasecmp( cmd[1], "del" ) == 0 || |
| 553 | 553 | ( a = account_get( irc->b, cmd[1] ) ) == NULL ) |
| 554 | 554 | { |
| 555 | 555 | irc_rootmsg( irc, "Could not find account `%s'. Note that the syntax " |
| … |
… |
|
| 558 | 558 | return; |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | | if( len >= 1 && g_strncasecmp( cmd[2], "del", len ) == 0 ) |
| | 561 | if( len >= 1 && g_ascii_strncasecmp( cmd[2], "del", len ) == 0 ) |
| 562 | 562 | { |
| 563 | 563 | if( a->ic ) |
| 564 | 564 | { |
| … |
… |
|
| 570 | 570 | irc_rootmsg( irc, "Account deleted" ); |
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | | else if( len >= 2 && g_strncasecmp( cmd[2], "on", len ) == 0 ) |
| | 573 | else if( len >= 2 && g_ascii_strncasecmp( cmd[2], "on", len ) == 0 ) |
| 574 | 574 | { |
| 575 | 575 | if( a->ic ) |
| 576 | 576 | irc_rootmsg( irc, "Account already online" ); |
| … |
… |
|
| 580 | 580 | else |
| 581 | 581 | account_on( irc->b, a ); |
| 582 | 582 | } |
| 583 | | else if( len >= 2 && g_strncasecmp( cmd[2], "off", len ) == 0 ) |
| | 583 | else if( len >= 2 && g_ascii_strncasecmp( cmd[2], "off", len ) == 0 ) |
| 584 | 584 | { |
| 585 | 585 | if( a->ic ) |
| 586 | 586 | { |
| … |
… |
|
| 596 | 596 | irc_rootmsg( irc, "Account already offline" ); |
| 597 | 597 | } |
| 598 | 598 | } |
| 599 | | else if( len >= 1 && g_strncasecmp( cmd[2], "set", len ) == 0 ) |
| | 599 | else if( len >= 1 && g_ascii_strncasecmp( cmd[2], "set", len ) == 0 ) |
| 600 | 600 | { |
| 601 | 601 | cmd_set_real( irc, cmd + 2, &a->set, cmd_account_set_checkflags ); |
| 602 | 602 | } |
| … |
… |
|
| 613 | 613 | |
| 614 | 614 | len = strlen( cmd[1] ); |
| 615 | 615 | |
| 616 | | if( len >= 1 && g_strncasecmp( cmd[1], "list", len ) == 0 ) |
| | 616 | if( len >= 1 && g_ascii_strncasecmp( cmd[1], "list", len ) == 0 ) |
| 617 | 617 | { |
| 618 | 618 | GSList *l; |
| 619 | 619 | int i = 0; |
| … |
… |
|
| 642 | 642 | syntax (only works when used inside a channel). */ |
| 643 | 643 | if( ( ic = irc->root->last_channel ) && |
| 644 | 644 | ( len = strlen( cmd[1] ) ) && |
| 645 | | g_strncasecmp( cmd[1], "set", len ) == 0 ) |
| | 645 | g_ascii_strncasecmp( cmd[1], "set", len ) == 0 ) |
| 646 | 646 | cmd_set_real( irc, cmd + 1, &ic->set, NULL ); |
| 647 | 647 | else |
| 648 | 648 | irc_rootmsg( irc, "Could not find channel `%s'", cmd[1] ); |
| … |
… |
|
| 653 | 653 | MIN_ARGS( 2 ); |
| 654 | 654 | len = strlen( cmd[2] ); |
| 655 | 655 | |
| 656 | | if( len >= 1 && g_strncasecmp( cmd[2], "set", len ) == 0 ) |
| | 656 | if( len >= 1 && g_ascii_strncasecmp( cmd[2], "set", len ) == 0 ) |
| 657 | 657 | { |
| 658 | 658 | cmd_set_real( irc, cmd + 2, &ic->set, NULL ); |
| 659 | 659 | } |
| 660 | | else if( len >= 1 && g_strncasecmp( cmd[2], "del", len ) == 0 ) |
| | 660 | else if( len >= 1 && g_ascii_strncasecmp( cmd[2], "del", len ) == 0 ) |
| 661 | 661 | { |
| 662 | 662 | if( !( ic->flags & IRC_CHANNEL_JOINED ) && |
| 663 | 663 | ic != ic->irc->default_channel ) |
| … |
… |
|
| 681 | 681 | account_t *a; |
| 682 | 682 | int add_on_server = 1; |
| 683 | 683 | |
| 684 | | if( g_strcasecmp( cmd[1], "-tmp" ) == 0 ) |
| | 684 | if( g_ascii_strcasecmp( cmd[1], "-tmp" ) == 0 ) |
| 685 | 685 | { |
| 686 | 686 | MIN_ARGS( 3 ); |
| 687 | 687 | add_on_server = 0; |
| … |
… |
|
| 812 | 812 | static void cmd_rename( irc_t *irc, char **cmd ) |
| 813 | 813 | { |
| 814 | 814 | irc_user_t *iu, *old; |
| 815 | | gboolean del = g_strcasecmp( cmd[1], "-del" ) == 0; |
| | 815 | gboolean del = g_ascii_strcasecmp( cmd[1], "-del" ) == 0; |
| 816 | 816 | |
| 817 | 817 | iu = irc_user_by_name( irc, cmd[del ? 2 : 1] ); |
| 818 | 818 | |
| … |
… |
|
| 1058 | 1058 | } |
| 1059 | 1059 | } |
| 1060 | 1060 | |
| 1061 | | if( g_strcasecmp( cmd[0], "yes" ) == 0 ) |
| | 1061 | if( g_ascii_strcasecmp( cmd[0], "yes" ) == 0 ) |
| 1062 | 1062 | query_answer( irc, q, 1 ); |
| 1063 | | else if( g_strcasecmp( cmd[0], "no" ) == 0 ) |
| | 1063 | else if( g_ascii_strcasecmp( cmd[0], "no" ) == 0 ) |
| 1064 | 1064 | query_answer( irc, q, 0 ); |
| 1065 | 1065 | } |
| 1066 | 1066 | |
| … |
… |
|
| 1077 | 1077 | char *format; |
| 1078 | 1078 | int n_online = 0, n_away = 0, n_offline = 0; |
| 1079 | 1079 | |
| 1080 | | if( cmd[1] && g_strcasecmp( cmd[1], "all" ) == 0 ) |
| | 1080 | if( cmd[1] && g_ascii_strcasecmp( cmd[1], "all" ) == 0 ) |
| 1081 | 1081 | online = offline = away = 1; |
| 1082 | | else if( cmd[1] && g_strcasecmp( cmd[1], "offline" ) == 0 ) |
| | 1082 | else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "offline" ) == 0 ) |
| 1083 | 1083 | offline = 1; |
| 1084 | | else if( cmd[1] && g_strcasecmp( cmd[1], "away" ) == 0 ) |
| | 1084 | else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "away" ) == 0 ) |
| 1085 | 1085 | away = 1; |
| 1086 | | else if( cmd[1] && g_strcasecmp( cmd[1], "online" ) == 0 ) |
| | 1086 | else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "online" ) == 0 ) |
| 1087 | 1087 | online = 1; |
| 1088 | 1088 | else |
| 1089 | 1089 | online = away = 1; |
| … |
… |
|
| 1183 | 1183 | { |
| 1184 | 1184 | account_t *acc; |
| 1185 | 1185 | |
| 1186 | | if( g_strcasecmp( cmd[1], "add" ) == 0 ) |
| | 1186 | if( g_ascii_strcasecmp( cmd[1], "add" ) == 0 ) |
| 1187 | 1187 | { |
| 1188 | 1188 | char *channel, *s; |
| 1189 | 1189 | struct irc_channel *ic; |
| … |
… |
|
| 1238 | 1238 | } |
| 1239 | 1239 | g_free( channel ); |
| 1240 | 1240 | } |
| 1241 | | else if( g_strcasecmp( cmd[1], "with" ) == 0 ) |
| | 1241 | else if( g_ascii_strcasecmp( cmd[1], "with" ) == 0 ) |
| 1242 | 1242 | { |
| 1243 | 1243 | irc_user_t *iu; |
| 1244 | 1244 | |
| … |
… |
|
| 1258 | 1258 | irc_rootmsg( irc, "Can't open a groupchat with %s.", cmd[2] ); |
| 1259 | 1259 | } |
| 1260 | 1260 | } |
| 1261 | | else if( g_strcasecmp( cmd[1], "list" ) == 0 || |
| 1262 | | g_strcasecmp( cmd[1], "set" ) == 0 || |
| 1263 | | g_strcasecmp( cmd[1], "del" ) == 0 ) |
| | 1261 | else if( g_ascii_strcasecmp( cmd[1], "list" ) == 0 || |
| | 1262 | g_ascii_strcasecmp( cmd[1], "set" ) == 0 || |
| | 1263 | g_ascii_strcasecmp( cmd[1], "del" ) == 0 ) |
| 1264 | 1264 | { |
| 1265 | 1265 | irc_rootmsg( irc, "Warning: The \002chat\002 command was mostly replaced with the \002channel\002 command." ); |
| 1266 | 1266 | cmd_channel( irc, cmd ); |
| … |
… |
|
| 1277 | 1277 | int len; |
| 1278 | 1278 | |
| 1279 | 1279 | len = strlen( cmd[1] ); |
| 1280 | | if( g_strncasecmp( cmd[1], "list", len ) == 0 ) |
| | 1280 | if( g_ascii_strncasecmp( cmd[1], "list", len ) == 0 ) |
| 1281 | 1281 | { |
| 1282 | 1282 | int n = 0; |
| 1283 | 1283 | |
| … |
… |
|
| 1436 | 1436 | |
| 1437 | 1437 | for( i = 0; root_commands[i].command; i++ ) |
| 1438 | 1438 | { |
| 1439 | | if( g_strcasecmp( root_commands[i].command, command ) == 0 ) |
| | 1439 | if( g_ascii_strcasecmp( root_commands[i].command, command ) == 0 ) |
| 1440 | 1440 | return FALSE; |
| 1441 | | else if( g_strcasecmp( root_commands[i].command, command ) > 0 ) |
| | 1441 | else if( g_ascii_strcasecmp( root_commands[i].command, command ) > 0 ) |
| 1442 | 1442 | break; |
| 1443 | 1443 | } |
| 1444 | 1444 | memmove( root_commands + i + 1, root_commands + i, |
-
=== modified file 'set.c'
|
|
|
|
| 68 | 68 | |
| 69 | 69 | while( s ) |
| 70 | 70 | { |
| 71 | | if( g_strcasecmp( s->key, key ) == 0 || |
| 72 | | ( s->old_key && g_strcasecmp( s->old_key, key ) == 0 ) ) |
| | 71 | if( g_ascii_strcasecmp( s->key, key ) == 0 || |
| | 72 | ( s->old_key && g_ascii_strcasecmp( s->old_key, key ) == 0 ) ) |
| 73 | 73 | break; |
| 74 | 74 | s = s->next; |
| 75 | 75 | } |
| … |
… |
|
| 172 | 172 | |
| 173 | 173 | while( s ) |
| 174 | 174 | { |
| 175 | | if( g_strcasecmp( s->key, key ) == 0 ) |
| | 175 | if( g_ascii_strcasecmp( s->key, key ) == 0 ) |
| 176 | 176 | break; |
| 177 | 177 | s = (t=s)->next; |
| 178 | 178 | } |
-
=== modified file 'storage_xml.c'
|
|
|
|
| 66 | 66 | int i; |
| 67 | 67 | |
| 68 | 68 | for( i = 0; attr_names[i]; i ++ ) |
| 69 | | if( g_strcasecmp( attr_names[i], key ) == 0 ) |
| | 69 | if( g_ascii_strcasecmp( attr_names[i], key ) == 0 ) |
| 70 | 70 | return (char*) attr_values[i]; |
| 71 | 71 | |
| 72 | 72 | return NULL; |
| … |
… |
|
| 90 | 90 | { |
| 91 | 91 | xd->unknown_tag ++; |
| 92 | 92 | } |
| 93 | | else if( g_strcasecmp( element_name, "user" ) == 0 ) |
| | 93 | else if( g_ascii_strcasecmp( element_name, "user" ) == 0 ) |
| 94 | 94 | { |
| 95 | 95 | char *nick = xml_attr( attr_names, attr_values, "nick" ); |
| 96 | 96 | char *pass = xml_attr( attr_names, attr_values, "password" ); |
| … |
… |
|
| 124 | 124 | /* Let's not parse anything else if we only have to check |
| 125 | 125 | the password. */ |
| 126 | 126 | } |
| 127 | | else if( g_strcasecmp( element_name, "account" ) == 0 ) |
| | 127 | else if( g_ascii_strcasecmp( element_name, "account" ) == 0 ) |
| 128 | 128 | { |
| 129 | 129 | char *protocol, *handle, *server, *password = NULL, *autoconnect, *tag; |
| 130 | 130 | char *pass_b64 = NULL; |
| … |
… |
|
| 170 | 170 | g_free( pass_cr ); |
| 171 | 171 | g_free( password ); |
| 172 | 172 | } |
| 173 | | else if( g_strcasecmp( element_name, "setting" ) == 0 ) |
| | 173 | else if( g_ascii_strcasecmp( element_name, "setting" ) == 0 ) |
| 174 | 174 | { |
| 175 | 175 | char *setting; |
| 176 | 176 | |
| … |
… |
|
| 195 | 195 | g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, |
| 196 | 196 | "Missing attributes for %s element", element_name ); |
| 197 | 197 | } |
| 198 | | else if( g_strcasecmp( element_name, "buddy" ) == 0 ) |
| | 198 | else if( g_ascii_strcasecmp( element_name, "buddy" ) == 0 ) |
| 199 | 199 | { |
| 200 | 200 | char *handle, *nick; |
| 201 | 201 | |
| … |
… |
|
| 212 | 212 | "Missing attributes for %s element", element_name ); |
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | | else if( g_strcasecmp( element_name, "channel" ) == 0 ) |
| | 215 | else if( g_ascii_strcasecmp( element_name, "channel" ) == 0 ) |
| 216 | 216 | { |
| 217 | 217 | char *name, *type; |
| 218 | 218 | |
| … |
… |
|
| 236 | 236 | } |
| 237 | 237 | /* Backward compatibility: Keep this around for a while for people |
| 238 | 238 | switching from BitlBee 1.2.4+. */ |
| 239 | | else if( g_strcasecmp( element_name, "chat" ) == 0 ) |
| | 239 | else if( g_ascii_strcasecmp( element_name, "chat" ) == 0 ) |
| 240 | 240 | { |
| 241 | 241 | char *handle, *channel; |
| 242 | 242 | |
| … |
… |
|
| 287 | 287 | { |
| 288 | 288 | xd->unknown_tag --; |
| 289 | 289 | } |
| 290 | | else if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting ) |
| | 290 | else if( g_ascii_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting ) |
| 291 | 291 | { |
| 292 | 292 | g_free( xd->current_setting ); |
| 293 | 293 | xd->current_setting = NULL; |
| 294 | 294 | } |
| 295 | | else if( g_strcasecmp( element_name, "account" ) == 0 ) |
| | 295 | else if( g_ascii_strcasecmp( element_name, "account" ) == 0 ) |
| 296 | 296 | { |
| 297 | 297 | xd->current_account = NULL; |
| 298 | 298 | } |
| 299 | | else if( g_strcasecmp( element_name, "channel" ) == 0 || |
| 300 | | g_strcasecmp( element_name, "chat" ) == 0 ) |
| | 299 | else if( g_ascii_strcasecmp( element_name, "channel" ) == 0 || |
| | 300 | g_ascii_strcasecmp( element_name, "chat" ) == 0 ) |
| 301 | 301 | { |
| 302 | 302 | xd->current_channel = NULL; |
| 303 | 303 | } |
| … |
… |
|
| 317 | 317 | the password, or if we didn't get the chance to check it |
| 318 | 318 | yet. */ |
| 319 | 319 | } |
| 320 | | else if( g_strcasecmp( g_markup_parse_context_get_element( ctx ), "setting" ) == 0 && xd->current_setting ) |
| | 320 | else if( g_ascii_strcasecmp( g_markup_parse_context_get_element( ctx ), "setting" ) == 0 && xd->current_setting ) |
| 321 | 321 | { |
| 322 | 322 | if( xd->current_account ) |
| 323 | 323 | { |