Changeset ce7db4d for commands.c
- Timestamp:
- Jun 24, 2003, 11:12:09 PM (22 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:
- 658dc2f
- Parents:
- 723c427
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
ref56a67 rce7db4d 1526 1526 1527 1527 char *owl_command_zwrite(int argc, char **argv, char *buff) { 1528 char *tmpbuff, *pos, *cmd, *msg;1528 owl_zwrite z; 1529 1529 1530 1530 /* check for a zwrite -m */ 1531 for (pos = buff; *pos; pos = skiptokens(pos, 1)) { 1532 if (!strncmp(pos, "-m ", 3)) { 1533 cmd = owl_strdup(buff); 1534 msg = cmd+(pos-buff); 1535 *msg = '\0'; 1536 msg += 3; 1537 owl_zwrite_create_and_send_from_line(cmd, msg); 1538 owl_free(cmd); 1539 return NULL; 1540 } 1531 owl_zwrite_create_from_line(&z, buff); 1532 if (owl_zwrite_is_message_set(&z)) { 1533 owl_function_zwrite(buff, NULL); 1534 owl_zwrite_free(&z); 1535 return (NULL); 1541 1536 } 1542 1537 … … 1544 1539 owl_function_makemsg("Not enough arguments to the zwrite command."); 1545 1540 } else { 1546 tmpbuff = owl_strdup(buff); 1547 owl_function_zwrite_setup(tmpbuff); 1548 owl_global_set_buffercommand(&g, tmpbuff); 1549 owl_free(tmpbuff); 1550 } 1551 return NULL; 1541 owl_function_zwrite_setup(buff); 1542 owl_global_set_buffercommand(&g, buff); 1543 } 1544 return(NULL); 1552 1545 } 1553 1546 1554 1547 char *owl_command_aimwrite(int argc, char **argv, char *buff) { 1555 char *tmpbuff;1556 1557 1548 if (!owl_global_is_aimloggedin(&g)) { 1558 1549 owl_function_makemsg("You are not logged in to AIM."); … … 1565 1556 } 1566 1557 1567 tmpbuff=owl_strdup(buff); 1568 owl_function_aimwrite_setup(tmpbuff); 1569 owl_global_set_buffercommand(&g, tmpbuff); 1570 owl_free(tmpbuff); 1558 owl_function_aimwrite_setup(buff); 1559 owl_global_set_buffercommand(&g, buff); 1571 1560 return(NULL); 1572 1561 } 1573 1562 1574 1563 char *owl_command_zcrypt(int argc, char **argv, char *buff) { 1575 char *tmpbuff, *pos, *cmd, *msg;1576 1564 owl_zwrite z; 1565 1577 1566 /* check for a zwrite -m */ 1578 for (pos = buff; *pos; pos = skiptokens(pos, 1)) { 1579 if (!strncmp(pos, "-m ", 3)) { 1580 cmd = owl_strdup(buff); 1581 msg = cmd+(pos-buff); 1582 *msg = '\0'; 1583 msg += 3; 1584 owl_zwrite_create_and_send_from_line(cmd, msg); 1585 owl_free(cmd); 1586 return NULL; 1587 } 1567 owl_zwrite_create_from_line(&z, buff); 1568 if (owl_zwrite_is_message_set(&z)) { 1569 owl_zwrite_send_message(&z); 1570 owl_function_make_outgoing_zephyr(owl_zwrite_get_message(&z), buff, owl_zwrite_get_zsig(&z)); 1571 owl_zwrite_free(&z); 1572 return (NULL); 1588 1573 } 1589 1574 … … 1591 1576 owl_function_makemsg("Not enough arguments to the zcrypt command."); 1592 1577 } else { 1593 tmpbuff = owl_strdup(buff); 1594 owl_function_zwrite_setup(tmpbuff); 1595 owl_global_set_buffercommand(&g, tmpbuff); 1596 owl_free(tmpbuff); 1578 owl_function_zwrite_setup(buff); 1579 owl_global_set_buffercommand(&g, buff); 1597 1580 } 1598 1581 return(NULL);
Note: See TracChangeset
for help on using the changeset viewer.