Changeset 5789230
- Timestamp:
- Jun 5, 2003, 2:26:51 PM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- aac889a
- Parents:
- ae4cd12
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r65ad073 r5789230 87 87 Added the 'aim_ingorelogin_timer' variable 88 88 'addbuddy zephyr <user>' and 'delbuddy zephyr <user>' now work. 89 'isloginout' and 'isprivate' are now message attributes 90 improved 'info' function lists seperate info for zephyr, aim and 91 also prints all message attributes 89 92 90 93 1.2.8 -
fmtext.c
rf2f9314 r5789230 5 5 static const char fileIdent[] = "$Id$"; 6 6 7 void owl_fmtext_init_null(owl_fmtext *f) { 7 void owl_fmtext_init_null(owl_fmtext *f) 8 { 8 9 f->textlen=0; 9 10 f->textbuff=owl_strdup(""); … … 15 16 16 17 17 void _owl_fmtext_set_attr(owl_fmtext *f, int attr, int first, int last) { 18 void _owl_fmtext_set_attr(owl_fmtext *f, int attr, int first, int last) 19 { 18 20 int i; 19 21 for (i=first; i<=last; i++) { … … 22 24 } 23 25 24 void _owl_fmtext_add_attr(owl_fmtext *f, int attr, int first, int last) { 26 void _owl_fmtext_add_attr(owl_fmtext *f, int attr, int first, int last) 27 { 25 28 int i; 26 29 for (i=first; i<=last; i++) { … … 29 32 } 30 33 31 void _owl_fmtext_set_color(owl_fmtext *f, int color, int first, int last) { 34 void _owl_fmtext_set_color(owl_fmtext *f, int color, int first, int last) 35 { 32 36 int i; 33 37 for (i=first; i<=last; i++) { … … 37 41 38 42 39 void owl_fmtext_append_attr(owl_fmtext *f, char *text, int attr, int color) { 43 void owl_fmtext_append_attr(owl_fmtext *f, char *text, int attr, int color) 44 { 40 45 int newlen; 41 46 … … 52 57 53 58 54 void owl_fmtext_append_normal(owl_fmtext *f, char *text) { 59 void owl_fmtext_append_normal(owl_fmtext *f, char *text) 60 { 55 61 owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_NONE, OWL_COLOR_DEFAULT); 56 62 } 57 63 58 void owl_fmtext_append_normal_color(owl_fmtext *f, char *text, int color) { 64 void owl_fmtext_append_normal_color(owl_fmtext *f, char *text, int color) 65 { 59 66 owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_NONE, color); 60 67 } 61 68 62 69 63 void owl_fmtext_append_bold(owl_fmtext *f, char *text) { 70 void owl_fmtext_append_bold(owl_fmtext *f, char *text) 71 { 64 72 owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_BOLD, OWL_COLOR_DEFAULT); 65 73 } 66 74 67 75 68 void owl_fmtext_append_reverse(owl_fmtext *f, char *text) { 76 void owl_fmtext_append_reverse(owl_fmtext *f, char *text) 77 { 69 78 owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_REVERSE, OWL_COLOR_DEFAULT); 70 79 } 71 80 72 81 73 void owl_fmtext_append_reversebold(owl_fmtext *f, char *text) { 82 void owl_fmtext_append_reversebold(owl_fmtext *f, char *text) 83 { 74 84 owl_fmtext_append_attr(f, text, OWL_FMTEXT_ATTR_REVERSE | OWL_FMTEXT_ATTR_BOLD, OWL_COLOR_DEFAULT); 75 85 } 76 86 77 87 78 void owl_fmtext_addattr(owl_fmtext *f, int attr) { 88 void owl_fmtext_addattr(owl_fmtext *f, int attr) 89 { 79 90 /* add the attribute to all text */ 80 91 int i, j; … … 86 97 } 87 98 88 void owl_fmtext_colorize(owl_fmtext *f, int color) { 99 void owl_fmtext_colorize(owl_fmtext *f, int color) 100 { 89 101 /* everywhere the color is OWL_COLOR_DEFAULT, change it to be 'color' */ 90 102 int i, j; … … 97 109 98 110 99 void owl_fmtext_append_ztext(owl_fmtext *f, char *text) { 111 void owl_fmtext_append_ztext(owl_fmtext *f, char *text) 112 { 100 113 int stacksize, curattrs, curcolor; 101 114 char *ptr, *txtptr, *buff, *tmpptr; … … 216 229 } else { 217 230 /* if we didn't understand it, we'll print it. This is different from zwgc 218 but zwgc seems to be smarter about some screw cases than I am */ 231 * but zwgc seems to be smarter about some screw cases than I am 232 */ 219 233 owl_fmtext_append_attr(f, "@", curattrs, curcolor); 220 234 txtptr++; … … 282 296 } 283 297 284 void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop) { 298 /* This is used internally to fmtext. Use owl_fmtext_append_fmtext() 299 * (no initial underscore) externally */ 300 void _owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop) 301 { 285 302 int newlen, i; 286 303 … … 299 316 } 300 317 301 void owl_fmtext_append_spaces(owl_fmtext *f, int nspaces) { 318 void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in) 319 { 320 _owl_fmtext_append_fmtext(f, in, 0, in->textlen); 321 322 } 323 324 void owl_fmtext_append_spaces(owl_fmtext *f, int nspaces) 325 { 302 326 int i; 303 327 for (i=0; i<nspaces; i++) { … … 310 334 * If format_fn is specified, passes it the list element value 311 335 * and it will return a string which this needs to free. */ 312 void owl_fmtext_append_list(owl_fmtext *f, owl_list *l, char *join_with, char *(format_fn)(void*)) { 336 void owl_fmtext_append_list(owl_fmtext *f, owl_list *l, char *join_with, char *(format_fn)(void*)) 337 { 313 338 int i, size; 314 339 void *elem; … … 335 360 336 361 /* caller is responsible for freeing */ 337 char *owl_fmtext_print_plain(owl_fmtext *f) { 362 char *owl_fmtext_print_plain(owl_fmtext *f) 363 { 338 364 return owl_strdup(f->textbuff); 339 365 } 340 366 341 367 342 void owl_fmtext_curs_waddstr(owl_fmtext *f, WINDOW *w) { 368 void owl_fmtext_curs_waddstr(owl_fmtext *f, WINDOW *w) 369 { 343 370 char *tmpbuff; 344 371 int position, trans1, trans2, len, lastsame; … … 395 422 396 423 397 int owl_fmtext_truncate_lines(owl_fmtext *in, int aline, int lines, owl_fmtext *out) { 424 int owl_fmtext_truncate_lines(owl_fmtext *in, int aline, int lines, owl_fmtext *out) 425 { 398 426 /* start with line aline (where the first line is 0) and print 399 427 * 'lines' lines … … 420 448 offset=ptr1-in->textbuff; 421 449 if (!ptr2) { 422 owl_fmtext_append_fmtext(out, in, offset, in->textlen-1);450 _owl_fmtext_append_fmtext(out, in, offset, in->textlen-1); 423 451 return(-1); 424 452 } 425 owl_fmtext_append_fmtext(out, in, offset, (ptr2-ptr1)+offset);453 _owl_fmtext_append_fmtext(out, in, offset, (ptr2-ptr1)+offset); 426 454 ptr1=ptr2+1; 427 455 } … … 430 458 431 459 432 void owl_fmtext_truncate_cols(owl_fmtext *in, int acol, int bcol, owl_fmtext *out) { 460 void owl_fmtext_truncate_cols(owl_fmtext *in, int acol, int bcol, owl_fmtext *out) 461 { 433 462 char *ptr1, *ptr2, *last; 434 463 int len, offset; … … 468 497 469 498 offset=ptr1-in->textbuff; 470 owl_fmtext_append_fmtext(out, in, offset+acol, offset+acol+len);499 _owl_fmtext_append_fmtext(out, in, offset+acol, offset+acol+len); 471 500 472 501 ptr1=ptr2+1; … … 475 504 476 505 477 int owl_fmtext_num_lines(owl_fmtext *f) { 506 int owl_fmtext_num_lines(owl_fmtext *f) 507 { 478 508 int lines, i; 479 509 … … 492 522 493 523 494 char *owl_fmtext_get_text(owl_fmtext *f) { 524 char *owl_fmtext_get_text(owl_fmtext *f) 525 { 495 526 return(f->textbuff); 496 527 } 497 528 498 void owl_fmtext_set_char(owl_fmtext *f, int index, int ch) { 529 void owl_fmtext_set_char(owl_fmtext *f, int index, int ch) 530 { 499 531 /* set the charater at 'index' to be 'char'. If index is out of 500 532 * bounds don't do anything */ … … 503 535 } 504 536 505 void owl_fmtext_free(owl_fmtext *f) { 537 void owl_fmtext_free(owl_fmtext *f) 538 { 506 539 if (f->textbuff) owl_free(f->textbuff); 507 540 if (f->fmbuff) owl_free(f->fmbuff); … … 510 543 511 544 512 void owl_fmtext_copy(owl_fmtext *dst, owl_fmtext *src) { 545 void owl_fmtext_copy(owl_fmtext *dst, owl_fmtext *src) 546 { 513 547 dst->textlen=src->textlen; 514 548 dst->textbuff=owl_malloc(src->textlen+5); … … 521 555 522 556 523 int owl_fmtext_search_and_highlight(owl_fmtext *f, char *string) { 524 /* highlight all instance of "string". Return the number of 525 * instances found. This is case insensitive. */ 557 /* highlight all instance of "string". Return the number of 558 * instances found. This is case insensitive. 559 */ 560 int owl_fmtext_search_and_highlight(owl_fmtext *f, char *string) 561 { 526 562 527 563 int found, len; … … 545 581 } 546 582 547 int owl_fmtext_search(owl_fmtext *f, char *string) { 548 /* return 1 if the string is found, 0 if not. This is case 549 * insensitive */ 583 /* return 1 if the string is found, 0 if not. This is case 584 * insensitive 585 */ 586 int owl_fmtext_search(owl_fmtext *f, char *string) 587 { 550 588 551 589 if (stristr(f->textbuff, string)) return(1); -
functions.c
r2824f79 r5789230 1210 1210 { 1211 1211 owl_message *m; 1212 owl_fmtext fm ;1212 owl_fmtext fm, attrfm; 1213 1213 ZNotice_t *n; 1214 1214 char buff[10000], tmpbuff[1024]; … … 1226 1226 } 1227 1227 1228 owl_fmtext_append_normal(&fm, "Msg Id : "); 1228 owl_fmtext_append_bold(&fm, "General Information:\n"); 1229 owl_fmtext_append_normal(&fm, " Msg Id : "); 1229 1230 sprintf(buff, "%i", owl_message_get_id(m)); 1230 1231 owl_fmtext_append_normal(&fm, buff); 1231 1232 owl_fmtext_append_normal(&fm, "\n"); 1232 1233 1233 owl_fmtext_append_normal(&fm, " Type : ");1234 owl_fmtext_append_normal(&fm, " Type : "); 1234 1235 owl_fmtext_append_bold(&fm, owl_message_type_to_string(m)); 1235 1236 owl_fmtext_append_normal(&fm, "\n"); 1236 1237 1237 1238 if (owl_message_is_direction_in(m)) { 1238 owl_fmtext_append_normal(&fm, " Direction : in\n");1239 owl_fmtext_append_normal(&fm, " Direction : in\n"); 1239 1240 } else if (owl_message_is_direction_out(m)) { 1240 owl_fmtext_append_normal(&fm, " Direction : out\n");1241 owl_fmtext_append_normal(&fm, " Direction : out\n"); 1241 1242 } else if (owl_message_is_direction_none(m)) { 1242 owl_fmtext_append_normal(&fm, " Direction : none\n");1243 owl_fmtext_append_normal(&fm, " Direction : none\n"); 1243 1244 } else { 1244 owl_fmtext_append_normal(&fm, " Direction : unknown\n");1245 } 1246 1247 owl_fmtext_append_normal(&fm, " Time : ");1245 owl_fmtext_append_normal(&fm, " Direction : unknown\n"); 1246 } 1247 1248 owl_fmtext_append_normal(&fm, " Time : "); 1248 1249 owl_fmtext_append_normal(&fm, owl_message_get_timestr(m)); 1249 1250 owl_fmtext_append_normal(&fm, "\n"); 1250 1251 1251 1252 if (!owl_message_is_type_admin(m)) { 1252 owl_fmtext_append_normal(&fm, " Sender : ");1253 owl_fmtext_append_normal(&fm, " Sender : "); 1253 1254 owl_fmtext_append_normal(&fm, owl_message_get_sender(m)); 1254 1255 owl_fmtext_append_normal(&fm, "\n"); 1255 1256 1256 owl_fmtext_append_normal(&fm, " Recipient : ");1257 owl_fmtext_append_normal(&fm, " Recipient : "); 1257 1258 owl_fmtext_append_normal(&fm, owl_message_get_recipient(m)); 1258 1259 owl_fmtext_append_normal(&fm, "\n"); … … 1260 1261 1261 1262 if (owl_message_is_type_zephyr(m)) { 1262 owl_fmtext_append_bold(&fm, " Zephyr Specific Info\n");1263 owl_fmtext_append_bold(&fm, "\nZephyr Specific Information:\n"); 1263 1264 1264 owl_fmtext_append_normal(&fm, " Class : ");1265 owl_fmtext_append_normal(&fm, " Class : "); 1265 1266 owl_fmtext_append_normal(&fm, owl_message_get_class(m)); 1266 1267 owl_fmtext_append_normal(&fm, "\n"); 1267 owl_fmtext_append_normal(&fm, " Instance : ");1268 owl_fmtext_append_normal(&fm, " Instance : "); 1268 1269 owl_fmtext_append_normal(&fm, owl_message_get_instance(m)); 1269 1270 owl_fmtext_append_normal(&fm, "\n"); 1270 owl_fmtext_append_normal(&fm, " Opcode : ");1271 owl_fmtext_append_normal(&fm, " Opcode : "); 1271 1272 owl_fmtext_append_normal(&fm, owl_message_get_opcode(m)); 1272 1273 owl_fmtext_append_normal(&fm, "\n"); 1273 1274 1274 owl_fmtext_append_normal(&fm, " Time : ");1275 owl_fmtext_append_normal(&fm, " Time : "); 1275 1276 owl_fmtext_append_normal(&fm, owl_message_get_timestr(m)); 1276 1277 owl_fmtext_append_normal(&fm, "\n"); … … 1279 1280 n=owl_message_get_notice(m); 1280 1281 1281 owl_fmtext_append_normal(&fm, " Kind : ");1282 owl_fmtext_append_normal(&fm, " Kind : "); 1282 1283 if (n->z_kind==UNSAFE) { 1283 1284 owl_fmtext_append_normal(&fm, "UNSAFE\n"); … … 1301 1302 owl_fmtext_append_normal(&fm, "ILLEGAL VALUE\n"); 1302 1303 } 1303 owl_fmtext_append_normal(&fm, " Host : ");1304 owl_fmtext_append_normal(&fm, " Host : "); 1304 1305 owl_fmtext_append_normal(&fm, owl_message_get_hostname(m)); 1305 1306 owl_fmtext_append_normal(&fm, "\n"); 1306 sprintf(buff, " Port : %i\n", n->z_port);1307 sprintf(buff, " Port : %i\n", n->z_port); 1307 1308 owl_fmtext_append_normal(&fm, buff); 1308 1309 1309 owl_fmtext_append_normal(&fm, " Auth : ");1310 owl_fmtext_append_normal(&fm, " Auth : "); 1310 1311 if (n->z_auth == ZAUTH_FAILED) { 1311 1312 owl_fmtext_append_normal(&fm, "FAILED\n"); … … 1319 1320 } 1320 1321 1321 sprintf(buff, "Checkd Ath: %i\n", n->z_checked_auth); 1322 sprintf(buff, "%sMulti notc: %s\n", buff, n->z_multinotice); 1323 sprintf(buff, "%sNum other : %i\n", buff, n->z_num_other_fields); 1324 sprintf(buff, "%sMsg Len : %i\n", buff, n->z_message_len); 1322 /* fix this */ 1323 sprintf(buff, " Checkd Ath: %i\n", n->z_checked_auth); 1324 sprintf(buff, "%s Multi notc: %s\n", buff, n->z_multinotice); 1325 sprintf(buff, "%s Num other : %i\n", buff, n->z_num_other_fields); 1326 sprintf(buff, "%s Msg Len : %i\n", buff, n->z_message_len); 1325 1327 owl_fmtext_append_normal(&fm, buff); 1326 1328 1327 sprintf(buff, " Fields : %i\n", owl_zephyr_get_num_fields(n));1329 sprintf(buff, " Fields : %i\n", owl_zephyr_get_num_fields(n)); 1328 1330 owl_fmtext_append_normal(&fm, buff); 1329 1331 1330 1332 fields=owl_zephyr_get_num_fields(n); 1331 1333 for (i=0; i<fields; i++) { 1332 sprintf(buff, " Field %i : ", i+1);1334 sprintf(buff, " Field %i : ", i+1); 1333 1335 1334 1336 ptr=owl_zephyr_get_field(n, i+1, &len); … … 1352 1354 owl_fmtext_append_normal(&fm, buff); 1353 1355 } 1354 owl_fmtext_append_normal(&fm, " Default Fm:");1356 owl_fmtext_append_normal(&fm, " Default Fm:"); 1355 1357 owl_fmtext_append_normal(&fm, n->z_default_format); 1356 1358 } … … 1358 1360 1359 1361 if (owl_message_is_type_aim(m)) { 1360 owl_fmtext_append_bold(&fm, " AIM Specific Info\n"); 1361 } 1362 owl_fmtext_append_bold(&fm, "\nAIM Specific Information:\n"); 1363 } 1364 1365 owl_fmtext_append_bold(&fm, "\nOwl Message Attributes:\n"); 1366 owl_message_attributes_tofmtext(m, &attrfm); 1367 owl_fmtext_append_fmtext(&fm, &attrfm); 1362 1368 1363 1369 owl_function_popless_fmtext(&fm); 1370 owl_fmtext_free(&fm); 1371 owl_fmtext_free(&attrfm); 1364 1372 } 1365 1373 … … 1751 1759 } 1752 1760 1753 if (owl_message_is_login (m)) {1761 if (owl_message_is_loginout(m)) { 1754 1762 class="MESSAGE"; 1755 1763 inst="PERSONAL"; … … 2359 2367 2360 2368 /* narrow personal and login messages to the sender or recip as appropriate */ 2361 if (owl_message_is_personal(m) || owl_message_is_login (m)) {2369 if (owl_message_is_personal(m) || owl_message_is_loginout(m)) { 2362 2370 if (owl_message_is_type_zephyr(m)) { 2363 2371 if (owl_message_is_direction_in(m)) { … … 2406 2414 /* for now we skip admin messages. */ 2407 2415 if (owl_message_is_type_admin(m) 2408 || owl_message_is_login (m)2416 || owl_message_is_loginout(m) 2409 2417 || !owl_message_is_type_zephyr(m)) { 2410 2418 owl_function_makemsg("smartzpunt doesn't support this message type."); -
message.c
raa5f725 r5789230 78 78 } 79 79 80 /* We cheat and indent it for now, since we really want this for 81 * the 'info' function. Later there should just be a generic 82 * function to indent fmtext. 83 */ 84 void owl_message_attributes_tofmtext(owl_message *m, owl_fmtext *fm) { 85 int i, j; 86 owl_pair *p; 87 char *buff; 88 89 owl_fmtext_init_null(fm); 90 91 j=owl_list_get_size(&(m->attributes)); 92 for (i=0; i<j; i++) { 93 p=owl_list_get_element(&(m->attributes), i); 94 buff=owl_sprintf(" %-15.15s: %-35.35s\n", owl_pair_get_key(p), owl_pair_get_value(p)); 95 owl_fmtext_append_normal(fm, buff); 96 owl_free(buff); 97 } 98 } 80 99 81 100 owl_fmtext *owl_message_get_fmtext(owl_message *m) … … 197 216 if (!opcode) return(""); 198 217 return(opcode); 218 } 219 220 221 void owl_message_set_isloginout(owl_message *m) 222 { 223 owl_message_set_attribute(m, "isloginout", ""); 224 } 225 226 int owl_message_is_loginout(owl_message *m) 227 { 228 char *res; 229 230 res=owl_message_get_attribute_value(m, "isloginout"); 231 if (!res) return(0); 232 return(1); 233 } 234 235 void owl_message_set_isprivate(owl_message *m) 236 { 237 owl_message_set_attribute(m, "isprivate", ""); 238 } 239 240 int owl_message_is_private(owl_message *m) 241 { 242 char *res; 243 244 res=owl_message_get_attribute_value(m, "isprivate"); 245 if (!res) return(0); 246 return(1); 199 247 } 200 248 … … 255 303 } 256 304 257 258 305 char *owl_message_get_text(owl_message *m) 259 306 { … … 376 423 } 377 424 378 /* true if the message is only intended for one recipient (me) */379 int owl_message_is_to_me(owl_message *m)380 {381 if (owl_message_is_type_zephyr(m)) {382 if (!strcasecmp(owl_message_get_recipient(m), ZGetSender())) {383 return(1);384 } else {385 return(0);386 }387 } else if (owl_message_is_type_aim(m)) {388 /* right now we don't support chat rooms */389 return(1);390 } else if (owl_message_is_type_admin(m)) {391 return(1);392 }393 return(0);394 }395 396 397 425 int owl_message_is_from_me(owl_message *m) 398 426 { … … 418 446 { 419 447 if (owl_message_is_type_zephyr(m)) { 420 if (!strcasecmp(owl_message_get_class(m), "mail") && owl_message_is_ to_me(m)) {448 if (!strcasecmp(owl_message_get_class(m), "mail") && owl_message_is_private(m)) { 421 449 return(1); 422 450 } else { … … 439 467 } 440 468 441 int owl_message_is_login(owl_message *m)442 {443 if (owl_message_is_type_zephyr(m)) {444 if (!strcasecmp(owl_message_get_class(m), "login")) {445 return(1);446 } else {447 return(0);448 }449 } else if (owl_message_is_type_aim(m)) {450 /* deal with this once we can use buddy lists */451 return(0);452 }453 454 return(0);455 }456 457 469 int owl_message_is_burningears(owl_message *m) 458 470 { … … 461 473 462 474 /* if the message is from us or to us, it doesn't count */ 463 if (owl_message_is_from_me(m) || owl_message_is_ to_me(m)) return(0);475 if (owl_message_is_from_me(m) || owl_message_is_private(m)) return(0); 464 476 465 477 if (owl_message_is_type_zephyr(m)) { … … 539 551 owl_message_set_type_aim(m); 540 552 owl_message_set_direction_in(m); 553 554 /* for now, all AIM messages are private messages since we don't do chat rooms */ 555 owl_message_set_isprivate(m); 541 556 542 557 indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10); … … 593 608 owl_message_set_direction_in(m); 594 609 610 owl_message_set_isloginout(m); 611 595 612 owl_fmtext_init_null(&(m->fmtext)); 596 613 owl_fmtext_append_normal(&(m->fmtext), OWL_TABSTR); … … 666 683 } else { 667 684 owl_message_set_realm(m, ZGetRealm()); 685 } 686 687 /* Set the "isloginout" attribute if it's a login message */ 688 if (!strcasecmp(n->z_class, "login")) { 689 owl_message_set_isloginout(m); 690 } 691 692 /* is the "isprivate" attribute if it's a private zephyr */ 693 if (!strcasecmp(n->z_recipient, ZGetSender())) { 694 owl_message_set_isprivate(m); 668 695 } 669 696 … … 879 906 owl_fmtext_append_normal(&(m->fmtext), OWL_TABSTR); 880 907 881 if (!strcasecmp(owl_message_get_opcode(m), "ping") && owl_message_is_ to_me(m)) {908 if (!strcasecmp(owl_message_get_opcode(m), "ping") && owl_message_is_private(m)) { 882 909 owl_fmtext_append_bold(&(m->fmtext), "PING"); 883 910 owl_fmtext_append_normal(&(m->fmtext), " from "); -
owl.c
r96f8e5b r5789230 1 /* Written by James Kretchmar, MIT1 /* 2 2 * 3 3 * Copyright 2001 Massachusetts Institute of Technology … … 274 274 275 275 followlast=owl_global_should_followlast(&g); 276 277 278 /* If we're logged into AIM, do AIM stuff */ 279 if (owl_global_is_aimloggedin(&g)) { 280 owl_function_debugmsg("Doing aim processing"); 281 owl_aim_process_events(); 282 } 276 283 277 284 /* little hack */ … … 347 354 /* ring the bell if it's a personal */ 348 355 if (owl_global_is_personalbell(&g) && 349 (owl_message_is_personal(m) ||350 (owl_message_is_type_aim(m) && owl_message_is_to_me(m)))) {356 !owl_message_is_loginout(m) && 357 owl_message_is_private(m)) { 351 358 owl_function_beep(); 352 359 } … … 373 380 owl_log_incoming(m); 374 381 } 375 }376 377 /* If we're logged into AIM, do AIM stuff */378 if (owl_global_is_aimloggedin(&g)) {379 owl_function_debugmsg("Doing aim processing");380 owl_aim_process_events();381 382 } 382 383 -
owl_prototypes.h
r65ad073 r5789230 270 270 extern void owl_fmtext_colorize(owl_fmtext *f, int color); 271 271 extern void owl_fmtext_append_ztext(owl_fmtext *f, char *text); 272 extern void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop); 272 extern void _owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop); 273 extern void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in); 273 274 extern void owl_fmtext_append_spaces(owl_fmtext *f, int nspaces); 274 275 extern void owl_fmtext_append_list(owl_fmtext *f, owl_list *l, char *join_with, char *(format_fn)(void*)); … … 580 581 extern void owl_message_set_attribute(owl_message *m, char *attrname, char *attrvalue); 581 582 extern char *owl_message_get_attribute_value(owl_message *m, char *attrname); 583 extern void owl_message_attributes_tofmtext(owl_message *m, owl_fmtext *fm); 582 584 extern owl_fmtext *owl_message_get_fmtext(owl_message *m); 583 585 extern void owl_message_set_class(owl_message *m, char *class); … … 597 599 extern void owl_message_set_opcode(owl_message *m, char *opcode); 598 600 extern char *owl_message_get_opcode(owl_message *m); 601 extern void owl_message_set_isloginout(owl_message *m); 602 extern int owl_message_is_loginout(owl_message *m); 603 extern void owl_message_set_isprivate(owl_message *m); 604 extern int owl_message_is_private(owl_message *m); 599 605 extern char *owl_message_get_timestr(owl_message *m); 600 606 extern void owl_message_set_type_admin(owl_message *m); … … 623 629 extern void owl_message_curs_waddstr(owl_message *m, WINDOW *win, int aline, int bline, int acol, int bcol, int color); 624 630 extern int owl_message_is_personal(owl_message *m); 625 extern int owl_message_is_to_me(owl_message *m);626 631 extern int owl_message_is_from_me(owl_message *m); 627 632 extern int owl_message_is_mail(owl_message *m); 628 633 extern int owl_message_is_ping(owl_message *m); 629 extern int owl_message_is_login(owl_message *m);630 634 extern int owl_message_is_burningears(owl_message *m); 631 635 extern char *owl_message_get_cc(owl_message *m);
Note: See TracChangeset
for help on using the changeset viewer.