Changeset 778d0a9
- Timestamp:
- Jun 27, 2003, 10:41:01 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 290f290
- Parents:
- 94e4899
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r94e4899 r778d0a9 10 10 AIM logout and then login now works. 11 11 Fixed bug causing view -d not to work. 12 Added hostname and tty name to LOGIN/LOGOUT zephyrs on oneline 13 style 12 14 13 15 2.0.4 -
stylefunc.c
r9c4ec91 r778d0a9 44 44 owl_fmtext_append_normal(fm, "\n"); 45 45 } else if (owl_message_is_loginout(m)) { 46 char *ptr, host[LINE], tty[LINE];46 char *ptr, *host, *tty; 47 47 int len; 48 48 49 49 ptr=owl_zephyr_get_field(n, 1, &len); 50 host=owl_malloc(len+10); 50 51 strncpy(host, ptr, len); 51 52 host[len]='\0'; 53 52 54 ptr=owl_zephyr_get_field(n, 3, &len); 55 tty=owl_malloc(len+10); 53 56 strncpy(tty, ptr, len); 54 57 tty[len]='\0'; … … 68 71 owl_fmtext_append_normal(fm, tty); 69 72 owl_fmtext_append_normal(fm, "\n"); 73 74 owl_free(host); 75 owl_free(tty); 70 76 } else { 71 77 owl_fmtext_append_normal(fm, "From: "); … … 229 235 owl_fmtext_append_normal(fm, "\n"); 230 236 } else if (owl_message_is_loginout(m)) { 231 char *ptr, host[LINE], tty[LINE];237 char *ptr, *host, *tty; 232 238 int len; 233 239 234 240 ptr=owl_zephyr_get_field(n, 1, &len); 241 host=owl_malloc(len+10); 235 242 strncpy(host, ptr, len); 236 243 host[len]='\0'; 244 237 245 ptr=owl_zephyr_get_field(n, 3, &len); 246 tty=owl_malloc(len+10); 238 247 strncpy(tty, ptr, len); 239 248 tty[len]='\0'; … … 253 262 owl_fmtext_append_normal(fm, tty); 254 263 owl_fmtext_append_normal(fm, "\n"); 264 265 owl_free(host); 266 owl_free(tty); 255 267 } else { 256 268 owl_fmtext_append_normal(fm, owl_message_get_class(m)); … … 383 395 char *baseformat="%s %-13.13s %-11.11s %-12.12s "; 384 396 char *sender, *recip; 397 ZNotice_t *n; 398 385 399 386 400 sender=short_zuser(owl_message_get_sender(m)); … … 388 402 389 403 if (owl_message_is_type_zephyr(m)) { 404 n=owl_message_get_notice(m); 405 390 406 owl_fmtext_append_spaces(fm, OWL_TAB); 391 if (owl_message_is_login(m)) { 392 tmp=owl_sprintf(baseformat, "<", "LOGIN", "", sender); 393 owl_fmtext_append_normal(fm, tmp); 394 owl_fmtext_append_normal(fm, "\n"); 395 owl_free(tmp); 396 } else if (owl_message_is_logout(m)) { 397 tmp=owl_sprintf(baseformat, "<", "LOGOUT", "", sender); 398 owl_fmtext_append_normal(fm, tmp); 399 owl_fmtext_append_normal(fm, "\n"); 400 owl_free(tmp); 407 408 if (owl_message_is_loginout(m)) { 409 char *ptr, *host, *tty; 410 int len; 411 412 ptr=owl_zephyr_get_field(n, 1, &len); 413 host=owl_malloc(len+10); 414 strncpy(host, ptr, len); 415 host[len]='\0'; 416 417 ptr=owl_zephyr_get_field(n, 3, &len); 418 tty=owl_malloc(len+10); 419 strncpy(tty, ptr, len); 420 tty[len]='\0'; 421 422 if (owl_message_is_login(m)) { 423 tmp=owl_sprintf(baseformat, "<", "LOGIN", "", sender); 424 owl_fmtext_append_normal(fm, tmp); 425 owl_free(tmp); 426 } else if (owl_message_is_logout(m)) { 427 tmp=owl_sprintf(baseformat, "<", "LOGOUT", "", sender); 428 owl_fmtext_append_normal(fm, tmp); 429 owl_free(tmp); 430 } 431 432 owl_fmtext_append_normal(fm, "at "); 433 owl_fmtext_append_normal(fm, host); 434 owl_fmtext_append_normal(fm, " "); 435 owl_fmtext_append_normal(fm, tty); 436 owl_fmtext_append_normal(fm, "\n"); 437 438 owl_free(host); 439 owl_free(tty); 440 401 441 } else if (owl_message_is_ping(m)) { 402 442 tmp=owl_sprintf(baseformat, "<", "PING", "", sender); … … 404 444 owl_fmtext_append_normal(fm, "\n"); 405 445 owl_free(tmp); 446 406 447 } else { 407 448 if (owl_message_is_direction_in(m)) {
Note: See TracChangeset
for help on using the changeset viewer.