1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721
|
EPIC5-3.0.3
*** News 2/27/2025 -- EPIC5-3.0.3 (2157 - Obturation) released here
The third bugfix release for EPIC5-3.0
*** News 2/27/2025 -- ^X{#RRGGBB} support, $rgb()
The $rgb() function outputs a ^X RGB code. However, if it is
immediately followed by a comma, such as:
/echo $rgb(FF00FF),01 more text
then the ",01" would be interpreted as part of the color code.
To address this, ^X RGB codes can be surrouned by curly braces,
which makes the syntax unambiguous. This only works for RGB
color codes, not for 256-color codes.
The $rgb() function now uses this feature to fix the problem.
EPIC5-3.0.2
*** News 12/02/2024 -- EPIC5-3.0.2 (2154 - Peregrination) released here
The second bugfix release for EPIC5-3.0
*** News 11/27/2024 -- Easier way to specify SSL server (port prefix)
In a server desc, you have specified that a server does ssl
by using :type=irc-ssl: but that's a hassle. Other clients
permit you to prefix the port with a + sign to indicate this,
and so i figured, as long as i'm playing santa claus...
/server irc.host.com:+6697
*** News 11/27/2024 -- Auto-detection of SSL servers [experimental]
If you try to connect to an irc server's SSL port, it closes
the socket without sending any data back. The client now
detects this, and if a non-ssl server closes the socket without
sending any data back, the server's "type" will be unconditionally
changed to "IRC-SSL" and then will try again. I am 50% sure I am
going to regret this, but carpe diem, i suppose.
*** News 11/26/2024 -- New flag, /EXEC -EXIT {code} (rb fusion)
Although there is already /EXEC -END {code} and /WAIT -CMD to
run callbacks after a process ends, neither of those interact
with /ON EXEC_EXIT or /SET NOTIFY_ON_TERMINATION.
Fusion asked if there was a way to defeat the "process exited"
message of /SET NOTIFY_ON_TERMINATION on an /exec-by-/exec
basis. So the flag /EXEC -EXIT {...} was added. I will admit
that having two ways to run code seems confusing, so I will just
say that this callback is run *instead of* /on exec_exit or
/set notify_on_termination handling. So you should only use it
to format messages about the process exiting.
You can do /exec -exit {#} ls to (eg) suppress all that
*** News 11/26/2024 -- /AWAY restatement
When you do /AWAY <message> you tell the client you are away.
The client then tells the server you are /AWAY. Later on, you
do /AWAY and the client tells the server you are no longer away.
But the notion of "am i away?" is a client-side thing, and it is
triggered on whether you have set an away message, and not whether
the server has acknowledged your away-ness.
So $serverctl(GET x AWAY) returns your away message, and $isaway()
is triggered based on whether you have an away message. Fusion
pointed out there was no way to know whether the server thought you
were away or not, since the client has never tracked the 305/306
numerics.
So now the client tracks the 305/306 numerics which tell us whether
the server thinks we're away or not. This is available via
$serverctl(GET x AWAY_STATUS)
For backwards compatability reasons, _absolutely nothing_ that changes
its behavior if you are "away" is changing here. That continues to
be controlled only on whether you have set an away message (or not)
*** News 09/05/2024 -- EPIC5-3.0 (2139 - Brigadoon) released here
This is the third production release of EPIC5
*** News 08/23/2024 -- EPIC5-2.6 (2137 - Sedulous) released here
This is the third release candidate for EPIC5-3.0
*** News 08/20/2024 -- EPIC5-2.4 (2136 - Sedulous) released here
This is the second release candidate for EPIC5-3.0
*** News 08/18/2024 -- EPIC5-2.2 (2135 - Sedulous) released here
This is the first release candidate for EPIC5-3.0
*** News 08/18/2024 -- /SET RANDOM_SOURCE now has no effect
EPIC has traditionally had 4 random number generators:
They have been replaced with just using OpenSSL's BYTES_random().
Using /set random_source now has no effect.
*** News 08/18/2024 -- SOCKS support retired
SOCKS4 and SOCKS5 support has been sunset. It was 28 years old.
*** News 08/18/2024 -- Flood control support retired
Flood control is a historical ircII feature that solved
a problem we used to have with pre RFC1459 servers.
Flood detection, as a concept, hasn't been relevant in
30 years. The /on flood and /set flood_* variables have
been retired.
*** News 06/14/2024 -- EPIC5-2.1.13 (2125 - Sockdolager released here
People like to see releases occasionally!
*** News 06/12/2024 -- I didn't document stuff for a long time
You'll notice a lot of things documented on this date. That's my fault.
I've been making changes but not updating this file with the docs.
These changes were not all made on this day, but in the past year. ;-)
I included the commit id in case that is useful.
*** News 06/12/2024 -- Restatement of $rgb() behavior (commit 2123)
Whatever it was I said about $rgb(), i take it back, now that proper
RGB/24-bit color is now supported. This is how it works now:
$rgb() takes two, space-seperated colors -- a fg color, and bg color.
A color can be one of these:
- The color is omitted (it won't be changed)
1,2,3 The color as three decimal numbers (0-255)
1 2 3 The color as three space-separated decimal
numbers (0-255)
#AABBCC The color as a hash and 6 hex digits
The return value is a full properly formatted ^X code that you can
/echo or whatever to set the color.
The fg and bg colors can be in any of the above formats, and you can
mix and match them.
If you pass it a syntax error, it will return an empty string.
The JSON arguments are now:
current: r g b attr
added: bg_r bg_g bg_b
You can see some useful examples in the 'regress/color256' script.
*** News 06/12/2024 -- RGB/24 bit color support (rb everybody) (commit 2123)
EPIC now supports RGB/24-bit colors natively.
Specify a RGB color with ^X#, as in:
^X#AABBCC set the fg only
^X#AABBCC, you can use comma, bg is optional
^X#AABBCC,DDEEFF you can specify both at the same time
^X#,DDEEFF set the bg only (note the leading comma)
EPIC will also parse ^[[28m and ^[[38m RGB codes and convert them to
the above formats.
EPIC no longer approximates RGB colors into the 256-color space.
RGB colors are output as RGB colors. So your terminal emulator needs
to support that, or you'll have a bad time. Let me know if this is a
problem for you.
None of this supplants 256 colors, which are still supported exactly as
they have always been. However, because every terminal emulator supports
256 colors, and because colors 0-15 are the same between "basic" colors
and 256 colors, "basic" colors map to 256 colors now. Let me know if your
terminal emulator doesn't support 256 colors!
*** News 06/12/2024 -- status sub-expandos now protect from expansion (2106,2123)
Some status bar expandos use "sub-expandos". The primary expando
is controlled by (eg) /set status_mode, which is used by %+.
Usually this is set to " +%+ ", so the sub-expando value (the
channel's mode) is substituted in the %+. But what happens if
you have /set status_does_expandos on, and someone does something
that causes your status bar to include rogue data?
Example:
/mode #chan +k $exec(rm -rf ~)
You wouldn't want that expanded! So all subexpandos now get
"quoted" so that doesn't happen.
The above is a bad example, because /set status_mode has always
done this protection. I was asked to extend this protection to
every status subexpando.
*** News 06/12/2024 -- Add $hex(<digits> <number>) (commit 2114)
Convert a decimal number into a hex number without fuss.
Also ensures correct zero-padding. Useful for converting
decimal numbers to RGB portions!
Example:
$hex(255 2) returns "FF"
$hex(10 2) returns "0A"
$hex({"value": 10, "digits": 2}) returns "0A"
*** News 06/12/2024 -- Improvements to 'reconnect' script (commit 2112)
The 'reconnect' script now supports these new /set's:
* /set auto_reconnect_delay_method [ON|OFF]
* /set auto_reconnect_join_delay <seconds>
When /set auto_reconnect_delay_method OFF (default behavior)
- All chnanels are rejoined at once as soon as you are connected.
When /set auto_reconnect_delay_method ON
- Channels will be joined one-at-a-time, one-per-second,
starting after /set auto_reconnect_join_delay seconds,
*** News 06/12/2024 -- Add /WINDOW LISTER "refnum [refnum]" (commit 2111)
Given a double-quoted space-separated list of words, do what
/WINDOW LIST would do, but only for those windows. This allows
you to sort the window listing order.
*** News 06/12/2024 -- Add $windowctl(GET x CURRENT_CHANNEL) (commit 2109)
This tells you what the current channel is for a window.
How did it take so long for me to add this?
*** News 06/12/2024 -- autoconf, make uninstall (commit 2106)
EPIC's configure script now works with autoconf-2.71, and the
Makefile now includes 'make uninstall' which does its best.
*** News 06/12/2024 -- /set blank_line_indicator (rb harzelien) (commit 2105)
The default value of this is "unset" which is the historical behavior.
Traditionally, a window starts off its life empty, and from time to
time parts of it might be empty (ie, after a clear). If you want to see
that a line is explicitly "missing" rather than blank, this set will be
used for each blank line
Example:
/set blank_line_indicator ~
makes missing lines ~, like vi does
*** News 06/12/2024 -- Add $symbolctl(GET <var> 0 BUILTIN_VARIABLE ORIG_DATA) (commit 2105)
Builtin variables (ie, /SET) are initialized when the client starts.
You can later change the value. But if you want to reset the value
to the "initial" value, you can fetch that value here.
Example:
/set banner $symbolctl(GET banner 0 BUILTIN_VARIABLE ORIG_DATA)
*** News 07/17/2023 -- New /ON, /ON PING (rb skered)
The /ON PING will be thrown when the server sends you a PING
after you've been idle for some time. Yes, you can suppress
the default handling, which will probably result in you being
disconnected. Whatever floats your boat.
$0 - The server that sent you the PING
$1- - The ping message itself.
Do /QUOTE PONG $1- to respond
*** News 10/26/2022 -- Basic CAP support, /load capctl (zlonix)
The /load capctl script, written by zlonix, provides
the /CAPCTL command, which permits you to register CAPs
that you wish the client to activate on your behave when
you connect to a particular server.
Turning on arbitrary CAPs results in unspecified behavior
(ie, if it breaks things, that's not a bug)
Turning on 'account-tag' or 'multi-prefix' should be safe.
*** News 10/26/2022 -- New built in function, $tags() for CAP tags (zlonix)
If you turn on the CAP 'account-tag', some servers (which
includes ZNC) will start sending you CAP tags, which you can
fetch with $tags(). How to parse and/or use them is left for
future expansion. Stay tuned.
*** News 10/26/2022 -- New server description field "cert" (client certs)
Some servers support "client certificates" for their SSL connections.
Client certificates are similar to server certificates -- they verify
your identity to the server. Some networks use this for authentication
with servers.
You create a *.pem cert, using the same instructions as for every other
client, and then provide that file in the "cert" field:
/server irc.network.com:6697:type=irc-ssl:\
cert=/home/user/.certs/network.pem
"cert" does not support tildes in filenames. Use $realpath() for that.
*** News 08/11/2022 -- New concept to the /CLEAR command
When you /CLEAR a window, it's empty, right? But quite a few
operations can result in a window getting bigger. You can
/WINDOW GROW or /WINDOW CLEARLEVEL or you can resize the screen.
Usually when everything in a window fits in the new size, but
does not take up all of the room, EPIC has to decide what to do
with the new space. Does it redisplay info that was previously
scrolled off? ("pinning the bottom") Does it display blank lines
at the bottom of the window? ("pinning the top").
People disagree on this point, and that's part of why the
/WINDOW SCROLLADJ feature exists. But it's clear that a second
signal is important -- the /CLEAR command.
Each time you /CLEAR (or /WINDOW CLEAR) it will set the window's
"clear point". When EPIC adjusts a window's scrollback to fill
in blank lines, the top of the window can never go before the
"clear point", and so that's how it will decide whether you
want to redisplay old stuff, or keep blank lines on the bottom.
The /UNCLEAR command unconditionally "pins the bottom", and for
backwards compatability, it ignores the "clear point". However,
if you want it to honor the clear point, use /UNCLEAR -NOFORCE
*** News 07/24/2022 -- New commands, /CTCP_CLOAK and /CTCP_UNCLOAK
These are implemented by the /LOAD ctcp script, which is
part of the default experience
"Cloaking" a CTCP means to treat a built-in CTCP as though
it were not a built-in CTCP.
1. It will not show up in CTCP CLIENTINFO
2. Built-in handlers will NOT be called, but it will be
treated like any ordinary unrecognized CTCP
(with /on ctcp_request and /on ctcp)
Usage:
/ctcp_cloak List all cloaked CTCPs
/ctcp_uncloak List all uncloaked CTCPs
/ctcp_cloak name Cloak CTCP "name"
/ctcp_uncloak name Uncloak CTCP "name"
Zlonix wanted to do this:
/ctcp_cloak FINGER
*** News 07/24/2022 -- $ctcpctl(SET x ACTIVE 0|1) and $ctcpctl([IN]ACTIVE)
There are some new $ctcpctl() facilities:
$ctcpctl(SET x ACTIVE 0) - Make a CTCP inactive (cloaked)
$ctcpctl(SET x ACTIVE 1) - Make a CTCP active (uncloaked)
$ctcpctl(ACTIVE) - Return all active CTCPs
$ctcpctl(INACTIVE) - Return all inactive CTCPs
All CTCPs start their life off as ACTIVE automatically.
The user can then inactivate them later.
These facilities are used for /ctcp_cloak and /ctcp_uncloak (above)
*** News 06/15/2022 -- EPIC5-2.1.12 (2078 - Secondment) released here
This release improves build behavior for openbsd and others.
*** News 06/05/2022 -- EPIC5-2.1.11 (2071 - Adynaton) released here
This release is entirely quality improvements, focused on
removing (rather than handling) type punning, and signed-
pointer issues where c99 behaves differently from c90.
*** News 05/22/2022 -- EPIC5-2.1.10 (2059 - Casuistry) released here
This release is entirely quality improvements now that we've
to C99 -- addressing undefined behavior, etc.
*** News 05/09/2022 -- EPIC5-2.1.9 (2053 - Decoupage) released here
*** News 05/09/2022 -- EPIC5-2.1.8 (2052 - Decoupage) released here
I screwed up the release of 2.1.8 so I redid it as 2.1.9
*** News 05/09/2022 -- EPIC is now a C99 program
As of this release, EPIC is now expected to be a well-defined C99
program. This release has eliminated all type punning/aliasing
shenanigans (or at least given the compiler fair warning about it)
Type-punning pointer casts are done through unions, as C99 requires.
Consequently, EPIC is now compiled with -O2, which I hope I don't come
to regret.
*** News 05/02/2022 -- New $info() values, $info(Z:*)
$info(Z:configure_args) returns what you passed to 'configure'
$info(Z:compiler_version) returns "$CC -v" that was used
$info(Z:final_link) returns the command used to link epic5
$info(Z:cflags) returns the CFLAGS used during build
$info(Z:libs) returns the libs used during build
$info(Z) returns all the above in a json dict
*** News 04/10/2022 -- Window /LOGs now don't require logged window to exist
There is a question -- do logs log _a particular window instance_
or do they log _any window matching a descirption_? Previously you
could not /log add a window that didn't exist because the window
lookup failed.
Starting now, you can /log add any window you want even if the window
does not exist -- you can /log add a refnum, a name, or a uuid, and
any window that ends up using that refnum, name, or uuid, will log
to the log; not just the window that existed when the log was created.
On the flip side of this, if you are logging a window refnum and then
you change a window's refnum, it might stop logging -- so if you want
to log _a particular window_, log its uuid, for example:
/log add $windowctl(GET 5 UUID)
*** News 04/08/2022 -- Restatement of /WINDOW QUERY
The behavior of /WINDOW QUERY, /WINDOW ADD, and /WINDOW REMOVE
was unified some time ago, but the behavior was inconsistent
and unclear. So the code has been harmonized and now has the
following behavior:
/WINDOW QUERY nick
Add 'nick' to target list and make current target (query)
/WINDOW QUERY nick1,nick2
Add 'nick1' and 'nick2' to target list and make the last
target (nick2) the current target (query)
/WINDOW QUERY
Remove the current target (query) from the target list.
If there are other targets in the target list, then the
previous query will become the new current target (query)
/WINDOW -QUERY
Remove all targets from the window's target list.
There will be no query.
/WINDOW ADD nick
Add 'nick' to target list, but not as the current target
/WINDOW REMOVE nick
Remove 'nick' from the target list. If you REMOVE the
current target (query) then another target will become
the new current target (query)
Don't forget the SWITCH_QUERY keybinding, to cycle between the
targets in a window.
*** News 04/06/2022 -- New functtions $pledge() and $unveil()
These functions call the OpenBSD syscalls, if you're running on
OpenBSD.
$PLEDGE()
======================
Simple Example:
/@pledge(stdio rpath inet dns tty proc)
Read the man page for more information.
Returns:
empty string - pledge(2) is not supported
anything else - the return value of pledge(2)
Complex examples:
/@pledge({"test": true})
Return 1 if $pledge() is supported, and 0 if not.
/@pledge({"promises": "...", "execpromises": "..."})
Pass these values to the 'promises' and 'execpromises'
parameters of pledge(2)
$UNVEIL()
====================
Simple Example:
/@unveil(/path/to/directory r)
/@unveil(/path/to/another/directory wc)
/@unveil()
Read the man page for more information
Returns:
empty string - unveil(2) is not supported
anything else - the reteurn value of unveil(2)
Complex examples:
/@unveil({"test": true})
Return 1 if $unveil() is supported, and 0 if not.
/@unveil({"path": "/path/to/directory", "permissions": "r"})
/@unveil({"path": "/path/to/another/directory", "permissions": "wc"})
/@unveil({"close": true})
Does the same thing as the simple example
*** News 04/04/2022 -- TCL support removed
TCL support passed away quietly this afternoon. It was 19 years old
*** News 04/04/2022 -- Install target de-cruftified
EPIC has been doing lots of strange stuff when you 'make install'
since its earliest days. But in these modern worlds with silicon
chips and whatnots, it makes little sense to compile our own version
of test and ship a weird version of 'bsdinstall'. Make install
is now optimized for how package maintainers actually use it, so
hopefully they'll not have to patch the heck out of epic to make
it behave like all the other programs
*** News 03/28/2022 -- New /SET, /SET AUTOMARGIN_OVERRIDE (default OFF)
Previously, automargin support was conditionally built into
the client at compile time. The default was to include it.
The support is now always included.
Traditionally, the use of the last column depended on whether the
client was convinced your terminal emulator safely supported it.
At the request of skered, this /SET was added that allows you
to force it, even if the client doesn't know how to safely turn
it on. Therefore, using this /SET may cause display corruption
if the final column is used -- and this would not be considered
a bug in the client.
/SET AUTOMARGIN_OVERRIDE ON
Try to use the final column, even if you aren't sure if
it can be done safely -- (at your own risk -- if you have
screen corruption, this is "normal")
/SET AUTOMARGIN_OVERRIDE OFF
Use (or don't use) the final column based on whether the
client is sure (or isn't sure) if it's safe.
*** News 03/27/2022 -- EPIC5-2.1.7 (2011 - Cinereous) released here
*** News 03/21/2022 -- New built in function $rgb()
There are three ways to call the $rgb() function:
1. As three numbers
$rgb(255 0 255)
2. As a string
$rgb(#FF00FF)
3. As kwargs
$rgb({"r":255, "g":0, "b":255, "attr":true})
This will return a string that will change to the indicated color.
(ie, it is of the form ^Xab, where "ab" are two hex digits)
The kwarg version is the only way to prevent prefixing with ^X
(ie, to get the color number). The 'attr' flag is optional.
*** News 03/06/2022 -- New serverctl(DONT_CONNECT), sets the -s CLI
The -s command line option ("dont connect to a server") can now
be set by your ~/.epicrc with
@serverctl(DONT_CONNECT 1)
Obviously this only matters at client startup. Setting it at
any other time is pointless
*** News 03/06/2022 -- New math operator: "??" -- Coalesce
The coalesce operator is a binary operator that returns the left
value if the left value is true-y, otherwise returns the right
value. Therefore, "x ?? y" is shorthand for "x ? x : y"
The operator precedence is the same as "||".
*** News 03/06/2022 -- New /set BROKEN_AIXTERM
Some terminal emulators are silly and don't/can't/won't support
bold and color at the same time, instead insisting that you send
proprietary/non-standard ansi codes that were pioneered by a
vendor that also couldn't get its terminal emulator to properly
emulate real terminals.
If you are using such an emulator, you can /set broken_aixterm
and bold colors will send aixterm codes instead of standard codes.
*** News 02/06/2022 -- What is $serverctl(GET x OPEN)?
Zlonix asked me to document "what does OPEN mean for a server?"
A server is "open" when it has a file descriptor open.
This is entirely different from whether it is connected to IRC.
(for that, use $serverctl(GET x CONNECTED))
When a server is "open" then it is under the active management
of the client. When a server is "closed" then the client has
stopped paying attention to it and nothing further will happen
with it until the user (or script) does something.
During the course of a connection, several *different*
file descriptors get used by a server as it goes through the
server states:
Server State Is "Open"? What is fd used for?
------------- ------------- ----------------------------
CREATED No
RECONNECT No
DNS Yes* DNS helper subprocess
CONNECTING Yes* socket that is not yet connect()ed
SSL_CONNECTING Yes* connected socket not yet ssl'd
REGISTERING Yes socket that is trying to get on irc
SYNCING Yes socket that is on irc
ACTIVE Yes socket that is on irc
EOF Yes* socket that has seen an end-of-file
ERROR Yes* socket that has fatal error
CLOSING Yes* socket that is shutting down
CLOSED No
DELETED No
* - Just because a server is "open" does not mean that it is useful
for IRC purposes. It only means that the fd has not yet been
closed at the OS level. These states still have an 'fd that
has not been close(2)d', but don't represent useful states
*** News 02/05/2022 -- New $serverctl(GET x NEXT_SERVER_IN_GROUP)
This will return the server that /server + will connect to
*** News 11/11/2021 -- $json_implode() takes kwargs, adds "compact mode"
The standard behavior of $json_implode() is to take a single word
as an argument, the root of a assign tree to convert into a json
object.
$json_implode(q) # Collapse $q.* into json object
The standard behavior of $json_implode() is to return a "human-
formatted" string, with newlines and indentation. This is nice
for looking at, but isn't appropriate for every situation.
So $json_implode() is our pilot test for json object argument lists.
It now supports the following two arguments:
root string The root of the assign tree (required)
compact boolean false - return human readable (default)
true - return one line
Example:
@ q.one = [val1]
@ q.two = [val2]
then,
$json_implode({"root": "q", "compact": true})
would return
{"one":"val1","two","val2"}
*** News 11/18/2021 -- New concept -- json object as argument list ("kwargs")
You'll start noticing something new happening more and more.
The idea of "json object as an argument list" is being introduced,
to allow passing of parameters in a more deterministic way.
JSON objects (also known as "dicts") are a collection of key-value pairs.
{ "field1", "val1", "field2", "val2"}
You already operate on these with $json_implode() and $json_explode().
Most RESTful APIs in the world send and receive them.
For backwards compatability reasons, of course, this feature will be
rolled out on a case-by-case basis whenever it seems appropriate.
But, occasionally, a new feature might be available only through json
object arguments because it makes sense.
*** News 10/06/2021 -- EPIC5-2.1.6 (1981 - Impignorate) released Here
*** News 09/21/2021 -- Another round of clang static analysis
Somewhere around here we did another round of static analysis
with clang's analyzer, and fixed whatever it recommended.
*** News 09/19/2021 -- "reconnect" script has been reimplemented
The reconnect script has been renamed to "reconnect.orig".
If you want the original behavior, just /load reconnect.orig
The new script is based on improvements we've made in epic5
to make reconnection logic more reliable and dependable.
*** News 09/11/2021 -- New option, $serverctl(GET x PADDR)
The $serverctl(GET x PADDR) returns the server's presentation
address. This is "1.2.3.4" for ipv4, or "2600::1" for ipv6.
This represents the IP address we're connected to.
*** News 09/11/2021 -- New /window operation, /WINDOW CLEARREGEX <regex>
This was requested by Zlonix.
The /WINDOW CLEARREGEX <regex> operation removes all items from
the window's lastlog whose text (what you see on the screen)
matches the <regex>. Removing them from the lastlog removes
them from the scrollback and your screen as well. This is useful
for making conversations with annoying bots go away retroactively.
Example: /window clearregex annoybot
*** News 09/11/2021 -- New /ON, /ON RECONNECT_REQUIRED
The /ON RECONNECT_REQUIRED hook is thrown by the client when it
feels that a reconnection intervention is appropriate.
We are going to start this small, and build in more use cases
as we go forward.
1. When server is in ACTIVE state and the socket dies
2. When a write to the server fails
In these situations, your script should take whatever measures
are necessary to save the state of windows, channels, etc,
in preparation for the upcoming disconnection.
This /ON is thrown while the server is in a state of chaos.
The internal state of the system is wrong, and you must assume
that the connection to the server has already been lost.
YOU MUST _*_*_NOT_*_*_ try to do anything clever in this /on.
If you have this idea of moving windows or servers or channels,
please don't! I recommend setting up /timer's and /defer's so
you can do those sorts of changes away from the blast radius.
YOU MUST _*_*_NEVER_*_*_ attempt to do any direct intervention
in this /on -- instead, you should save information and create
a timer to deal with the problem later. YOU HAVE BEEN WARNED.
/ON RECONNECT_REQUIRED currently provides this information
$0 The server that unexpected failed on us.
Reconnection will be required. Remember,
you cannot do reconnection in the /on, you
have to schedule it to happen "later"
*** News 09/08/2021 -- New /window operation, /WINDOW CLEARLEVEL [levels]
This was requested by Zlonix.
The /WINDOW CLEARLEVEL [levels] operation removes all items from
the window's lastlog of the levels you specify. Removing them
from your lastlog removes them from your screen as well. This is
useful for making noise go away retroactively
Example: /window clearlevel joins,parts,quits,kicks
*** News 09/08/2021 -- New statement type: block-with-arglist
The ircII syntax now supports a new statement type, which I'm
calling a "block with arglist"
(arglist) {block}
You could also think of this as an "inline anonymous function".
For the purposes of the statement, $* is modified by (arglist)
and then {block} is run.
Please note there are several caveats to this:
1. Arglist is not magic, it is syntactic sugar. So it creates real
local variables, and those local variables have their ordinary
scope. So they will persist after the end of the statement.
2. The statement only modifies $* during the statement itself.
So after {block} is run, $* goes back to what it was originally.
3. Note that this is a *statement* and not a *block* so if you are
working with something that expects a block, wrap it in {}s to
create a block.
if (# == 3) {(arg0, arg1, arg2) {... code ...}}
4. Arglist processing isn't "free" so doing it in a tight loop will
be slower than doing it outside of the loop
*** News 09/07/2021 -- Pass window refnum in /ON CHANNEL_LOST
The /ON CHANNEL_LOST hook now provides the window that a channel
was in as $2
$0 - The server refnum of a channel
$1 - The name of a channel
$2 - The window refnum of a channel
*** News 09/06/2021 -- Functions for JSON document handling
Some time ago some new functions appeared for handling
JSON documents, but they were not documented. So now
I am going to document them!
CONVERTING JSON DOCS TO /ASSIGNS
--------------------------------
Syntax: $json_explode(varbase json-document)
An example is worth a thousand words:
$json_explode(e {"one": 1, "two": { "sub1", "hi", "sub2", "bye" })
will result in three new assigns
$e[one] -> 1
$e[two][sub1] -> hi
$e[two][sub2] -> bye
CONVERTING ASSIGNS TO JSON DOCS
-------------------------------
Syntax: $json_implode(varbase)
This converts everything under $varbase[*] into a JSON doc.
HANDLING ERRORS
--------------
If there is an error, $json_error() will tell you about it.
*** News 09/06/2021 -- SSL handling improvements (take 2)
The other day I posted some info on how the SSL handling has been
improved. But then things got revamped again, so I delete the old
info and am replacing it with this info.
1) Step one - You connect to an SSL server
You connect to an irc server doing something like
/SERVER irc.example.com:6697:type=irc-ssl
This goes through connect()ing to the server, and then doing an
SSL_connect() to set up the certificate exchange and TLS negotiation.
2) Step two - The SSL handshake is completed
After the SSL_connect() step has completed, we now have a fully
functioning TLS socket with an SSL certificate. Before we use the
TLS socket, we're supposed to verify we trust the SSL certificate,
to ensure we're talking to who we think we are.
3) Step three - The client watches the certificate verification
OpenSSL "verifies" the certificate and the client provides
a C function to tag along for the ride. The callback function
is called every time:
(1) An error is discovered, or
(2) There are no (further) errors in a certificate.
Thus, if a certificate is trusted, it will only report
"no problems" for each link in the chain.
This permits the client to trap and categorize every error that
happens - some certificates have multiple problems! There are
three buckets the client uses:
(1) Self-signed certificates
(2) Incorrect-hostname certificates
(3) Any other (serious) error
The client tracks the "most serious error" (if there is one),
using the above priorities.
4) Step four - The cliet offers you /ON SSL_SERVER_CERT
The client sets $serverctl(SET <refnum> SSL_ACCEPT_CERT -1)
and then throws /ON SSL_SERVER_CERT. The use of -1 is on
purpose so the client can determine whether your /ON handler
sets it to 0 or 1.
If your handler does a $serverctl(SET <retval> SSL_ACCEPT_CERT 0|1)
then that is taken as the final disposition of the handling, and
nothing further occurs. (ie, it skips the rest of the steps)
Parameters of /ON SSL_SERVER_CERT
$0 The fd of the socket
(Use $serverctl(FROM_SERVER) to get the server refnum)
$1 Certificate Subject, url-encoded
$2 Certificate Issuer, url-encoded
$3 Bits used in the public key
$4 OpenSSL error code of the "most serious error"
(18 is "Self-signed certificate",
62 is "Hostname mismatch",
everything else is irregular/bad)
$5 The SSL regime being used (ie, TLSv1.2)
$6 The Certificate Hash
$7 Was there a hostname mismatch? 0 = no error, 1 = error
$8 Was there a self-signed error? 0 = no error, 1 = error
$9 Was there another (serious) error?
0 = no other error 1 = other error
$10 Was there any error of any kind?
0 = no errors of any kind, 1 = some kind of error
5) Step five - The client makes a provisional decision
Next, the client looks at the errors and decides whether
it thinks the cert is ok.
* Cert has no errors -> ACCEPT
* Cert has "self signed" or "wrong hostname" error
and /SET ACCEPT_INVALID_SSL_CERT ON -> ACCEPT
* Cert has "self signed" or "wrong hostname" error
and /SET ACCEPT_INVALID_SSL_CERT OFF -> REJECT
* Cert has any serious error -> REJECT
The client sets this provisional value with
$serverctl(SET <refnum> SSL_ACCEPT_CERT 0|1)
6) Step six - The client offers you /ON SERVER_SSL_EVAL
Then, the client hooks /ON SERVER_SSL_EVAL. At this point,
all of the information your script needs to make a fully
informed decision to accept or overrule the client's choice
is available. Your handler is not obligated to make any
change, but it certainly can if it wants to
Parameters of /ON SERVER_SSL_EVAL
$0 The server refnum
$1 The "ourname" of the server (what you /server'd to)
$2 Was there any error at all?
0 = no errors of any kind 1 = some kind of error
$3 Was there a hostname mismatch? 0 = no error, 1 = error
$4 Was there a self-signed error? 0 = no error, 1 = error
$5 Was there another (serious) error?
0 = no other error, 1 = other error
$6 What does the client suggest?
0 = reject certificate, 1 = accept certificate
Using $serverctl() to get info about the certificate
Use $serverctl(GET <refnum> <item>) where <item> is:
SSL_CIPHER The encryption cipher being used
SSL_PEM The certificate (in PEM format)
SSL_CERT_HASH The certificate's hash
SSL_PKEY_BITS The bits in the public key
SSL_SUBJECT Who the cert was issued to
SSL_SUBJECT_URL Who the cert was issued to (url-encoded)
SSL_ISSUER Who issued the cert
SSL_ISSUER_URL Who issued the cert (url-encoded)
SSL_VERSION What version of SSL being used (ie, TLSv1.2)
SSL_SANS Subject Alternate Names in the cert
SSL_CHECKHOST_ERROR Hostname Mismatch error - 0 (no) 1 (yes)
SSL_SELF_SIGNED_ERROR Self-signed error - 0 (no) 1 (yes)
SSL_OTHER_ERROR Any other (serious) error - 0 (no) 1 (yes)
SSL_MOST_SERIOUS_ERROR The OpenSSL error code of the most serious error
18 (self-signed) and 62 (hostname mismatch)
are considered non-serious (routine) errors
SSL_VERIFY_ERROR Any error at all - 0 (no) 1 (yes)
SSL_ACCEPT_CERT Is this cert headed for acceptance? 0 (no) 1 (yes)
Use $serverctl(SET <refnum> SSL_ACCEPT_CERT 0) to reject the cert
Use $serverctl(SET <refnum> SSL_ACCEPT_CERT 1) to accept the cert
If you don't do anything, the client will do the most reasonable thing
7) Step seven - The client moves forward
Finally, everyone has had a chance to weigh in.
Whatever the value of $serverctl(GET <refnum> SSL_ACCEPT_CERT)
is after all this, is used to accept or reject the SSL connection.
*** News 09/02/2021 -- Configuring SSL Ciphers
Now, if you know what you are doing, you can set
the SSL Ciphersuites that the client will use for
SSL connections, via
/SET SSL_CIPHERS <stuff>
If you don't know what you're doing, don't touch.
The default value is "unset", which means we let
openssl choose the ciphers for us.
*** News 09/02/2021 -- SSL Handling improvements
[replaced -- see above]
*** News 08/30/2021 -- New server description field "ssl-strict"
[this feature was removed]
*** News 05/29/2021 -- EPIC5-2.1.5 released here (Fecund) (Commit id: 1945)
*** News 05/25/2021 -- Updated configure to autoconf-2.69
We upgraded configure from autoconf-2.13 to 2.69 here.
Along the way, we fixed the support for python3.8+
*** News 05/20/2021 -- Windows have UUIDs ($windowctl(GET x UUID))
Every window now receives an immutable UUID when it is
created. This UUID is globally unique and cannot be changed.
Although the UUID is not user-facing (as in /window list),
you can get it with $windowctl(GET refnum UUID).
The UUID is an lval (that is, it does not contain hyphens),
so you can use it as part of a variable name if you wish.
*** News 05/20/2021 -- New concept, "claiming channels"
When EPIC receives a protocol JOIN message for a channel,
it has to decide what window to put the channel in.
A common request has been the opportunity to let scripts
decide where new channels should go, rather than it being
hardcoded.
So now when a JOIN is received, an /ON will be thrown
(see below) which is an invitiation for your script to do
whatever preparatory work for the channel you see fit.
One thing in particular is /WINDOW CLAIM (see below), which
tells EPIC which window the channel should be put into.
As part of this process, EPIC will suggest a window the
channel should go into, unless you choose to overrule that.
*** NONE OF THIS APPLIES TO /JOIN or /WINDOW CHANNEL
when the user is deliberately moving a channel they are
already on between windows. You can't stop that.
*** News 05/20/2021 -- New /ON, /ON CHANNEL_CLAIM
The /ON CHANNEL_CLAIM is thrown when a JOIN is received,
but before the client has assigned the channel to a window.
$0 - The server refnum
$1 - The channel being joined
$2 - The window refnum epic proposes to put the
window into.
If your handler does /WINDOW CLAIM in any particular window,
then the channel will go to that window that you specify.
At this time, you can only do /WINDOW CLAIM in a window that
is connected to the server in $0. In the future, this will
probably change. But for now, a /WINDOW BIND in a "window
connected to the wrong server" is treated as invalid.
If you do not do a valid /WINDOW CLAIM, then the channel will
go into the window proposed by EPIC.
*** News 05/20/2021 -- New /WINDOW operation. /WINDOW CLAIM #channel
During the handling of an /ON CHANNEL_CLAIM, you may perform
the /WINDOW CLAIM operation to direct EPIC to put the new
channel into a particular window.
You must pass the name of the channel as a paraemter.
It is available as $1 in the /on.
You may only claim the channel in a window that is connected
to the correct server (from $0). Attempting to claim a
channel in a window connected to the wrong server is invalid
and has no effect. This will change in the future.
*** News 05/20/2021 -- $uuid4() can now return lvals (NODASHES)
You can now get a uuid4 that is valid as an lval if you
supply NODASHES as the only argument
@ a.$uuid4(NODASHES) = [whatever]
ALL ARGUMENTS TO THIS FUNCTION ARE RESERVED FOR FUTURE EXPANSION.
There are now two defined behaviors:
$uuid4() - UUID4 with dashes
$uuid4(NODASHES) - UUID4 without dashes
EVERYTHING ELSE IS UNDEFINED BEHAVIOR (ie, other arguments may
do something today, but forwards compatability is not guaranteed)
*** News 03/26/2021 -- EPIC5-2.1.4 released here (Redound) (Commit id: 1927)
*** News 02/13/2021 -- /UNLOAD now supports /TIMERs
If you create a /TIMER in a script you /LOAD with /PACKAGE
the timer will be tagged just like any aliases or assigns
or ons or whatever.
Note that /TIMERs are _not_ tagged if they are created
after /load time. This includes but is not limited to
timers created by aliases that are tagged; as well as
timers that create new versions of themselves (but it
will catch timers that run forever)
*** News 02/10/2021 -- New /WINDOW operation, /WINDOW UNCLEAR
There was already an /UNCLEAR command, and a /CLEAR and
/WINDOW CLEAR command, but there was no /WINDOW UNCLEAR.
WHy not? Anyways...
*** News 02/07/2021 -- Low level operations on cutbuffer - $inputctl()
Harzilein asked if there was a way to manipulate the cutbuffer
without having to put something in the input line. As it happens,
that has never been requested before. So here we go!
$inputctl(GET cutbuffer)
This returns the cut buffer. This is the same as $U
$inputctl(SET cutbuffer ... new value ...)
This sets the cut buffer. This would be effectively
the same as:
* Saving the input line (with $L)
* Erasing the input line (parsekey ERASE_LINE)
* /TYPEing what you want into the cut buffer
* Erasing the input line (to put it into the cut buffer)
* /TYPEing the origial input line
But this doesn't require you to disrupt the input line.
Please remember that there is only one cut buffer,
and a large number of operations replace it -- so
whatever you put in the cut buffer, use it quickly,
or the user might clobber it.
*** News 02/05/2021 -- /ON SERVER_STATUS changed to /ON SERVER_STATE
Some expressed some confusion about whather "SERVER STATUS"
and "SERVER STATE" were the same thing, and what the states
were and what they meant. To reduce this confusion, there
will be only one term, "SERVER STATE". However, much code
already uses "SERVER STATUS". So we have to support both.
For now, /ON SERVER_STATUS and /ON SERVER_STATE will both
exist side by side. However, I recommend you use
/ON SERVER_STATE for new code, and think about migrating
your old code. There will come a day when /ON SERVER_STATUS
will beoome an alias for /ON SERVER_STATE.
To be unambiguous, using /ON SERVER_STATUS will never break.
But you should know the official name is going to be
SERVER_STATE.
The stock scripts have been updated. You can get the changes
by making sure to do a 'make install'
*** News 02/05/2021 -- $serverctl(GET x STATUS) changed to STATE
As per the above, both $serverctl(GET x STATUS) and
$serverctl(GET x STATE) will return the server's state.
However, you are encouraged to start using "STATE", since
that is now the official term for it.
The stock scripts have been updated. You can get the changes
by making sure to do a 'make install'
*** News 07/03/2020 -- New /WINDOW operation, /WINDOW DELETE_KILL
Harzilein pointed out:
1) You cannot delete the last window on a screen
2) Deleting a screen does not kill a window
3) Therefore, deleting a screen necessarily orphans a window
But what if you don't want to orphan a window when you kill a
screeN?
The /WINDOW DELETE_KILL operation does a /WINDOW DELETE and
then does a /WINDOW KILL on the window that was the current
window. There are several caveats to this *which i reserve
the right to change in the future*
Caveat 1) Only the "current window" gets killed. So if you
DELETE_KILL a screen with multiple windows, other windows
will be orphaned in the ordinary way. I reserve the right
to change this behavior (it will be documented)
Caveat 2) If you cannot kill the window for other reasons,
such as /window killable off, then the attempt to kill the
window will fail, and it will be orphaned.
*** News 05/11/2020 -- EPIC5-2.1.2 released here (Lugubrious) (Commit id: 1908)
*** News 05/09/2020 -- New built in function $execctl()
You can now program the /EXEC command with this low level function
--- warning ---
Many of the things you can set here are not sanity checked.
If you feed it garbage in, you will get garbage out.
If you need safety rails, use the /EXEC command.
--- warning ---
Usage:
------
$execctl(REFNUMS)
Get all refnums in the entire system (as integers)
$execctl(REFNUM <description>)
Convert a description (like %3 or %myproc) into a refnum integer
$execctl(NEW <commands>)
Create a new /exec process (does not run it!)
$execctl(LAUNCH <refnum>)
Run an /exec process that hasn't been started yet
$execctl(CLOSEIN <refnum>)
Close the STDIN to the process (this means you can't send any
more data to the program. This is useful for programs
that wait until they've got an EOF from stdin to do their
thing)
$execctl(CLOSEOUT <refnum>)
Close the STDOUT and STDERR from the process (this means
we won't receive any more output from the program. This is
useful if we don't want any more output from the program.
Many programs will die from SIGPIPE if stdout is closed)
$execctl(SIGNAL <signal> <refnum>)
KILL (send a signal) to a process. The <signal> may either
be an integer (like $execctl(SIGNAL 9 3) or it may
be a short name (like $execctlSIGNAL HUP 3) to kill
process 3.
$execctl(GET <refnum> [FIELD])
$execctl(SET <refnum> [FIELD] [VALUE])
You can GET all the fields of the object, and SET some of them.
Some fields cannot be changed after the process is launched.
Field Set? Notes
------------- ------ -----------------------------------
REFNUM No The integer refnum - never repeated.
REFNUM_DESC No The "target" version (ie, %3)
LOGICAL Yes The user-supplied name - must be unique
LOGICAL_DESC No The "target" version (ie, %myproc)
-- This will change if you SET LOGICAL
COMMANDS Yes The commands to run (**)
DIRECT Yes Whether to use a shell (**)
REDIRECT Yes Either PRIVMSG or NOTICE
WHO Yes The target to send output to
-- Output from the process is redirected verbatim
WINDOW_REFNUM Yes The window this exec runs in context of
-- Undefined behavior if window does not exist
SERVER_REFNUM Yes The server this exec runs in context of
-- This is for redirects and code callbacks
LINES_LIMIT Yes How many lines to receive before CLOSEOUT
-- 0 means "no limit"
STDOUTC Yes ircII code for every complete line of stdout
STDOUTPC Yes ircII code for every partial line of stdout
STDERRC Yes ircII code for every complete line of stderr
STDERRPC Yes ircII code for every partial line of stderr
PID No The process id of the process (after launch)
-- This is -1 before launch
STARTED_AT No When the process was created or launched
-- It is first set when creation happens
-- It is last set when launched
P_STDIN No File descriptor to talk to process's STDIN
P_STDOUT No File descriptor to read from process's STDOUT
P_STDERR No File descriptor to read form process's STDERR
-- There is nothing you can do with these.
-- Don't try.
LINES_RECVD No How many lines of output the process has sent
LINES_SENT No How many lines we sent to the process
EXITED No 0 if process has exited yet -- 1 if it has
TERMSIG No The signal that killed the process
-- It is -1 if the process has not died
-- It is -1 if the process exited normally
RETCODE No The exit code of the process
-- It is -1 if the process has not died
-- It is -1 if the process was killed
DUMB No Reserved for future/internal use
DISOWNED No Reserved for future/internal use
(Note: ** - Cannot be SET after launch)
*** News 05/08/2020 -- New flag to /EXEC, /EXEC -NOLAUNCH
The /EXEC -NOLAUNCH flag directs the /EXEC command not to launch
a process that has not already launched. You can launch it later
merely by referencing it with its name or refnum.
/EXEC -nolaunch -name myproc ls -l
/EXEC -nolaunch -limit 5 %myproc
/EXEC %myproc
Many /EXEC operations do not work on an unlaunched process.
*** News 05/07/2020 -- New function, $uuid4()
This function returns a random UUID4 string. If you know what that is,
you might know why it's handy to be able to have one.
ALL ARGUMENTS TO THIS FUNCTION ARE RESERVED FOR FUTURE EXPANSION.
To get the default behavior, pass no arguments to this function.
Forwards compatability is not guaranteed if you pass undefined args
*** News 05/07/2020 -- New /ON, /ON SEND_EXEC
Whenever text is being sent to an /EXEC process, either through /EXEC -IN
or /MSG %proc or a /QUERY or whatever, it is displayed to your screen.
The /ON SEND_EXEC process will let you adorn how this text is displayed,
instead of it just being displayed blankly as it has always done.
*** News 05/07/2020 -- The /EXEC command
The /EXEC command has always been part of ircII, but it hasn't
changed much during EPIC's lifetime. There were some rough edges
related to querying exec'd processes, things not always going
to the windows people expected, some flags not being able to be
used with other flags, etc.
So the /EXEC command has been substantially revamped, with an intention
of everything being "do what i expect". If you find things that are
weirdly behaving, please let me know!
Instead of describing the changes, let's just level-set the behavior:
Every /EXEC command can create or modify one process
[The most general explanation of the syntax]
Modify an existing running exec:
/EXEC [options] %refnum [extra arguments]
/EXEC [options] %logical-name [extra arguments]
Create a new exec:
/EXEC [options] commands to run
/EXEC [options] (commands to run) [extra-arguments]
OPTIONS to /EXEC
[ Options related to sending data to/from the process ]
-CLOSE
Close the process's STDIN, STDOUT, and STDERR
-CLOSEIN
Close the process's STDIN
-CLOSEOUT
Close the process's STDOUT and STDERR
-IN [extra arguments]
Send data to a process
[ Options related to how the process integrates with ircII ]
-NAME
Change the logical name of a process
-OUT
Send all output from the process to the now-current
channel in the now-current window.
-WINDOW
Display all output from or related to the process to the
now-current window.
-WINTARGET <windesc>
Display all output from or related to the process to the
specified window
-MSG [target]
Send all output from the process to the target.
The target can be an irc, dcc chat, or other exec,
or anything you can send a message to.
Messages sent over IRC are sent as PRIVMSGs
-NOTICE
Send all output from the process to the target.
Messages sent over IRC are sent as NOTICEs.
[ Options related to scripting with processes ]
-LINE {code}
Run {code} for each full line of output from stdout of the process.
$* will be the line of output
-LINEPART {code}
Run {code} for each incomplete line of output from stdout of the process.
$* will be the incomplete line of output
-ERROR {code}
Run {code} for each full line of output from stderr of the process.
$* will be the incomplete line of output
-ERRORPART {code}
Run {code} for each incomplete line of output from stderr of the process.
$* will be the incomplete line of output
-END {code}
Run {code} when the process has completed. This means when the process
has exited and all of its output has been processed. (Sometimes this
lags the actual exit)
$0 is the logical process name or its refnum
$1 is the signal that killed it (if it was killed)
$2 is the exit code (if it exited)
[ Options that don't fit in the other categories ]
-DIRECT
Run the program directly -- do not use a shell.
Advantages: The command you give is literally executed
Disadvantages: If you depend on filename globbing or aliases, well, tough
-LIMIT <number>
Read <number> lines from the process and then -CLOSE it.
[ Options related to sending a signal to the process ]
-<signal_number>
Send the signal to the process, similar to kill -<signal_number> <pid>
-<signal_name>
Send the signal to the process, similar to kill -<signal_name> <pid>
Additionally, %<procref> or %<procname> are full blown message targets that you can
/msg or /query or whatever you want, just like all other targets.
[Examples of how this works]
*** News 04/26/2020 -- New python script, 'shortener'
You can load this script with
pyload shortener
This script provides an in-client URL shortening service.
Whenever someone provides a URL in a message, the service
will create a short URL that will be served by an http
redirection server that runs in client
Example:
--------
<nick> hey, please visit www.frobnitz.com/really-long-and-wraps
+onto-the-next-line-so-you-can-tpaste-it
*** http://127.0.0.1:8080/1
Then you can visit http://127.0.0.1:8080/1 and it will
redirect you to the original url.
*** News 02/24/2019 -- EPIC5-2.1.1 (Abulia) was released here
Even though not everything is done, I think I've probably
dragged my feet long enough
*** News 11/28/2018 -- /EXEC -WINTARGET outsputs to a window by name (caf)
The normal behavior of /EXEC is to send the output of a command
to the current window (or is it the OTHER window? I forget)
Before this, you couldn't ordinarily send it to just any old
random window you wanted.
You can use /EXEC -WINTARGET to send it to any window you want:
Example:
/exec -wintarget msgwin ls
*** News 02/24/2019 -- EPIC5-2.1.1 released here (Abulia) (Commit id: 1899)
*** News 02/05/2018 -- CTCP UTC now implemented as script
Given the below feature, CTCP PING support has been
rewritten, and CTCP UTC is now scripted.
*** News 02/13/2018 -- New flag for $ctcpctl(), "REPLACE_ARGS"
There are actually two kinds of CTCPs that replace things
* CTCP PING replaces its argument(s), but is otherwise
handled "normally"
NOTICE nick :\001PING <sec> <usec>\001
becomes
NOTICE nick :\001PING <sec> seconds\001
* CTCP UTC replaces itself entirely:
PRIVMSG nick :\001UTC 1518582810\001
becomes
PRIVMSG nick :Tue Feb 13 22:33:30 2018
So it's not enough to say that "a CTCP handler can replace
itself by returning a string", you need to be able to say
whether this CTCP replaces its arguments only, or whether
it replaces itself entirely.
* $ctcpctl(SET <ctcp-name> REPLACE_ARGS 1)
* $ctcpctl(SET <ctcp-name> REPLACE_ARGS 0)
Select whether or not a CTCP handler that returns a
string replaces its arguments (like CTCP PING) or
replaces itself entirely (like CTCP UTC).
The default is 0 (replace entirely)
*** News 02/05/2018 -- Some CTCPs are now implemented as scripts
YOU NEED TO START DOING /LOAD ctcp IN YOUR STARTUP SCRIPTS.
One of the larger projects in EPIC5 was to move as many
hard coded things into scripts as was feasible, so you,
the user (or the script you're using) can have as complete
control over them. We've moved a lot of functionality out
into scripts.
Traditionally those users who don't have startup scripts
(~/.epicrc or ~/.ircrc) get /load global as their startup
script. One of the things /load global does is /load builtins
which brings in the scripted features.
Now /load builtins will /load ctcp, which implements these
core CTCP functions entirely in ircII, so you are welcome
to modify or remove them, as _you_ choose.
VERSION PING ECHO
CLIENTINFO USERINFO ERRMSG
FINGER TIME
Maybe more will be migrated in the future. But this is a good
start for now. This is also a great example of how to
build your own first-class ctcp handlers!
*** News 02/04/2018 -- User-defined CTCP handlers with $ctcpctl()
You can now create your own first-class user-defined CTCP handlers.
A CTCP handler is a block of code that takes four arguments:
$0 - The person making the request
$1 - The target of the request (you, or a channel you're on)
$2 - The CTCP that was sent
$3- - Arguments (if any) to the CTCP
A CTCP request handler is a CTCP handler that handles incoming
requests (over PRIVMSG). A CTCP request handler can either
(1) generate a response or
(2) substitute something.
A response can be generated with:
/CTCP $0 $2 Your Response Here
A substitute string is /return'ed by your handler, and replaces
the CTCP in the original message.
A CTCP response handler is a CTCP handler that handles incoming
responses (over NOTICE). A CTCP request handler can either
(1) Output the response in a special way or
(2) substitute something
CTCP response handlers are unusual, because the ordinary handling
of CTCP responses is the expected behavior.
Syntax:
* $ctcpctl(SET <ctcp-name> REQUEST {<code>})
Register <code> as a CTCP handler for <ctcp-name> requests.
* $ctcpctl(SET <ctcp-name> RESPONSE {<code>})
Register <code> as a CTCP handler for <ctcp-name> responses.
(Note -- handling responses is unusual. Normally you just
let the client output responses in the ordinary way)
* $ctcpctl(SET <ctcp-name> DESCRIPTION <string>)
SET <string> as the CLIENTINFO for <ctcp-name>. That is,
when someone does /CTCP CLIENTINFO <ctcp-name>, <string>
will be returned as the description for this CTCP.
* $ctcpctl(SET <ctcp-name> SPECIAL 1)
* $ctcpctl(SET <ctcp-name> SPECIAL 0)
Enable/Disable a CTCP as being "Special". A "Special" CTCP
is a remote function call, and handles everything itself.
There are only two "special" CTCPs -- ACTION (/me) and DCC.
I'm not sure if anyone will create a "special" user-defined CTCP
* $ctcpctl(SET <ctcp-name> RAW 1)
* $ctcpctl(SET <ctcp-name> RAW 0)
Enable/Disable a CTCP has requiring the "raw data".
Ordinary CTCPs transport strings, and they have to be recoded
according to /encode-ing rules. But some CTCPs transport
binary data, and so the handler needs access to the raw binary
data. Ordinarily, the raw/binary data is CTCP encoded, which
mens you can pass it to $xform("-CTCP") to recover the raw
bytes (although it might not be a C string, so you can't
assign it to a variable.)
There are corresponding GET operations for the above
You can get all the registered CTCPs with
* $ctcpctl(ALL)
Very soon, quite a few CTCP types will be migrated out to a script that
will be /load'ed from /load global, and you may have to add it to your
own start scripts if you do not /load global.
I need to write much better examples for all this. To look at this you'd
scratch your head and wonder why you care. But being able to add new
CTCPs instead of requiring them to be written in C in a new version of
epic is expected to help a lot of people.
*** News 01/16/2018 -- New status expando %{1}P ("status prefix") and variables
The %{1}P value will expand to a "when window current" or "when window
not current" value. The idea is to put this at the start of your
/set status_format or /window status_format type variables.
When a window is current, %{1}P will expand to either
/window status_prefix_when_current
or
/set status_prefix_when_current
When a window is not current, %{1}P will expand to either
/window status_prefix_when_not_current
or
/set status_prefix_when_not_current
You can use this all in your ~/.epicrc, like so:
set status_format %{1}P%T [%R] %*%=%@%N%#%S%{1}H%H%B%Q%A%C%+%I%O%M%F%L %D %U %W
set status_prefix_when_current ^C37,40
set status_prefix_when_not_current ^C37,44
which will make your status bar white-on-black when current,
and white-on-blue when not current.
EPIC5-2.0
EPIC5-1.8
*** News 08/05/2016 -- EPIC5-2.0.1 released here (Commit id: 1869)
*** News 01/30/2016 -- EPIC5-2.0 released here (Commit id: 1864)
*** News 01/30/2016 -- EPIC5-1.8 released here (Commit id: 1862)
*** News 01/30/2016 -- /WINDOW LOGFILE and /SET LOGFILE more like /LOG FILNAME
Historically, changing a logfile name (with /WINDOW LOGFILE and
/SET LOGFILE) does not affect the log status. This leads to
unexpected behavior if you do /WINDOW LOG ON LOGFILE foo.txt
because /WINDOW LOGFILE only changes the filename the *next* time
you open the log, not affecting the currently open log.
The behavior of /LOG FILENAME is more in line with what people
said they expected. If you change /LOG FILENAME while the
log is ON, then it will 1) close the existing log, 2) change
the filename, and 3) re-open the log under the new name.
The behavior of /WINDOW LOGFILE and /SET LOGFILE have been changed
to match the behavior of /LOG FILENAME -- changing the logfile name
while it is open will close the existing log and open a new one.
EPIC5-1.6
*** News 01/30/2016 -- EPIC5-1.6 released here (Commit id: 1854)
*** News 01/08/2016 -- Per-server vhosts now restrict protocol (ipv4/ipv6)
Historically, the client tries to connect to the server using the
addresses as they are returned in order. (This is a great thing
for round-robin or geographic-aware dns resolvers.)
However, if you have a per-server vhost, you probably intend that
epic use that vhost to connect to the server. But what happens if
your vhost is ipv4 only or ipv6 only, and the first address to the
server is to the other protocol? Historically, epic will just go
ahead and connect without your vhost.
You've been able to correct this behavior by specifying explicitly
the protocol family:
/server irc.foo.com:proto=v6:vhost=irc.leet6.com
Some folks said it violated POLA, so here's a new rule:
"If you set a per-server vhost, then that server can only be
connected to if the vhost can be used. If ths means that no
addresses can be used, then you will not be able to connect
to the server until you clear the vhost."
This rule does not apply to you if you're using /HOSTNAME but
only if you are doing something like
/server irc.foo.com:vhost=irc.leet6.com
*** News 01/01/2016 -- Can now /query an exec process that doesn't exist
Previously, you were forbidden from setting up a /query to an
/EXEC process that didn't exist. That set up a race condition
between running an /EXEC process and being able to corral its
output into a window via the query.
So now you can /query an exec process before you start it.
If you try to send a message to it before you do fire it up,
the user will see a diagnostic telling them that the message
could not be sent to a non-existing exec process.
*** News 01/01/2016 -- New /window operation, /window log_mangle
This allows you to overrule /SET MANGLE_LOGFILES for logs that
you create with /WINDOW LOG ON (only!)
Example:
window logfile "my.windowlog" mangle NORMALIZE,COLOR log on
*** News 01/01/2016 -- New /window operation, /window log_rewrite
This allows you to overrule /SET LOG_REWRITE for logs that
you create with /WINDOW LOG ON (only!)
Example:
window logfile "my.windowlog" rewrite "HOOBOO $1-" log on
*** News 01/01/2016 -- Refinement to $pad(), $[len]var, and $leftpc()
These functions do not behave graciously since our conversion
to UTF-8, since they count code points rather than columns.
It just seems sensible to redefine the behavior of these
functions based on columns, which is what everybody probably
expects them to do.
Function: $pad(len char string)
Summary: Extend, but do not truncate, do not justify 'string'
Definition:
Return 'string' so that it takes up at least 'len' columns.
If it is too short, it will be padded with 'char's until
it is 'len' columns wide.
If it is too long, it is NOT truncated.
Function: $leftpc(len string)
Summary: Truncate, but do not extend, do not justify 'string'
Definition:
Return the first 'len' columns of 'string'.
If it is too short, it will NOT be padded.
If it is too long, it will be truncated on the right end.
Function: $[len]var
Summary: Extend, truncate, and justify $var
Definition:
Return $var so that it takes up EXACTLY 'len' columns.
If it is too short, it will be padded with /set pad_char
until it is 'len' columns wide.
If it is too long, it is truncated.
If 'len' is > 0, then the string is left justified, and
padding (or truncation) happens on the right end.
If 'len' is < 0, then the string is right justified, and
padding (or truncation) happens on the left end.
Function: $fix_width(len justify pad string)
Summary: Extend, truncate, and justify 'string'
Definition:
Return 'string' so it takes up EXACTLY 'len' columns.
If it is too short, it will be padded with 'pad'
until it is 'len' columns wide.
If it is too long, it is truncated.
If 'justify' is "l" then the string is left justified,
and padding (or truncation) happens at the right
If 'justify' is "c" then the string is centered, and
padding (or truncation) happens equally at both
ends.
If 'justify' is "r" then the string is right justified,
and padding (or truncation) happens at the left.
*** News 09/15/2015 -- New /ON, /ON RAW_IRC_BYTES
This new /ON, /ON RAW_IRC_BYTES is the same as /ON RAW_IRC,
except $* is the _raw unmodified bytes_ received from IRC.
Specifically, $* is not guaranteed to be a UTF-8 string, so
functions that expect a UTF-8 string won't work. You should
not try to /ECHO the $* from this /ON.
Just like /on raw_irc, if you catch this hook, you will
suppress normal handling of the event:
/on ^raw_irc_bytes * {echo nothing further happens}
EPIC5-1.4
*** News 08/29/2015 -- EPIC5-1.4 released here (Commit id: 1833)
*** News 08/25/2015 -- Improved automargin support
You can now use automargins to get better wrapping of long urls.
1. Use a terminal emulator that supports automargins
(they pretty much all do)
2. Set your TERM env variable to something that supports automargins
export TERM=vt102am
should do the job
3. Restart EPIC after you've updated the TERM. It's not enough
to just change the TERM and re-attach screen. It's a good
idea to check this when you're upgrading.
4. /SET -CONTINUED_LINE
to get rid of the + thingee
5. /SET FIRST_LINE >
or something if you don't use /set output_rewrite
to prefix every line
6. /SET WORD_BREAK<space><space><enter>
URLs contain commas and dots and semicolons, and you
don't want epic to word break on anything other than
a space.
That should do it! Your display will now use the final column
on the display, and urls should be unmangled when you copy them
If you "forget" to /SET -CONTINUED_LINE or /SET WORD_BREAK and want
to rebreak your windows in order to take advantage of this after
the fact, you can always just do /window rebreak_scrollback.
*** IMPORTANT! ***
Note that you _must_ be running with a TERM supporting
automargins or this will not change things!
You can check this by doing /eval echo $getcap(TERM enter_am_mode)
If it returns blank, then your TERM does not support automargins.
*** IMPORTANT! ***
*** News 08/25/2015 -- New /SET, /SET FIRST_LINE
For those of you who use /SET OUTPUT_REWRITE to prefix every line
of output with something (like a timestamp), you can ignore this.
If you /SET FIRST_LINE, the string will be prefixed before every
logical line of output. This is great if you /SET -CONTINUED_LINE
so you can continue to tell what lines are what.
EPIC5-1.2
EPIC5-1.1.11
*** News 08/09/2015 -- EPIC5-1.2 released here (Commit id: 1817)
*** News 07/20/2015 -- New operation: @serverctl(SET refnum UMODE ...)
You've never been able to SET your UMODE, becuase that never
made much sense. But it was pointed out that the UMODE is used
when you reconnect to establish your initial usermode, and they
wanted to be able to control that.
So now, when the server is disconnected, you can change its umode,
which will be used when you next connect. Try something like this:
on server_lost * {defer @serverctl(SET $0 UMODE i)}
*** News 07/11/2015 -- EPIC5-1.1.11 released here (Commit id: 1810)
*** News 07/09/2015 -- Don't do /redirect @W<refnum> <command>
You can /msg @W4 <stuff> for example to do an /xecho -w 4 <stuff>.
But you can't use this with /REDIRECT because the redirection
itself causes another redirect, and it just gets stuck in an
infinite loop. The client can't protect you from doing this
without a rewrite, so, don't do this. ;-)
*** News 07/09/2015 -- New flag to /ENCRYPT: /ENCRYPT -REMOVE
It was confusing to remove /encrypt's before -- you had to specify
all the arguments but not the password:
/ENCRYPT hop -blowfish
And if you had a PROG crypto, you couldn't remove it at all!
/ENCRYPT hop password program...
(How do you not specify the password in this case?)
Anyways, there is now /ENCRYPT -REMOVE which lets you unambiguously
remove an encrypt for a target
/ENCRYPT -REMOVE hop
*** News 07/09/2015 -- Only one /ENCRYPT per target now.
Traditionally, ircII has only had one cipher type for /ENCRYPT.
EPIC added more cipher types along the way, and it was possible
to set up multiple /ENCRYPT sessions for the same person.
However, as I reflect upon this, this isn't a reasonable thing to
do, because if you do
/ENCRYPT hop -blowfish password1
/ENCRYPT hop -aessha password2
And then you /msg hop, which one should it use?
So I've changed it so when you change the encryption type (such as
in the 2nd line above), it will REPLACE the first one -- you will
only be able to have one cipher session per target.
If this is a problem -- if I broke something for you, please let me
know so we can address your needs.
*** News 04/14/2015 -- New function, $chankey(servref #channel)
The $chankey() function returns the channel for a specified channel.
I created this because $key() doesn't allow you to specify
'servref' but rather uses from_server, which means you have to
wrap it in an /xeval -s to use a non-default server. ick.
Arguments:
$0 - A server refnum
$1 - A channel name
Return Value:
empty string - Either 1.) 'servref' not provided, or
2.) '#channel' not provided, or
3.) You're not on '#channel' on servref, or
4.) #channel doesn't have a key
anything else - The mode +k key for #channel on servref.
*** News 04/14/2015 -- SSL info available via $serverctl(GET refnum SSL*)
You can now get information about live SSL connections:
$serverctl(GET refnum SSL_CIPHER)
The encryption being used, something like "DHE-RSA-AES256-SHA"
$serverctl(GET refnum SSL_VERIFY_RESULT)
0 if the certificate was verified successfully.
Any other value if it did not.
These values match up to the verify(1) man page.
Most notable, error code 20 means that OpenSSL could not find
your local CA file (see /SET SSL_ROOT_CERTS_LOCATION below)
$serverctl(GET refnum SSL_PEM)
This is the PEM (base64) format of the server's certificate.
You could save this to see if it's changed. ;-)
$serverctl(GET refnum SSL_CERT_HASH)
This is the SHA1 digest of the server's certificate.
It is converted into a byte string like AB:CD:EF:01:02:...
$serverctl(GET refnum SSL_PKEY_BITS)
This is the number of bits that the server's certificate
said that the server's public key uses.
$serverctl(GET refnum SSL_SUBJECT)
This is the hostname of the subject of the certificate.
In theory, this is supposed to be the server's hostname.
This could be a wildcard string.
$serverctl(GET refnum SSL_SUBJECT_URL)
This is the SSL_SUBJECT, but passed through URL encoding.
It's useful because the SSL_SUBJECT will have spaces, and
this results in just one word.
$serverctl(GET refnum SSL_ISSUER)
This is the Certificate Authority (CA) that issued the
server's certificate.
$serverctl(GET refnum SSL_ISSUER_URL)
This is the SSL_ISSUER, but passed through URL encoding.
It's useful because the SSL_ISSUER will have spaces, and
this results in just one word.
$serverctl(GET refnum SSL_VERSION)
This is the version of SSL you're using.
It should either be TLSv1 (good) or SSLv3 (bad).
With all of the above information, I hope someone scripts a nice
SSL executive script that caches the certificate information,
tells you whether the connection should be trusted, decides whether
the ssl version is ok, the public key bits are ok, all that stuff.
*** News 04/10/2015 -- New /TIMER argument, /TIMER -SNAP
A "snappable" timer fires off at the "top of the interval".
That means it runs every time ($time() % <interval> == 0)
If you snap to 60, it will run at the top of every minute,
just like mail checking, clock updating, etc. If you snap
to 3600, it will run at the top of every hour.
Example:
/timer -snap -repeat -1 -refnum hourly 3600 {
echo I run at the top of every hour
}
*** News 04/10/2015 -- New script, /LOAD find_ssl_root_certs
This script is loaded by /load global, and you should load it
too, if you're not using /load global; or you should implement
a similar functionality to get /SET SSL_ROOT_CERTS_LOCATION pointing
to the right place for you. Otherwise, your SSL certificates
won't authenticate, and $4 in /on ssl_server_cert will always
be 0, even if the cert is actually legitimate. Or maybe all
of what I just said doesn't matter to you.
*** News 04/10/2015 -- New /SET, /SET SSL_ROOT_CERTS_LOCATION
In order for SSL to verify certificates, it needs to have a copy
of the root certificate authorities. This is usually a file
named "ca.bundle" or "ca-root-nss.crt". You need to /set this
variable to wherever your openssl compatable root ca authority
certificates are. It would help if I understood what I'm talking
about more. Anyways, the script /load find_ssl_root_certs
tries to help you with this.
*** News 04/10/2015 -- Enhancements to /ON SSL_SERVER_CERT
Apparently I've never documented /on SSL_SERVER_CERT.
The /ON SSL_SERVER_CERT hook is thrown every time a successful
connection to an SSL server is made. For now, the only SSL
connections are to IRC servers, but some day I hope to support
DCC as well. For now, this refers only to server connections.
$0 - File Descriptor (need a way to convert to server refnum)
$1 - The "subject" of the certificate -- the server name
$2 - The "issuer" of the certificate
$3 - How many bits are used by the certificate's public key
$4 - Did the certificate validate?
0 = pass, anything else = fail.
(For now, this the result of X509_get_verify_result())
(This depends on /SET SSL_ROOT_CERTS_LOCATION (above))
$5 - What SSL type are we using? (TLSv1 or SSLv3)
$6 - What is the digest of the SSL Certificate?
The idea is you could use $1 to cache the metadata about a
server, and use $2, $3, $4, $5, and $6 to see if anything
changes from one connection to the next.
Probably more additions will come later. I'm especially interested
in passing in the complete plain text certificate +url'd up.
*** News 04/10/2015 -- More robust certificate verification for SSL
Based on a paper written by Roca He, who is doing a research
project on improper use of OpenSSL API by open source software,
the OpenSSL code in epic was reviewed and enhanced. One point
of interest was certificate verification -- epic wasn't doing
any of that. But now it is. This requires OpenSSL to know
where your root/trusted certificate authorities are, and there
are more notes above about how to handle that. The results of
this verification are reflected in /on ssl_server_cert above.
*** News 04/10/2015 -- You can now /encode to /EXEC processes
The /EXEC system is now UTF-8 aware, and you can use the
/encoding command to recode between %procs targets now. yay!
Example:
/encoding %nonutf8prog iso-8859-15
/exec -name nonutf8prog myprog
<output from 'myprog' treated as iso-8859-15,
converted to utf8 for epic's use>
*** News 04/10/2015 -- New scripts: /load sasl_auth, userlist, tmux_away
Zlonix wrote these scripts. I need to write blurbs about each.
Until that time, read the scripts, they're well documented!
*** News 07/24/2014 -- New feature $windowctl(REFNUMS_ON_SCREEN <winref>)
The $windowctl(REFNUMS_ON_SCREEN <winref>) will return all of the
refnums on the screen that contains window <winref>. They are
returned in SCREEN ORDER, ie, from top to bottom.
This was because someone wanted to make the bottom window ONLY
double status bar, so he needed to know which one was on bottom
and which ones weren't.
If <winref> is a hidden window, then it will return all of the
invisible windows, but in no guaranteed order.
If <winref> is 0, then it will return the screen for the current
window, of course.
You MUST specify a window refnum of some sort, even if it's just 0.
*** News 04/19/2014 -- Support for tmux for /WINDOW CREATE
If you run EPIC under tmux, you can now use /window create and it
will create new screens running under other tmux screens, just like
it does for gnu screen. There is also /set tmux_options, but I did
not really test that. What EPIC does is run this command:
tmux new-window "<wserv_path> <tmux_options> localhost [port]"
*** News 04/17/2014 -- /SET TRANSLATION now retired
The /SET TRANSLATION feature which has served us well for many
years is now superceded by /ENCODING, and has been retired.
EPIC5-1.1.10
EPIC5-1.1.9
*** News 04/13/2014 -- EPIC5-1.1.10 released here (Commit id: 1781)
*** News 04/12/2014 -- EPIC5-1.1.9 released here (Commit id: 1780)
*** News 04/16/2014 -- $fix_width() now fully works, and UTF-8 aware.
The $fix_width() function takes the following arguments:
cols $0 Number of display columns
justify $1 Justification ("l" left, "c" center, "r" right)
fillchar $2 Fill character (can be utf8 cchar)
text $3-
This fully supports UTF-8, so the result is a string that will
take up "cols" columns, even if "fillchar" takes multiple columns.
*** News 04/16/2014 -- Many functions are now UTF8 aware
These functions are now fully UTF8 aware. This means that
their unit of operation is a unicode character, and not a byte.
after before center chop
chrq curpos fix_width index
indextoword insert left maxlen
mid msar pad pass
rest reverse right rindex
rsubstr sar split strip
strlen substr toupper tolower
tr wordtoindex
These things are also UTF-8 aware:
/XTYPE -L
$[num]VAR (pad/truncate $var to num places)
/FEC
Additionally, case sensitivity is UTF8 aware, for all languages,
not just English. (at least as far as I tested)
*** News 04/11/2014 -- New function, $encodingctl()
The $encodingctl() gives you a lower level interface to the
encoding system.
The behavior of $encodingctl() is ugly and I regret several of
the decisions I've made already, but that's the way it goes...
As with other $*ctl() functions, if there was not information in
the argument list to decide what you wanted to do, it will return
the empty string.
- $encodingctl(REFNUMS)
Return all recode rule refnums.
- $encodingctl(MATCH servref sender receiver)
Decide which recode rule would be used for a message sent by
"sender" to 'receiver' over the server 'servref'.
If you are the sender, use $servernick().
Return value:
empty_string - an argument is missing, or servref is not an integer
anything else - the rule that would be used.
- $encodingctl(GET refnum <OPERATION>)
Get an attribute of a recode rule:
-> Returns empty string if <refnum> is not a valid recode rule
-> Returns empty string if no <operation> specified.
- $encodingctl(GET refnum TARGET)
Return the complete "target" part of the rule; this is whatever
you passed to the /encoding command.
- $encodingctl(GET refnum ENCODING)
Return the complete "encoding" part of the rule; this is whatever
you passed to the /encoding command.
- $encodingctl(GET refnum SERVER_PART)
Return the 'server part' of the target. This is the part before
the slash, or the empty string if there is no server part.
- $encodingctl(GET refnum TARGET_PART)
Return the 'target part' of the target. This is the part after
the slash, or the empty string if there is no target part.
- $encodingctl(GET refnum SERVER_PART_DESC)
This returns nothing for now. Maybe someday it will return a
server description (ie, host:port:...)
- $encodingctl(GET refnum MAGIC)
1 if this rule is a "system rule" and cannot be deleted.
0 if this is a user rule, and can be deleted.
- $encodingctl(GET refnum SOURCE)
1 - Set at boot-up by using your locale (CODESET)
2 - Set at boot-up from hardcoded defaults
3 - Set by the user
- $encodingctl(SET refnum <OPERATION>)
Change an attribute of a recode rule
-> Returns empty string if <refnum> is not a valid recode rule.
-> Returns empty string if no <operation> specified.
- $encodingctl(SET refnum ENCODING new-encoding)
Empty String - New-encoding was not specified
0 - Changed: The new encoding was set successfully
-1 - Not changed: The new encoding does not exist on your system
-2 - Not changed: The new encoding does not convert to UTF-8
-3 - Changed: The new encoding PARTIALLY converts to UTF-8
- $encodingctl(DELETE refnum)
Delete a recoding rule:
Empty String - <refnum> was not a valid recode rule.
0 - <refnum> is a magic rule and may not be deleted
1 - <refnum> was successfully deleted.
- $encodingctl(CHECK encoding)
Determine whether or not <encoding> could be used in recoding rules:
Empty String - <encoding> was not specified.
0 - Acceptable: The encoding is acceptable for use
-1 - Unacceptable: The encoding does not exist on your system
-2 - Unacceptable: The encoding does not convert to UTF-8
-3 - Partially Acceptable: The encoding PARTIALLY converts to UTF-8
- $encodingctl(CREATE target encoding)
Basically the same thing as /encoding target encoding
Returns the refnum of the new rule.
EPIC5-1.1.8
*** News 03/11/2014 -- New command, /ENCODING
The /ENCODING command is not really new, but it finally is in its
final form.
With /ENCODING you can specify rules that tell epic what encoding
you think other people are using. Whenever epic receives a non-utf8
message, it will evaluate the rules to decide what encoding it should
treat the non-utf8 message. Whenever you send an outbound message
to irc, epic will use the rules to decide if it should encode it
in something other than utf-8.
This means you can talk to non-utf8 users, and their messages can
be made utf8 for you; and your (utf8) messages can be non-utf8 for
them. This is full end-to-end recoding support.
The rules look like this, and are evaluated with this priority:
6. /ENCODING server/nickname
5. /ENCODING nickname
4. /ENCODING server/channel
3. /ENCODING channel
2. /ENCODING server
1. /ENCODING irc (the "magic" rule)
In this case, "server" is anything that can be recognized:
* A server refnum
* A server "ourname"
* A server "itsname"
* A server group
* Any server altname
The client will evaluate each rule, and the "best match" is the
first rule that lands highest on that first list. Hopefully it
should just be natural. An example:
# All "efnet" servers use ISO-8859-1 (level 2)
/encoding efnet/ ISO-8859-1
# Except #epic, which uses CP437 (level 3)
/encoding #epic CP437
# Except zlonix, who uses KOI8-R (level 5)
/encoding zlonix KOI8-R
So if you get something non-utf8 message over an "efnet" server,
it will be assumed to be ISO-8859-1. Unless that message was
sent to #epic -- then it is assumed to be CP437. Unless that
message was sent by zlonix, then it is KOI8-R. In this way, you
can set defaults for channels and overrule it by individual person.
SYNTAX:
If you do /ENCODING <stuff>
If <stuff> is a channel, then <stuff> is treated as a channel.
If <stuff> is a number, then <stuff> is treated as a server refnum.
If <stuff> contains a slash, then anything before the slash is the
server part, and anything after the slash is the channel
or nickname part. *You can use a trailing slash to make
it unambiguous you mean a server, or a leading slash to
make it unambiguous you mean a channel/nickname.*
If <stuff> contains a dot, then <stuff> is treated as a server.
Otherwise, anything else is treated as a nickname.
*** News 03/06/2014 -- $cparse(%X) turns into a ^X
You can use %X in $cparse() to inject a ^X which might make it
easier to handle 256 color support. All the rules below still apply.
/echo $cparse(%kone %rtwo %X80buckle %XFFmy %X32shoe)
*** News 03/05/2014 -- 256 color support (^X works like ^C)
The ^X attribute allows you to set 256 colors (if your emulator
supports that).
The ^X attribute takes two hex digits to indicate a color between
00 and FF (0 to 255).
^X-1 Turn off color
^X00 Turn on fg color 0
.... ....
^XFF Turn on fg color 255
^X<number>,<number> Turn on <fg>,<bg> colors
The <fg> number can be omitted.
The ^X attribute ALWAYS takes stuff after it. You cannot use a naked
^X or you risk forwards incompatability. I *will* be adding more
stuff to ^X in the future so don't develop bad habits.
Caveat:
256 color support isn't "standard" ansi so the client sends the
hardcoded sequence ^[[38;5;<number>m to your terminal. If your
terminal does not honor this way of doing 256 colors, then there's
not much you can do about it...
*** News 03/05/2014 -- Italics support
The highlight character ^P now toggles the "Italic" setting of
your terminal emulator. Mine doesn't support this so I couldn't
test it very well. Please report any bogons if you use it.
*** News 03/02/2014 -- Clarified behavior for /set lastlog 0
It was pointed out that /set lastlog 0 did not do a reasonable
thing with the unified scrollback buffer, so the behavior has
been refined a bit.
Here is how /set lastlog <X> now works
1. For each window, set /window lastlog <X>.
2. For each window, rebuild each window's scrollback
-- Which may throw away stuff!
-- If you do /set lastlog 0, it throws away all scrollback
and does an implicit /window clear!
3. For each window, if <X> is less than twice the window's size,
/window lastlog <twice its size> (24 lines -> /window lastlog 48)
4. The final value of <X> will be twice the size of the biggest window.
*** News 02/14/2014 -- New flags, /LASTLOG -THIS_SERVER and -GLOBAL
The /LASTLOG -THIS_SERVER flag will show all lastlog entries
from any window belonging to the server server as this window.
IE, it is a /lastlog that catch all of this server.
The /LASTLOG -GLOBAL flag will show all lastlog entries from
any window whatsoever.
*** News 02/11/2014 -- Auto-detect incorrect encodings lead to warnings
If you have /ENCODING CONSOLE set to non-utf8, and then you type
stuff that looks like UTF8, the client will tell you and suggest
you switch. This will end the problem with utf8 users seeing
multiple garbage characters on the input line.
If you have /ENCODING CONSOLE set to utf8 and you type something
that is not utf8, the client will tell you and suggest you switch
to something else. Unfortunately it's not easy to know what you
are using, so it suggests ISO-8859-1.
If you are correctly setting LC_ALL (see below) then the above
should never happen for you.
*** News 02/11/2014 -- Now honoring LC_ALL (locale charset settings)
If you set your character set via locale environment variables,
EPIC will now use your locale as the default character set for
/ENCODING console. If you do not set your locale variables,
then epic will continue to default to ISO-8859-1.
*** News 02/11/2014 -- New /ENCODING target "scripts"
Whenever you /load a script, epic needs to convert it into utf8.
The normal way a script can declare itself is via /load -encoding
(See the note from 11/17/2012)
if (word(2 $loadinfo()) != [pf]) { load -pf -encoding CP437 $word(1 $loadinfo()); return; };
If a script is not well-formed utf8 and it does not declare its
own encoding, then it will be assumed to be whatever the value
of /ENCODING scripts is. The hardcoded default is "CP437".
Naturally, if you /load a script that is not utf8 and is not
CP437, it may not translate correctly. But it seems most scripts
use CP437, and we'll get everybody to declare/utf8-ify their scripts.
*** News 02/10/2014 -- EPIC users now utf8 stransparant to irc.
As of right now, whether you are using utf8 or not, anything
you send from epic will be sent to irc as UTF8. Anything UTF8
that anybody sends you will be displayed properly on your screen,
even if you are not using UTF8.
*** News 02/10/2014 -- New command /ENCODING -- declare target encodings
The new command /ENCODING is used to declare what string encoding
a target is using. At some point this will spawn into an all-
encompassing feature, but for now, it's just used to declare the
encoding of your console.
/ENCODING console ISO-8859-1
or /ENCODING console UTF-8 (default)
If EPIC detects that your input is illegal for the encoding you
are using, it will ask you to change it. If the stuff you type
is not what you think you're typing, again, you might be using
the wrong encoding.
*** News 02/09/2014 -- Unicode support for $chr(), new func $unicode()
The $chr() function will now accept unicode descriptors
$chr(U+0415 U+0420 U+20)
The $unicode() function converts text to unicode descriptors
$unicode() returns "U+0423"
*** News 02/08/2014 -- New server flag, "encoding" -- WITHDRAWN
Server descriptions now have an extra field "encoding" which is
used when you receive a non-utf8 string from the server.
When you receive a non-utf8 string from the server, epic will
assume it is in this encoding and use iconv() to convert it to utf8.
The default is "ISO-8859-1" for no particular reason.
This will be supplanted by a /recode command in the future!
*** This feature has been removed. Do not use! ***
EPIC5-1.1.7
*** News 01/16/2014 -- New scripts (should document these!) from Zlonix
xmsglog Encrypted logfiles
sasl_auth SASL support (for some networks)
idlealert Monitor friends' idle times (with lots of WHOISs)
*** News 01/02/2014 -- New status expando, %{4}S, full "itsname"
Just to run this down, here are the %S expandos
%S Altname 0 (default: Shortened "ourname")
(Only shown when you're connected to multiple servers)
%{1}S Altname 0 (default: Shortened "ourname")
%{2}S Full "ourname"
%{3}S Server Group
%{4}S Full Server "itsname"
*** News 01/02/2014 -- Add /input -- so you can stop arg processing
If you wanted to be able to prompt starting with a hyphen, well,
you couldn't do that before. But now -- is honored and everything
else is taken as the input prompt.
*** News 09/12/2013 -- New built in function $status_oneoff()
This is a completely experimental function right now, which is
helping me decouple the status bar generation from the windows.
This function allows you to create your own status bar string,
if you provide it a window and a status_format.
$status_oneoff(winref ...status goes here...)
As a simple example,
$status_oneoff(1 %S)
would return what %S would be on window 1.
EPIC5-1.1.6
*** News 07/31/2013 -- New action $LOGCTL(LAST_CREATED)
The $logctl(LAST_CREATED) returns the log refnum of the most recent
log that was created with /LOG NEW or $logctl(NEW).
*** News 07/31/2013 -- New action $LOGCTL(NEW)
The $logctl(NEW) performs a /LOG NEW and returns the refnum of the
newly created log.
*** News 07/31/2013 -- New /lastlog flag.
/lastlog -regignore [regular-expression] avoids printing lines that
would otherwise be printed without the regex. Can be used in
combination with -regex and -ignore and the other flags.
*** News 07/28/2013 -- $windowctl(REFNUMS_BY_PRIORITY) returns by current-ness
The $windowctl(REFNUMS_BY_PRIORITY) operation returns all windows in
the descending order that they have been the "current window".
This is based on your input screens -- if you have multiple windows
connected to multiple servers, this list doesn't care about that.
If you need that, iterate over the list and filter out the ones
for your server:
fe ($windowctl(REFNUMS_BY_PRIORITY)) x {
if (windowctl(GET $x SERVER) == serverctl(FROM_SERVER)) {
push results $x
}
};
xecho -b Windows for this server in order of current-ness: $results
*** News 07/28/2013 -- FIXED-SKIPPED windows don't get channels on /window kill
FIXED-SKIPPED windows (ie, /window fixed on skip on) are used to create
status windows (see below). They will no longer be given channels
from another window that is killed unless it is the last window
connected to the server.
*** News 01/09/2013 -- New /QUEUE flag, -RUNONE
I can't believe I didn't think of this before!
The /QUEUE -RUNONE flag will run the first command in a queue,
leaving the rest of the queue alone. This will work great with
timer to create a FIFO queue that you can stagger commands through.
For example, a command that slows down output to the server
/TIMER -REPEAT -1 2 {QUEUE -RUNONE serverqueue}
fe (#one #two #three #four) x {
QUEUE serverqueue {join $x}
}
EPIC5-1.1.5
*** News 11/28/2012 -- Lots of code quality improvements
Ancient graciously set up epic to run under clang and its static
analyzer, and we found lots of suggestions of things to fix.
*** News 11/17/2012 -- New flag, /load -encoding
You may now specify what a file's encoding is, and it will be
converted automatically to utf8 (there will be a /set for this
soon enough). You can use this in your magic bootstrap:
if (word(2 $loadinfo()) != [pf]) { load -pf -encoding iso-8859-1 $word(1 $loadinfo()); return; };
This allows utf8 terminal users to load ascii art in 8859, and
it will Just Work!
EPIC5-1.1.4
*** News 8/5/2012 -- Anti-foot-shooting for $pad() and $repeat()
Some had mentioned that you shouldn't be permitted to shoot yourself
in the foot by asking for absurdly large output strings in $pad()
and $repeat(). Normally I wouldn't agree to that, but I guess I'm
getting soft in my old age....
*** News 8/5/2012 -- /xdebug no_color - turn off all color unconditionally
The experimental feature /xdebug no_color turns off color support
at the lowest level of the client. If you refresh your screen,
any previously displayed color will be suppressed. Turning off
this feature allows any color to be shown again.
*** News 8/5/2012 -- /LASTLOG -CONTEXT actually works correctly
The /LASTLOG -CONTEXT feature shows you some lines before and after
any lastlog match. This has previously been broken and as of the
time I write this, works properly, both normal and -REVERSE.
*** News 8/5/2012 -- /ON SET only thrown once when you type the exact name
Previously, if you typed /SET <X> where <X> is the exact name of
any builtin SET, then /on set would be thrown twice. That was never
the intention, and this has been "fixed".
*** News 6/26/2012 -- Merge two windows together -- /WINDOW MERGE otherwin
/WINDOW MERGE is like /WINDOW KILL except it moves everything from
the current window to another window first. This allows you to
"merge" two windows into one window.
* Window output
* Channels
* Logfiles
* Queries
* Timers
If the current window can't be KILLed then everything will be moved
away anyways, but you'll get an error message telling you that it
can't be killed. This isn't a bug.
*** News 6/26/2012 -- Expiring output -- /XECHO -E
The /XECHO -E flag lets you create "expiring output" which will
disappear after however many number of seconds.
/XECHO -E 10 This goes away in 10 seconds!
This might be useful for status windows that you want to show new
messages briefly.
*** News 6/24/2012 -- New $hookctl(CURRENT_IMPLIED_HOOK)
When an implied /on hook is being expanded,
$hookctl(CURRENT_IMPLIED_HOOK) is set to the name of that hook.
I recommend wrapping this in an alias:
alias ih {return $hookctl(CURRENT_IMPLIED_HOOK)
Then you can use $ih() to get the hook.
The use case is if you are using the same function for different
implied hooks -- there was no way to tell the function which one
it was working on.
*** News 6/24/2012 -- New $dccctl(SET refnum FULL_LINE_BUFFER [0|1])
You can now set a dcc raw to "fully line buffered" mode.
When this is turned on, /on dcc_raw will not trigger until
a complete line is available. You can turn this off by setting
it to 0.
The corresponding $dccctl(GET refnum FULL_LINE_BUFFER) also works.
*** News 6/24/2012 -- New $dccctl(SET refnum PACKET_SIZE <bytes>)
You can now set a dcc raw to "fully packet buffered" mode.
When this is turned on, /on dcc_raw will not trigger until
<bytes> bytes are available. You can turn this off by setting
it to 0.
The corresponding $dccctl(GET refnum PACKET_SIZE) also works.
*** News 06/24/2012 -- New option, /XEVAL -NOLOG
The -NOLOG option to /XEVAL suppresses logging for the command.
The person who requested wanted to do something like this:
alias ll { xeval -nolog {lastlog $*} }
to be able to avoid logging /lastlog output.
*** News 06/24/2012 -- New option, /LASTLOG -IGNORE <pattern>
The /LASTLOG -IGNORE <pattern> option allows you to display all of
your lastlog EXCEPT whatever matches <pattern>. In this way, it
acts as a reverse to the normal way.
EPIC5-1.1.3
*** News 03/24/2012 -- New status bar expando, %G (Network)
The %G status bar expando shows the 005 NETWORK value for your server
*** News 06/09/2010 -- New semantics for /BIND TRANSPOSE_CHARACTERS
The TRANSPOSE_CHARACTERS keybinding now has the following semantics:
1. When the cursor is on the first character, swap the first and second
characters.
2. When the cursor is on a character (but not the first character), swap
the character under the cursor with the character before the cursor.
3. When the cursor is at the end of the line (and not on a character),
swap the last two characters on the input line.
In all three cases, the cursor stays in whatever column it is in.
*** News 06/05/2010 -- New script: rejoin
Stores channel/key on disconnect/part/kick. I hope it's useful!
Allows you to rejoin all channels lost in a disconnect, by doing:
/rejoin -all OR /rejoin -server
See script for details.
EPIC5-1.1.2
*** News 04/15/2010 -- New flags to $sar(), $msar(), case sensitivity
In EPIC4, $sar() and $msar() were case sensitive.
You could turn this off by using the 'i' flag.
In EPIC5, $sar() and $msar() are case *INSENSITIVE*
There has been no way to turn this off!
You can now turn this off with the 'c' flag.
Example:
$sar(g/One/Two/one One one One) -> "Two Two Two Two"
$sar(cg/One/Two/one One one One/) -> "one Two one Two"
*** News 04/15/2010 -- New /on, /on unknown_set
As a favor to howl, I've added /on unknown_set, which will be hooked
whenever /set is called on a set that doesn't exist.
$0 - The set that doesn't exist
$1- - The value the user wanted to set.
If you catch this, then the /on set that triggers for "unknown-set"
will not be thrown. If you don't know what I'm talking about, then
you won't miss it.
*** News 04/01/2010 -- Can now backslash colons in server passwords
Previously it was impossible to include colons in server passwords
because colons are delimiters in server descriptions. Now you can
backslash the colon and it will do the right thing. Don't forget to
backslash your backslashes!
Real password What you should use:
------------------- ---------------------
onetwothree onetwothree
one:twothree one\:twothree
one\two:three one\\two\:three
*** News 03/25/2010 -- Can now modify servers by refnum (Fix to server descs)
The /server command was broken in the epic5-1.1.1 release, and got
some extra work for the next release. As part of this work, you can
now add change fields to a server refnum, like so:
/server 1:type=irc-ssl
Previously refering to a server refnum didn't support change fields.
EPIC5-1.1.1
*** News 3/19/2010 -- EPIC5-1.1.1 was released here
*** News 3/19/2010 -- The last value of /WINDOW SERVER is saved per window
The last argument passed to /WINDOW SERVER is saved on a per-window
basis, via $windowctl(GET x SERVER_STRING). I added this because
howl asked for it, although I don't know what he intended it for.
*** News 3/19/2010 -- Modifying server descriptions on the fly
You may now modify server descriptions on the fly in the
following situations:
/SERVER -ADD <desc>
/SERVER -UPDATE <desc>
/SERVER <desc>
$serverctl(READ_FILE filename)
$serverctl(UPDATE refnum stuff)
/WINDOW SERVER <desc>
For example, let's say you created a server irc.foo.com, but
you forgot that it used SSL. Before it was a pain to "fix" that,
but now you can fix it like this:
/SERVER -ADD irc.foo.com:8855
(oops, it uses ssl, i forgot!)
/SERVER irc.foo.com:type=irc-ssl
(aha! okie. now it will connect using ssl)
*** News 3/19/2010 -- You can log everything with /LOG SERVER ALL
If you create a log like:
/LOG NEW FILE myirc.log SERVER ALL ON
that will log everything.
Previously, you had to add each server individually by
refnum, but now you can just use the magic string "ALL"
to refer to all servers.
*** News 3/19/2010 -- Rewrite /log support
The /LOG command should work a lot better now.
*** News 3/19/2010 -- New target to msg a window, @E<winref>
You can /echo to a window by /msg'ing its winref, as in:
/msg @E3 This message will display in window 3.
*** News 3/19/2010 -- "global" now loads ambig and newnick scripts
*** News 3/19/2010 -- New /XEVAL -N flag, which reverses the ^ flag
Normally if you run an alias or an on with ^, it will treat every
command as though it were prefixed with ^. This suppresses the
output of many commands, which you may not want to do. You can
negate the effect of ^ with /XEVAL -N. For example:
/on ^hook "chdir %" {
xeval -n {cd $1-}
}
Normally the /CD command will output an error if it could not
change the directory, but since ^ suppresses that error, in this
example, you'd never know that the cd failed. So you can wrap
commands whose error messages you want to see in /XEVAL -N.
Don't forget! Always wrap your commands in {} to avoid unintended
back doors.
*** News 3/19/2010 -- Remember, $dccctl(GET refnum WRITABLE)
If you combine $dccctl(FD_TO_REFNUM fd) with
$dccctl(GET refnum WRITABLE) you can detect when a nonblocking
connect has succeeded!
*** News 3/19/2010 -- New $dccctl(FD_TO_REFNUM <fd>)
The $connect() function returns a file descriptor, which you can
pass to $dccctl(FD_TO_REFNUM fd) to get the $dccctl() refnum,
which you can use to do other stuff.
*** News 3/19/2010 -- New flag to /EXEC, -CLOSEOUT
If you do /EXEC -CLOSEOUT it will close the stdin to the process,
(ie, sends an EOF) which some processes need to decide that
they're supposed to do something.
*** News 3/19/2010 -- New scripts I should have documented
These scripts have been added, but I never got around to documenting
them. That's a bummer.
help.irc history.rb locale
tabkey.sjh logman cycle
set_color ban speak.irc
*** News 10/29/2009 -- Valgrind assistance
If you want to run epic under Valgrind, you may want to pass the
--with-valgrind flag to configure, which will compile in some
additional assistance to help valgrind find memory leaks. This
support was graciously provided by caf, as were patches for the
bugs he found using valgrind.
*** News 07/06/2009 -- The Fish64 xform actually works now (see below)
The first implementation of FISH64 was not actually, to be technical,
compatable with FiSH. It is a strange thing and it took me a while
to come up with an implementation of it that doesn't depend on how
bits are stored in integers. I have actually tested it against the
real life FiSH implementation and it's correct now.
*** News 06/17/2009 -- New $xform, "FISH64"
The FISH64 transform performs base64 encoding that is compatable
with FiSH. Fish64 uses the same algorithm as base64, but it uses
a different character set.
*** News 06/08/2009 -- New $xform(iconv) functionality
You can now refer to a pre-defined iconv encoding setup,
instead of specifying encoding upon every use of
$xform(iconv). Whereas you in the old days would do:
echo $xform(iconv utf-8/ascii $stuff)
which would take a lot of cpu time, as the client would have
to do a lot of stuff to open, use, and then close up, the
iconv stuff, you can now do as follows:
@ id = iconvctl(ADD utf-8/ascii);
echo $xform(iconv +$id $stuff);
You can also do:
echo $xform(iconv -$id $stuff)
to reverse.
Use /xdebug +unicode to debug iconv stuff!
*** News 06/08/2009 -- New control function: $ICONVCTL()
This function works as follows:
@ id = iconvctl(ADD fromcode/tocode[//option])
This sets $id to a permanent identifier for doing encoding
from *fromcode* to *tocode*. (This may speed up encoding a
bit.)
If the chosen encoding isn't accepted by iconv(),
$iconvctl() returns empty.
@ encoding = iconvctl(GET $id)
This will return whatever you set the encoding $id to.
@ iconvctl(REMOVE $id)
This removes the $id from the table of encodings.
@ iconvctl(LIST)
This lists encodings.
@ iconvctl(SIZE)
And this returns the size of the iconv table.
Do notice that identifers are re-used after removal.
*** News 06/08/2009 -- Add USERINFO to /on hooks
You can now add some information to "executing hooks".
@ hookctl(USERINFO -1 stuff)
This will set the USERINFO of the current executing hook
to "stuff". To get the userinfo of the current executing hook:
echo $hookctl(USERINFO -1)
This can be used in conjunction with changing the $* of a hook,
to, for instance, add encoding information to a it.
*** News 06/06/2009 -- Can change $* in an /on hook now
You can change the value of $* in an /on hook that will affect
/on's with higher serial numbers.
@hookctl(ARGS <level> <new value of $*>)
This is expected to be useful for things like iconv translation.
Please note carefully that the pattern matching of /on's against
$* is done *AFTER EACH ON IS RAN* so if you change $* you might
affect which higher serial numbered /ons will run!
Usually <level> is -1 and usually the new value of $* would be based
on the current value of $*. The change to $* takes place immediately.
Example one:
on #^hook -100 * {@hookctl(ARGS -1 >>>$0 $1<<< $2-)
on ^hook * {echo $*}
hook This is a test
would output
>>>This is<<< a test
because the /on hook with serial number -100 changed the old value
of $*
"This is a test"
to
">>>$0 $1<<< $2-"
which after expansion is:
">>>This is<<< a test"
which is the value of $* in the /on hook with serial number 0.
Example two:
on #^hook -100 * {@hookctl(ARGS -1 $reverse($*))}
on ^hook "ape" {echo APE! APE!}
hook epa
would output
"APE! APE"
because the first hook changes $* from its original value
"epa"
to $reverse(epa) or
"ape"
which matches the second hook.
*** News 04/10/2009 -- /WINDOW CHANNEL now outputs all channels in the window
Previously, /window channel only output the window's current channel.
It still does that, but now it will also output the full and complete
channel list so you see the other channels in that window.
*** News 04/10/2009 -- /IGNORE user@host.com now works again
Due to a really lame bug, /ignore user@host.com did not work
properly because the client thought it was a server name and did
not fix it up to *!user@host.com which prevented it from matching
anything which prevented it from working. Sorry about that.
*** News 04/10/2009 -- Add permitted values for server desc "proto" field
Previously, despite all of the documentation to the contrary, the
only permitted values were "0", "4", and "6" for "either", "ipv4 only"
and "ipv6 only" respectively. This has been increased so you can
specify any of these values:
For "either ipv4 or ipv6, I don't care" (the default)
0
any
ip
tcp
For "ipv4 only, never use ipv6 for this server"
4
tcp4
ipv4
v4
ip4
For "ipv6 only, never use ipv4 for this server"
6
tcp6
ipv6
v6
ip6
Example to connect to an ipv6 server:
/server irc.ipv6.foo.com:6665:proto=tcp6
Example to connect to a server only using ipv4:
/server irc.foo.com:proto=ipv4
EPIC5-1.0
*** News 12/25/2008 -- EPIC5-1.0 was released here.
EPIC5-0.9.1
*** News 12/12/2008 -- Configure will check for perl/ruby/tcl usability
Up until now, configure would include perl/ruby/tcl as long as it
existed and told us where its stuff was at. That's bad if you
don't install the dev packages, because linking against the
langauage library won't work if it's not there. Configure will now
try a test-compile to use the language embedding to see if it works
and supports the api we expect. Failures will cause that language
to be turned off. Be sure to re-run configure!
*** News 12/10/2008 -- New function, $chanlimit(#chan #chan #chan)
The $chanlimit() command works just like $chanmode(), but it
returns the +l argument -- the channel membership limit.
This is by special request of fusion.
*** News 12/10/2008 -- Minor change to /SET NEW_SERVER_LASTLOG_LEVEL
Previously, each time you connected to a server (received a 001 reply)
the client would unconditionally assign all of the levels in
/set new_server_lastlog_level to the server's current window.
This is rather annoying if you got disconnected from the server
because the default value is ALL,-DCC and that would clobber all of
your window levels.
Having this brought to my attention, this has been changed to be
more reasonable. These will now reclaim any unused levels, rather
than unconditionally stealing them from other windows. Thus, what
/set new_server_lastlog_level ALL,-DCC means is, "each time I connect
to a server, please put any levels that aren't being used by any
window connected to this server in the current window". I apologize
for the previous behavior which was stupid and shouldn't have survived
as long as it did.
*** News 12/10/2008 -- Minor change to /SET OLD_SERVER_LASTLOG_LEVEL
The same change applies when you /window server a window to a server
that is already connected -- it has its window level changed to
/set old_server_lastlog_level, but it will now NOT steal the level
from any other window that already claims it.
EPIC5-0.9.0 (EPIC5-0.3.10)
*** News 11/24/2008 -- New /window operation, /WINDOW SCROLL_LINES
The /WINDOW SCROLL_LINES operation overrules /SET SCROLL_LINES for
one particular window. The value may be -1 (which is the default,
and means use /SET SCROLL_LINES) or a positive number.
*** News 11/01/2008 -- New /SET, /SET DCC_CONNECT_TIMEOUT
This set will control how long a nonblocking connect for a /dcc get
or /dcc chat can go before the client decides to abandon it. The
value is in seconds, and 0 turns this off (connects will not time out)
The default value is 30 seconds. This feature uses system timers,
and you shouldn't change the value of this /set while a connect is
pending or you'll confuse things and your connects probably won't
time out properly.
*** News 09/24/2008 -- New script, 'topicbar'
The idea with this script is to use topline 1 of any window
with a channel to display the topic of the given channel.
*** News 08/25/2008 -- /SET INPUT_INDICATOR_RIGHT now functional
It was documented below, but the code for it wasn't finished until
today. So now it will start appearing on your input line.
*** News 07/01/2008 -- Add servers from file -- $serverctl(READ_FILE filename)
You may now insert servers into the server list from a file using
$serverctl(READ_FILE filename) where "filename" is the name of the
servers description file. Note that the servers are appended to the
end of the servers list! The filename must be in the same format
as the server description file that is loaded at startup.
EPIC5-0.3.9
*** News 06/25/2008 -- configure --without-wserv, job control
Configure now checks your system to see if it has posix job control
(which means you have setsid() and tcsetpgrp()) and if it does not,
it turns off job-control features:
/BOTMODE
/EXEC
/LOADing of compressed files
$killpid()
$exec()
$open() of compressed files
The -b command line option
External crypto program support
Asynchronous (nonblocking) DNS lookups
Wserv support
You can also use the --without-wserv flag to configure to turn off
wserv support for a system that otherwise supports job control.
There is nothing gained by omitting wserv support, only things
removed. Normally this flag wouldn't be added but I did it as a
favor to someone.
*** News 06/25/2008 -- You can now /ignore a server
Due to some networks (undernet) having annoying servers that
spam you 10-20 times a day with annoying messages you don't want
to receive, it's now possible to /ignore a server:
/IGNORE irc.server.com ALL
*** News 05/09/2008 -- Hitting ^C twice interrupts infinite loop
Historically, if you hit ^C twice in a row and the client is stuck,
it will send itself a SIGARLM. In the past, this was because the
client used blocking connect()s and stuff, and guarded them with
alarm(3)s, so sending SIGARLM would cause an early interruption to
a blocking connect.
Anyways, since we don't have any blocking stuff any more, this is no
longer useful for its intended purpose. You've been able to send the
client a SIGUSR2 to raise a 'system exception" which attempts to
gracefully end an infinite loop in your script. Hitting ^C twice
in a row on a stuck client will send a SIGUSR2 which will cause an
infinite loop in your script to terminate.
*** News 05/09/2008 -- New /SETs: INPUT_INDICATOR_LEFT, INPUT_INDICATOR_RIGHT
This was written and contributed by fusion. Thanks!
The input line has been changed so the input prompt is always visible.
When you reach the right or left side of the display, the input line
will still scroll side-to-side, but the input prompt will always be
visible, not just when you're at the start of the input line.
Because it would otherwise not be obvious whether you are at the
beginning of the input line or not, there have been two new /set's
added:
/set input_indicator_left +
/set input_indicator_right +
When there is more stuff on the input line than what is currently
visible, if the extra stuff is off to the left, the first /set is
used to tell you there is more in that direction. If the extra
stuff is off to the right, the second set is used to tell you there
is more in that direction.
As of the time of this writing, the support for the second /set isn't
ready yet, so there is no visual clue if you are at the end of the
input line or not. Keep watching for more info about this.
*** News 04/23/2008 -- Added new /on, /ON WINDOW_NOTIFIED
This is hook is thrown when there's activity in a hidden window
that is notified.
$0 - The window refnum
$1 - The level of the activity.
Be careful with this hook, as output defered from it, may
wreak havoc.
EPIC5-0.3.8
*** News 04/10/2008 -- Added new /on, /ON SIGNAL
You can hook signals with /ON SIGNAL
$0 - The signal that was caught (a number)
$1 - The number of times this signal has been caught
since the last time /ON SIGNAL was thrown
Not every signal can be caught, and some signals are dangerous
to catch. For example, no matter what, you can't catch signals
9 (KILL) or 13 (PIPE) 15 (TERM). It's safe to catch 30 (USR1)
and 31 (USR2), but everything else is entirely at your own risk.
You should /defer anything you do within an /on signal to be safe.
*** News 04/10/2008 -- /USERHOST -FLUSH
/USERHOST -FLUSH removes those userhosts which are "pending send"
not those which are "pending receive".
EPIC5-0.3.7
EPIC5-0.3.6
*** News 03/10/2008 -- /NOTIFY list now applicable to local server.
The notify list can now be updated on a per server basis. This is done
by placing the ":" nick before the list of local changes in the /NOTIFY
command. Everything on the /NOTIFY line UP TO the ":" is still
applicable to every server.
Examples:
/NOTIFY : - [nicks] # Clear local list and replace with [nicks].
/NOTIFY - : [nicks] # Clear all notify lists and add [nicks] locally.
*** News 01/28/2008 -- /ON WINDOW_COMMAND has command as $2 (kitambi)
The command being executed is $2 in /on window_command. If you do evil
things with this, you may crash the client. You Have Been Warned.
*** News 01/23/2008 -- New built in function $check_code(...)
--- Warning --- This function is not really as useful as it looks
because you would be unable to submit an invalid block statement
or expression to the function without getting a warning from the
syntax parser in the first place. I don't know how I will "fix"
this, but maybe you might find the function interesting for now.
The $check_code() function takes either a *block statement*
(surrounded by curly braces {}) or an *expression* (surrounded
by parenthesis ()) and tells you whether the item is well-formed
and does not have any unmatched braces or parentheses. It does
*NOT* tell you if the code or expresison inside the item is valid
or even makes sense, it only tells you if it contains code that
you could pass to /eval or to /@.
Return values:
0 - The expression or block statement looks ok
-1 - This is not an expression or block statement
-2 - The expression/block statement is invalid, probably
because there is unmatched brace or parenthesis
-3 - There is trailing garbage after the closing brace or
parenthesis.
More return values will probably be added in the future as more
errors become detectable.
*** News 01/22/2008 -- /SERVER listing now shows your vhost
The listing of your servers from /SERVER now shows you the vhost
that you're using (if any). I forget who asked for this.
*** News 01/22/2008 -- Oper passwords no longer revealed with ^L
Wjr pointed out that if you did /oper and typed a password that
was hidden and hit ^L it would reveal the password. This has
now been fixed.
*** News 01/22/2008 -- $ignorectl(SUSPEND) and $ignorectl(UNSUSPEND)
Larne asked for a way to globally turn off /ignores for some
period of time. So you can turn off all ignores globally
with $ignorectl(SUSPEND) and turn ignores back on again later
with $ignorectl(UNSUSPEND). A word of caution -- this is a counting
queue, so each SUSPEND must be matched with an UNSUSPEND. If you
do two SUSPENDs and one UNSUSPEND, it will still be SUSPENDed.
Use $ignorectl(RESET_SUSPEND) if you get the client totaly confused.
*** News 01/22/2008 -- You can /load executable files, with caution
Crimedog said that all of his scripts on windows were executable
(+x) and epic wouldn't let him /load them, and so I've removed the
restriction that you can't /load executable files. I've replaced it
with a warning that the file is executable and that /loading binary
files yields undesirable results.
*** News 01/22/2008 -- /xecho -w -1 outputs to current window
As a special favor to BlackJack, /xecho -w -1 will output to the
current window, because this is what epic4 used to do, particularly
when you did /xecho -w $winchan(#foo) and #foo was not a channel
that you were on (so it returned -1) and it output to the curernt
window. In any other case but -1, /xecho -w to a window that
does not exist will drop the output.
*** News 01/22/2008 -- New built in function $strptime()
Now you know the $strftime() function converts a $time() value into
a string using a special format. If you have the output of strftime
and you have the format it was created with,t he $strptime() function
will return the original $time() value it was created with. This
is probably useful by people who are parsing logfiles and want to
get a $time() value so they can do time math and see how long ago
something occured.
For the moment, this only works if you have strptime(3) on your
system, and not everybody does. Very soon, a compat version of
strptime() will be shipped with epic to ensure minimum functionality.
*** News 01/05/2008 -- You can now use arglists with /input (fusion)
You can now use arglists with input, like so:
input "Enter command and arguments: " (cmd, args) {
xecho -b You entered [$cmd] and [$args]!
}
*** News 01/03/2008 -- $info(o) values for libarchive, iconv support
If the binary supports libarchive, $info(o) will include 'r'.
If the binary supports iconv, $info(o) will include 'v'.
Libarchive support is required to /load from a .zip file
Iconv support is required to be able to do character set translation.
*** News 11/29/2007 -- New function $fix_width()
The $fix_width() function takes the following arguments:
cols $0 Number of columns
justify $1 Justification (must be "l" for left justify)
fillchar $2 Fill character (a dword, so use " " for space)
text $3-
This function returns <text> formatted so that it takes up exactly
<cols> number of columns on the display. It does this by adding
<fillchar> to the string on either the left or the right or both.
If <text> is already wider than <cols> then it is truncated to <cols>.
<Justify> must be either "l" for left justify, "c" for center, or "r"
for right justify. Only left justify is supported. The others are
for future expansion.
This function is intended for creating full width reverse toplines:
@ :cols = word(0 $geom())
@ :str = fix_width($cols l " " blah blah blah blah)
window topline 1 "^V$str"
You will probably want to call $fix_width() in a separate statement
from the /window topline in order to avoid the syntactic confusion
with passing a double quoted word to /window and passing a double
quoted word to $fix_width() (the space). Trust me. Don't go there.
In the future, support will be added for right justify and centered.
Please keep watch out in this document for more info.
*** News 11/29/2007 -- Support for ZIP files from libarchive
Support for loading files from .zip files has been added. This first
round of implementation just adds the raw ability, but it's not
totaly ready to be used yet. You're welcome to start playing with
it and reporting any problems you have.
You can $open() a file for reading or /load it from a zip file:
/load foo.zip/file
and
@fd = open(foo.zip/file R)
If you /load a zip file, it will load the file ".ircrc" in the top
level directory. This might be enahanced or changed in the future:
/load foo.zip
acts like
/load foo.zip/.ircrc
Some operations cannot be performed on zipped files, such as $fseek()
and $frewind() and so forth. This might change in the future.
All of this is based on 'libarchive' being installed. You will need
to re-run configure in order to pick up libarchive support after you
do a cvs update.
*** News 10/22/2007 -- New flag to /lastlog, /lastlog -window
The /lastlog -window flag lets you grep the lastlog from a different
window. The output will still go to the *current* window, however!
*** News 09/19/2007 -- Some built in functions now 'builtin' aliases.
Several functions that have been deprecated by $xform() have been
demoted from built in functions to aliases in the 'builtins' script.
encode decode b64encode b64decode
urlencode urldecode sedcrypt sha256
EPIC5-0.3.5
*** News 09/14/2007 -- New built in function: $splitw(<delim> <string>)
This function takes a <string> which has sections delimited by
<delim>. The <delim> argument can only be one character. An
obvious example of this is $PATH which is a <string> that uses
the colon as <delim>. The <delim> is a dword, so you can use the
space as a delimiter if you needed to.
This function unconditionally converts <string> into a dword list.
You will need to xdebug dword to iterate over the return value, or
you can use $unsplit(" " $splitw(<delim> <string>)) to collapse it
to a uword list (although this is probably pointless)
Example:
@ directories = splitw(: $PATH)
might return
/bin /sbin /usr/bin /usr/sbin /usr/local/bin
Example:
@ foo = splitw(: one:two:three a berry:four:five)
returns
one two "three a berry" four five
*** News 09/13/2007 -- New /SET, /SET STATUS_HOLDMODE
This is the value that %{1}H expands to. The default is " (Hold)".
If you don't like the "(Hold)" in your status bar when your window
is in hold mode but not holding anything, unset this variable
entirely:
/set -status_holdmode
and it will disappear. Or remove %{1}H from your status format.
*** News 09/13/2007 -- New status expando, %{1}H, hold mode indicator.
The %H status expando expands when your window is in hold mode
*and* there is something being held. But if your window is in
hold mode, but nothing is held, you can't tell just by looking.
So the %{1}H status expando will expand whenever the window is in
hold mode *except* when %H will expando. This is so you can put
%{1}H%H
in your status format and one or the other (but not both) will
expand at all times hold mode is on.
This expando has been added to the client's default status format.
The value of %{1}H is controlled by /set status_holdmode, and the
default value of that is " (Hold)"
*** News 09/13/2007 -- Remember, *0 is an rvalue, but *var is an lvalue
The deref operator ("*") converts a token into an rvalue and then
uses that as an lvalue. Example:
assign foo bar
@ *foo = [testing]
echo $bar
in the above (*foo) is the same as "bar". But numbers are different.
Derefing a number yields an rvalue:
alias oofda { @ foo = *0 }
offda one
To convert an argument into an lvalue, deref it a second time:
alias booya { @ *(*0) = 'testing' }
booya varname
echo $varname
Does that make it clear?
*** News 09/02/2007 -- New function, $is8bit(string)
This function find the first character of string that has the
eight bit set. Useful to discover Unicode-strings or other
non-eight bit characters.
*** News 08/22/2007 -- New xform, $xform(ICONV "from/to" text)
If your binary is built with iconv support (re-run configure before
you tell me it doesn't work!) then you will be able to use iconv()
to translate strings from one character encoding to another. This
might be useful to experimentally convert to and from utf8 while
you wait for the unicode-enabled input line to be written.
XXX Help files updated to here XXX
*** News 08/22/2007 -- Checks for iconv in configure: --with-iconv
Configure will now check for libiconv support. Normally it will
look for libiconv.a and iconv.h in the --prefix/lib and
--prefix/include directory, or in /usr/local or /opt or /usr/opt.
If your iconv support is not in any of these places, then you must
supply the --with-iconv=/path/to/dir where that directory contains
"include/iconv.h" and "lib/libiconv.a"
*** News 08/22/2007 -- Checks for alt place in configure: --with-localdir
A lot of times you'll have software installed but it won't be in
the places the compiler looks for it. Usually this is /usr/local
or /opt or something. You can use this flag to tell configure to
look in this directory in addition to the default directories. This
can aid in ensuring optional dependancies don't get turned off because
they're in a directory the compiler doesn't look in.
*** News 08/13/2007 -- New /SETs, /SET DEFAULT_REALNAME and DEFAULT_USERNAME
Per a discussion on the list, it was decided to introduce two new
sets, /SET DEFAULT_REALNAME and /SET DEFAULT_USERNAME. These control
what realname and username should be sent to the server each time you
connect. Although I can't stop you, you shouldn't unset these
variables if you know what is good for you.
/SET DEFAULT_REALNAME replaces /SET REALNAME, which confused people
who though that /setting it changed their realname immediately
/SET DEFAULT_USERNAME replaces /ircuser which confused people
because they thought it was going to be a /set.
*** News 07/20/2007 -- New /SET, /SET LASTLOG_REWRITE
This provides the default value to /lastlog -rewrite whenever you
don't use the /lastlog -rewrite flag. If you always want the
/lastlog command to timestamp each line, try this:
/set lastlog_rewrite $strftime($1 %T) $8-
(Remember, if you use this in a pf loaded script to double up $'s...
/set lastlog_rewrite $$strftime($1 %T) $$8- )
*** News 07/20/2007 -- New flag to /LASTLOG, /LASTLOG -REWRITE
The /LASTLOG -REWRITE flag rewrites each lastlog line with the
following values for $*
$0 - The lastlog item's unique refnum
$1 - Timestamp (suitable for use with $strftime())
$2 - Window refnum
$3 - Output level
$4 - Reserved for future use
$5 - Reserved for future use
$6 - Reserved for future use
$7 - Output target
$8- - The logical line of output
Not all of these field are intended to be useful -- but I don't
know what sort of imaginative things people might come up with.
Example: To put a timestamp before every line...
/lastlog -rewrite "$strftime($1 %T) $8-"
*** News 07/04/2007 -- New $windowctl() option, $windowctl(GET refnum CHANNELS)
You can now fetch all of the channels in a window by using
$windowctl(GET <refnum> CHANNELS)
There is no defined order to the channels returned.
*** News 07/02/2007 -- Clarification of single-indirection implied hooks
Earlier, I said...
You may surround <string> with {}s if you wish, to avoid quoting
hell. Match sure to keep your {}s matched up if you do so.
See the "loadformats" info above for how to practically use this.
But due to a mistake, this never worked correctly. This is now
fixed. If you compare the normal two-expansion version:
@ var = [format_send_public]
@ fmt = '<%W$N%n> $1-'
addset $var int
@ hookctl(set list send_public implied \\$var);
set $var $fmt
which ties /on send_public dynamically to the value of
/set format_send_public.
If you wanted to do it directly, and not tie the implied hook to a
variable, you can surround the format in curly braces, like so:
@ hookctl(set list send_public implied {<%W$N%n> $1-})
Remember that curly braces protect the insides from $-expansion,
so for all purposes the inside of {}s is a literal string that is
not expanded except each time the /on is thrown.
*** News 07/02/2007 -- Clarification on using $'s in expression parser
The old expression parser used to allow you to use expandos as
lvalues in order to indirectly assign to variables, for example:
alias inc {
@ $0 += 1
}
But this is not supported in the new math parser. Instead you
have to use the deref operator, like so:
alias inc {
@ *0 += 1
}
which does the same thing.
*** News 06/25/2007 -- New flag to /XECHO, /XECHO -AS
The /XECHO -AS flag will output a message to all windows on the
current server. You can combine this with the -S flag if you want
to output to another server. This might be good for blasting a
message when you're disconnected from the server. For another
example, see below.
*** News 06/25/2007 -- New window level, SYSERR
The SYSERR window level will now be used for all of those layered
"INFO --" system errors ("syserrs"). The client will make its best
effort to ensure that these messages go to the correct server's
windows, and that /on yell is hooked in the correct server context.
You can combine this with /xecho -as [see above]...
on ^yell "* INFO -- *" {xecho -as $*}
EPIC5-0.3.4
*** News 06/02/2007 -- New tranformer: $xform(ALL)
The $xform(ALL) transform ignores the text and returns a list of
all supported tranformers. If the user didn't compile SSL support,
then you won't be able to use the strong crypto transforms, so this
is a great way to check before trying to use crypto.
Since this is a regular old transform, you can further transform it
any way you want to (if you want to).
*** News 06/01/2007 -- More $xform()s added to the list below
Please re-read the list immediately below, it's been updated!
*** News 06/01/2007 -- Totaly rewritten $xform(), now actually useful!
Here's the plan -- we're going to do this over again a second time.
$xform("<transformations>" "meta" "meta" text)
Where the <transformation>s are supported by transform_string().
At the time i write this, they are:
Reversable encodings that convert between binary and printable data
and do not require a meta:
URL URL encoding
ENC Base16 encoding
B64 Base64 encoding
CTCP CTCP encoding
NONE Straight copy -- data not changed
Reversable encryptions that require a meta value (a password):
SED Simple Encrypt Data
BF Blowfish-CBC
CAST CAST5-CBC
AES AES256-CBC
AESSHA AES256-CBC with SHA256 digest of the meta
DEF Default encryption (NOT IMPLEMENTED YET!)
Irreversable digest operations that do not require a meta:
SHA256 SHA256 message digest
You can string together multiple transformations. Any transformation
that requires a meta value (ie, a cipherkey) should be supplied after
the transformations *in the correct order*. After this should be the
plain text. To apply a transformation, prefix its name with a plus sign
("+") and to remove a transformation, prefix its name with a minus sign
("-"). For example, +URL means url encode, and -URL means url decode.
The transformations is a dword (must be surrounded by double quotes if
it contains a space, which it will if you do multiple transformations).
The meta values are dwords (must be surrounded by double quotes if
they contain a space). These two things make this function behave
differently than functions normally do, so this is a documented
deviancy!
Examples:
URL-encode a string $xform(+URL this is a string)
URL-decode a string $xform(-URL this%20is%20a%20string)
SED-cipher a string $xform(+SED password this is a string)
SED-decipher a string $xform(-sed password <whatever>)
More practical examples:
1) Read binary data from a file, encrypt it, and url encode it again.
@fd = open(file.txt R)
@data = read($fd 1024)
@cipher = xform("-CTCP +SED +URL" password $data)
@close($fd)
msg someone $cipher
Why does this work?
-- $read() returns ctcp-enquoted data, so -CTCP removes it
-- Now we have binary data, so +SED will cipher it
-- Now we have ciphertext, so +URL will url encode it.
We can send this to someone else, and they can put it in $cipher...
@newfd = open(newfile.txt W)
@newdata = xform("-URL -SED +CTCP" password $cipher)
@writeb($newfd $newdata)
@close($newfd)
We did the reverse of the above:
-- We -URL to recover the binary data
-- We -SED to decrypt it using the password
-- We +CTCP to put it in a form we can use with $writeb().
Viola!
*** News 05/31/2007 -- New math operator, Unary ** operator
The ** unary prefix operator treats its operand as an unexpanded
string, permitting it to be expanded again. This should remove
most any need to use /eval. Example:
@ foo = 'this is a string with $var in it'
@ var = 'one'
@ val1 = **foo
@ var = 'two'
@ val2 == **foo
So $val1 is "this is a string with one in it" and $val2 is
"this is a string with two in it". You can apply this operator
to any rvalue (natch):
@ foo = **[booya $foo booya!]
becomes
@ foo = **[booya this is a string with $var in it booya!]
becomes
@ foo == [booya this is a string with two in it booya!]
Yeah!
*** News 05/17/2007 -- New script, 'dcc_ports'
This script adds two new sets:
/set dcc_port_min <number>
and
/set dcc_port_max <number>
which create a port range which will be used by your dcc's. Each
number in the range will be chosen sequentially (this will be
enhanced further in the future) and any time you change either of
these values you reset the sequence and it goes back to the minimum
port again. When the port range is exhausted, it will cycle back
again to the minimum port.
*** News 05/17/2007 -- Default ports for dcc, recovering from ports-in-use
There are two new features, that sort of complement each other, and
sort of overlap each other. Whether to use one or the other depends
on how your script is set up and what your needs are.
When you use /dcc chat or /dcc send, but do not use the -p flag to
specify a port, you can create a callback to your script to create
a default port:
@dccctl(DEFAULT_PORT <string>)
The <string> will be expanded with $* being the dcc refnum of the
dcc needing a port number. The expanded value of <string> will be
used to set the WANT_PORT value (see below). If a port cannot be
used because it is already in use by someone else, this value will
be expanded repeatedly until it generates a port we can use.
Whenever you use /dcc chat or /dcc send and use -p to bind a port,
and that port is already in use, then /on dcc_lost will be thrown
$0 The person you're sending it to
$1 The dcc type (ie, send or chat)
$2 The filename (url encoded)
$3 The refnum of the dcc
$4 The port that we tried to use that is in use.
$5- The literal string "PORT IN USE"
It is expected that you will catch this hook and then do
@dccctl(SET $4 WANT_PORT <new port>)
and then the client will try the new port again. If a port cannot
be used because it is already in use by someone else, this hook will
be thrown repeatedly until you set a port we can use, or you don't
change the port
In either case, if a port is in use, and neither the DEFAULT_PORT
nor /ON DCC_LOST results in the WANT_PORT value being changed, then
the dcc will be considered a failure, and it will be abandoned,
just as it has always been until this change.
*** News 05/15/2007 -- New dccctl() value, "WANT_PORT"
You can now get and set the "WANT_PORT" value for a dcc, which
is the value that the -p flag sets. You can therefore use this
to change the -p flag for the user. Because this value is only
used at the time the client tries to bind() an inbound address,
changing this value after the dcc has already been offered will
have no effect: it is too late at that point to change the port.
*** News 05/15/2007 -- Normalization of the /SAY and /SEND commands
The old behavior:
- /SEND (the command used when you type text) sends a message to
1) Current Query
or 2) Current Channel
or 3) Nowhere
- /SAY (the "empty" command to overrule a query) sends a message to
1) Current Channel
or 2) Nowhere
The new behavior:
- /SEND sends a message to
1) Current Query
or 2) Current Channel
or 3) Nowhere
- /SAY sends a message to
1) Current Channel
or 2) Current Query <--- this is the change here
or 3) Nowhere
So /SAY will now send a message to the current query if you are
not on a channel, rather than silently failing. Until this change,
there was no way to do this at all.
*** News 05/13/2007 -- ***IMPORTANT*** Removal of /SET REVERSE_STATUS_LINE
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
The /set reverse_status_line variable has been removed. This means
that your /set status_format* variables, and your /window status_format
variables will not be auto-prepended with ^Vs like they have always
been since time immemorial. You ***MUST*** prepend your status_formats
with ^Vs (control-Vs, ie, the reverse character) if you want them to
appear in reverse.
EPIC5-0.3.3
*** News 04/11/2007 -- New argument to /xecho, -TARGET
Usually if you wanted to output to a channel's window, you would do
/xecho -w $winchan(#channel) ....
but someone asked (nicely) for a -target flag to /xecho because they
thought that looked nicer. So now you can do
/xecho -t #channel ...
*** News 04/11/2007 -- New serverctl operation "ALLGROUPS"
The $serverctl(ALLGROUPS) operation will return a unique list of all of
the group names used in all your servers. Do not pass any arguments
to this operation, since that's reserved for future expansion.
*** News 04/11/2007 -- New gettable serverctl value, "FULLDESC"
This value returns the fully qualified server description for a
server, suitable for writing into a servers file, or for passing
to /server -add or any old place. You can only get this value;
you cannot set it, although that's planned for the future.
*** News 01/27/2007 -- New serverctl value, "AUTOCLOSE"
Normally a server is automatically closed when the last window
to it is disconnected (or killed). Many people hate this behavior
and would like to have a server's connect persist even if there
are no windows connected to it. You can now control this behavior.
@serverctl(SET refnum AUTOCLOSE 0)
The default is 1 (natch). The behavior of turning this off is
not well understood. Use with caution, tell me of any troubles.
*** News 12/09/2006 -- New configure flag, --with-threaded-stdout
EJB has graciously provided us with a patch to do threaded output.
This code will hopefully work around problems with gnu screen
blocking, causing pinging out of your servers. You can turn this
code on by using the '--with-threaded-stdout' flag to configure.
This code is sort of experimental at this time, but this is an
officially supported feature, so please do report any problems you
have with it.
If you turn this option on, then $info(o) will include 'o'.
*** News 11/17/2006 -- New flag to /userhost, /userhost -extra
The /USERHOST -EXTRA flag causes the present value of a variable
to be appended to the $* value of the results of a userhost query.
Remember that /on 303 and /userhost -cmd are hooked with:
$0 Nickname
$1 + if oper, - if not oper
$2 + if away, - if not away
$3 Username
$4 Hostname
and now,
$5- Contents of the -extra variable
If you do not hook /on 303 or use /userhost -cmd, the contents of the
-extra variable are appended to the output.
Usage:
@ foo = [extra stuff]
USERHOST hop -extra foo -cmd {xecho -b $0!$3@$4 ($5-)}
might output
*** hop!jnelson@epicsol.org (extra stuff)
Remember that the argument to the -extra flag is *an lvalue*
(the name of a variable) and is not literal text! The lval is
expanded (yeilding an rval) and *that* value is saved, and used
later on. You can freely change the value of the variable and
that will not affect anything:
Example:
@ foo = [extra stuff]
USERHOST hop -extra foo -cmd {xecho -b $0!$3@$4 ($5-)}
@ foo = [blah blah]
still will output:
*** hop!jnelson@epicsol.org (extra stuff)
because the value is saved at the time you do /userhost.
EPIC5-0.3.2
*** News 11/04/2006 -- $shift() and $unshift() changed like $push() and $pop()
In the same way that $push() now only takes two arguments, $unshift()
now takes only two arguments, an lval, and an unquoted dword:
@ foo = [one two]
@ unshift(foo three four)
($foo is one two "three four")
In the same way that $pop() now only takes one argument, $shift()
now only takes one argument, an lval:
@ foo = [one two three]
@ booya = shift(foo)
($booya is one and $foo is two three)
*** News 11/04/2006 -- The /xdebug command now takes a block argument
You can temporarily change the /xdebug value for a block of
statements, and have the original value restored, all in one
operation:
xdebug dword { @push(bar "one two") }
@ foo1 = leftw(1 $bar)
($foo1 is "one)
xdebug dword { @ foo2 = leftw(1 $bar) }
($foo2 is "one two")
*** News 11/04/2006 -- New built-in function, $curcmd() (nullie)
With this one you know what command is currently executing. For
instance, you might want to not timestamp lines generated by
/lastlog to avoid having doubled timstamps, or prepend them with
something else than timestamps.
Example:
/set output_rewrite ${ curcmd() == [lastlog] ? [Lastlog:] : Z} $1-
*** News 11/4/2006 -- Changes to how $push() works with dwords
Up until this time, the $push() function treated the arguments
as a list of words, rather than a single word that needed to be
added. This caused confusion because people didn't have a way
to add a word atomically. For example:
xdebug dword
assign foo one two
@push(foo three four)
echo $foo returns one two "three four"
So from now on, $push() takes two arguments, an lvalue, an a
single *unquoted* dword. If the dword contains spaces, then it
will be quoted before added to the variable (as above)
*** News 11/4/2006 -- Changes to how $pop() works (along with dwords)
Up until this time, the $pop() function has had two conflicting
behaviors, that ambiguously overlapped:
$pop(word word word word)
$pop(lval)
But what happens if you have a word list with only one word?
For this reason, $pop() wasn't really useful, and people avoided
using it. So I've removed the ambiguity by removing the first
case, which isn't used.
If you want to $pop() off a word list, use $rightw(1 <word list>)
which has the proper behavior.
Further, to differentiate $rightw() from $pop(), the $pop()
function returns an *dequoted string*, as in this example:
assign foo one two "three four"
xdebug dword
echo $rightw(1 $foo) returns "three four"
echo $pop(foo) returns three four
*** News 10/25/2006 -- New field for server descriptions, 'vhost'
You may now specify per-server virtual hostnames ("vhosts")
by using the "vhost" field in a server descrpition.
Example:
/server irc.foo.com:vhost=my.other.hostname.com
Obviously the value you set for vhost must be a value that
you could use for /hostname; that is, a hostname or p-addr
that resolves to an address your machine will let you bind().
Specifying a vhost for the wrong protocol will malfunction.
(For example: /server irc.foo.com:pr=4:vhost=[ff::ff] )
*** News 09/24/2006 -- New /ON, "WINDOW_SERVER" (nullie)
This new hook will trigger every time window's server is
changed. This might be useful for purging window-related data
such as scripted window-to-channel associations. The params are:
$0 - affected window's refnum
$1 - old server
$2 - new server
*** News 09/19/2006 -- New /ON, "UNKNOWN_COMMAND" (nullie)
The hook is thrown whenever an unknown command is entered on the
command line or specified in a script. This way, you can
complete a partial command name with an ambiguous hook. The
params are:
$0 - command being unknown
$1 - parameters, if any
*** News 09/19/2006 -- New /ON, "CHANNEL_LOST" (nullie)
This hook is thrown whenever the client leaves a channel for any reason.
It is meant as a generalized way for clearing channel-related structures
in scripts, instead of having to hook on several other ones (KICK, PART
and SERVER_LOST). The parameters are:
$0 - server refnum where a channel is being destroyed
$1 - channel name
Have one thing in mind, though. This hook isn't necessarily
thrown in current server's context. Instead of $servernick(),
you need to do $servernick($0).
*** News 09/18/2006 -- New keybinding, "RESET_LINE"
The "RESET_LINE" keybinding is intended to be used by tabkey and
history recall scripts that need to be able to replace the contents
of the input line without affecting the cut buffer.
The RESET_LINE keybinding takes an argument (naturally) that is
the new value of the input line. If you don't provide an argument
then the input line is simply cleared.
Example:
/alias oofda {parsekey reset_line this is your new input line}
/bind ^I parse_command {oofda}
(type something and then hit tab)
*** News 09/18/2006 -- New field in server description, "proto"
A new (seventh) field, has been added to server descriptions.
This field is named "protocol" (see below) and can be abbreviated
as "pr". The field restricts what socket protocols you want epic
to use for this server. Possible values are;
tcp4 or 4 IPv4 only
tcp6 or 6 IPv6 only
tcp or any IPv4 or IPv6, doesn't matter
Naturally, "any" is the default.
*** News 09/16/2006 -- Enhancements to server descriptions
You are permitted to skip fields in the server description. Each
field has a name that you refer to it by:
host port pass nick group type
You can change the field by "assignment", like so:
/server irc.foo.com:group=efnet
or
/server irc.foo.com:7005:type=irc-ssl
The server description actually skips to the name field, so
you don't have to specify them in order, you can skip around
however it suits you. If you skip to a field and then don't
specify the name of the following field, whatever field would
naturally follow is assumed:
/server irc.foo.com:7005:group=efnet:irc-ssl
In this case, you skipped to the 'group' field, and the field
that follows that is 'type', so that is what "irc-ssl' is
assumed to be.
This can be used any place server descriptions are taken,
from /server, to /window server, to ircII.server, to the
command line, everywhere.
*** News 09/14/2006 -- WINDOW command will fail if given invalid window refnum
Consider the behavior of
/WINDOW foo KILL
in the two cases where the window 'foo' does and does not exist.
Up until now, if 'foo' existed, it will killed, but if 'foo' did
not exist, this was not an error, and the current window was killed.
Ignoring window refnums that didn't exist was intended as a courtesy
but actually is a hassle, since most people assume that any further
commands will operate only on that window, or not at all.
So this behavior has been changed. In the above case, if 'foo' does
not exist, then the /window command simply fails at that spot and
all further actions in that statement are ignored.
*** News 09/14/2006 -- Some functions no longer support double quoted words
The work was done by nullie.
The following functions have previously supported double quoted
words, but due to popular sentiment, this support is being removed
to make the functions useful with untrusted data (ie, irc stuff)
match rmatch userhost word
remw insertw chngw pattern
filter rpattern pop findw
findws splitw diff sort
numsort uniq remws getsets
getcommands getfunctions prefix rfilter
copattern corpattern cofilter corfilter
The following functions didn't support dwords unless you did
/xdebug extractw. Nothing has changed for these functions.
leftw rightw midw notw
restw insertw chngw beforew
tow afterw fromw splice
The /FE and /FOR I IN (list) commands previously supported
double quoted words, but now they will not.
You can revert to the epic4 behavior (for now) with /xdebug dword
*** News 08/31/2006 -- New serverctl value, $serverctl(GET refnum ADDRSLEFT)
This returns the number of addresses left from the last dns lookup
for the server "refnum". It's intended to be used like this:
on server_status "% % CLOSED" {
if (serverctl(GET $0 ADDRSLEFT)) {
# epic will be reconnecting...
}
}
This will help nullie write his reconnect script to not trap until
epic is finished with what it wants to do.
*** News 08/17/2006 -- Add support for OPERWALL, /ON OPERWALL, OPERWALL level
OPERWALL is an efnet server command which servers send amongst
themselves. The local server very graciously sends it to you
wrapped in a WALLOPS (big ups to whoever was considerate enough
and made this decision, you made it much easier to support!)
so we peer at WALLOPS and route "OPERWALL - " messages to
/ON OPERWALL and a new OPERWALL window level. Now black will
stop asking me to add this.
This is all opt-in. If you don't hook /on operwall, then they
continue going to /on wallops and WALLOPS as they have always done.
*** News 08/17/2006 -- Two new server states CREATED and DELETED
When a server is added to the server list, it's initial state is
"CREATED". Once it is initialized, it is switched to the "RECONNECT"
stage. So you can trap new servers with:
/on server_status "% CREATED %" {xecho -b New server is $0}
Servers that are deleted are switched to the DELETED state:
/on server_status "% % DELETED" {xecho -b Server $0 going away}
No matter what you do, you cannot stop the deletion of a server.
It is recommended you /defer any changes you make to the server list
from within an /on server_status that traps a server deletion.
EPIC5-0.3.1
*** News 07/01/2006 -- Revamped /encrypt command
The /encrypt command, which is a legacy ircII command, has been
revamped and a lot of functionality has been added (see below).
The new format looks like this:
/encrypt
See the cipher list
*** Ways to specify the other person (TARGET is a NICK or CHANNEL)
/encrypt TARGET key
Trade messages with 'nick' on all servers using 'key'.
/encrypt 0/TARGET key
Trade messages with 'nick' only on server 0 using 'key'
/encrypt SERVERNAME/TARGET key
Trade messages with 'nick' on server 'name' using 'key'.
'name' can be "ourname", or "itsname"
/encrypt SERVERGROUP/TARGET key
Trade messages with 'nick' on group 'group' using 'key'.
/encrypt ALTNAME/TARGET key
Trade messages with 'nick' on servers with 'altname' using
'key'.
*** Ways to specify the cipher you want to use
/encrypt nick key
Trade SED messages (default)
/encrypt nick key /path/to/program
Trade messages ciphered by an external crypto script
/encrypt -SED nick key
Trade SED messages
/encrypt -SEDSHA nick key
Trade SED messages, using the SHA256 hash of 'key'.
/encrypt -CAST nick key
Trade CAST5-CBC messages
/encrypt -BLOWFISH nick key
Trade BLOWFISH-CBC messages
/encrypt -AES nick key
Trade AES256-CBC messages
/encrypt -AESSHA nick key
Trade AES256-CBC messages, using the SHA256 hash of 'key'.
Compatability and availability of all these is discussed in the
following news bulletin.
AESSHA is the best cipher, but if it's not available, then SEDSHA
is better than SED, but SED is universally compatable. If you must
use SED, use a very long key string (40 chars)
For backwards compatability, messages ciphered by external crypto
scripts are always sent as SED messages, even though they are not,
technically, ciphered with SED.
*** News 06/26/2006 -- CAST5, Blowfish, AES, and AES-SHA encryption support
This only took me 8 years to catch up with ircII! Yah!
All of this support is provided by the EVP api in OpenSSL.
If you don't have OpenSSL, this won't be supported.
The /ENCRYPT command now takes an argument after the nickname,
which can be either -CAST, -BLOWFISH, -AES, or -AESSHA
/ENCRYPT nick -CAST key
/ENCRYPT nick -BLOWFISH key
/ENCRYPT nick -AES key
/ENCRYPT nick -AESSHA key
The -CAST support is fully compatable with ircII (as of the last
time I tested it) and -BLOWFISH isn't compatable with anything
but your fellow bleeding edgers (since nobody supports that yet).
Same thing with -AES (only supported by EPIC for now).
The Blowfish support is *NOT* compatable with FiSH, because FiSH
has a couple of idiosyncracies (non-standard Base64, supports keys
that are longer than what openssl supports). It would probably be
more likely that FiSH needs bag-on-the-side support than to be
mainlined into the crypto support...
AES uses a fixed 256 bit key. This is 32 characters. If your key
is not 32 characters, it is padded out with nuls (ascii 0). If your
key is more than 32 characters, it is truncated.
AESSHA runs your key through SHA2 to generate a 256 bit key for AES.
In any other way, it works the same as AES.
SEDSHA runs your key through SHA2 to generate a 256 bit key for SED.
In any other way, it works the same as SED. Unlike the others, this
does not depend on openssl and is always available.
Please remember, when you /ENCRYPT a target, everything you send to
that target is encoded. This includes /CTCP requests (/DCC offers).
Because ircII does not do CTCP-over-CTCP, you won't be able to send
/DCC SEND or /DCC CHAT offers to ircII users, but it will work with
EPIC users.
*** News 06/24/2006 -- New ON, /ON NUMERIC
The /ON NUMERIC hook is thrown for all numerics that you do not
catch with a more specific /ON <number>. For example:
/ON 318 * {echo Numeric 318 -- $*}
/ON NUMERIC * {echo Not Numeric 318 -- $*}
This can be used to unilaterally replace the default format for
numerics that you don't otherwise catch, without having to actually
catch all of them! The expandos are:
$0 The numeric being thrown
$1 The server who sent the message
$2- The message
*** News 06/24/2006 -- New script, 'reconnect' from nullie
The script causes the client to reconnect to disconnected servers after
a certain period (/SET reconnect_time, measured in minutes), cycling
between servers in a given servergroup. To register given servergroup
for its use, use "/NETWORK ADD group". With conjunction with the
autojoin scripts, allows the user to automatically rejoin channels he
was on before a disconnect.
*** News 06/24/2006 -- New script, 'renumber' from nullie
The script adds an alias (/RENUMBER), filling "gaps" in window numbers.
If /SET renumber_auto is set (defaults to OFF), this will be performed
automatically after a window is closed.
*** News 06/24/2006 -- New script, 'floodprot' from nullie
This script buffers all outgoing data sent by the client before
transmitting it to the remote server, to avoid "Excess Flood"
disconnection, e.g. pasting a lot of text or sending a lot of /MODE
commands.
/SET floodprot_burst decides how many lines can be sent immediately
after an idle period.
*** News 06/24/2006 -- New script, 'autoquery' from nullie
The script creates new windows for incoming private messages, one per
each sender.
/SET autocreate_split_queries (defaults to OFF) decides whether windows
will be split (ON) or hidden (OFF).
*** News 06/24/2006 -- New script, 'autojoin' from nullie
The script maintains a list of channels to join upon connecting to a
server. For user-defined channels that are joined after every connect,
create an ~/.irc/channels file with one line for each channel to join
in the specified format:
<channel> <winnum> <servergroup> [key]
For instance:
#epic 2 efnet
#secretchan 3 somenet qwerty
If the reconnect script is loaded and given server's group is added
via /network add, the script will automatically rejoin channels on
which user was before a disconnect, remembering the keys.
*** News 06/24/2006 -- SEND_LINE does SCROLL_FORWARD in HOLD_MODE
For those who use HOLD_MODE, if you accidentally scroll back, you
might find yourself trapped in a place where hitting <enter> (the
SEND_LINE keybinding) does not get you back current. To avoid this
unfortunate situation, if you are in HOLD_MODE, then SEND_LINE
keybinding (the <enter> key) will now always advance you forward a
page, even if you are in scrollback mode.
*** News 06/24/2006 -- Support for MAILDIR maildrops, /SET MAIL_TYPE
If you /SET MAIL_TYPE MAILDIR, epic will check your maildir maildrop
for email instead of your mbox maildrop. You can /SET MAIL_TYPE MBOX
to switch back to mbox.
You must set the MAILDIR (or MAIL) environment variable to point to
your maildrop. For MAILDIR, your maildrop is the directory that
contains the 'new' and 'cur' subdirectories.
EPIC will check your 'new' directory for new emails. This support
works the same way for maildir as it does for mbox:
/on mail (maildir) /on mail (mbox)
$0 -- New emails in 'new' $0 -- New emails in 'mbox'
$1 -- Total emails in 'new' $1 -- Total emails in 'mbox'
The maildir support does not look in 'cur' or anywhere else.
*** News 06/24/2006 -- Nonblocking SSL negotiation
Connections to ssl-enabled servers have an SSL protocol negotiation
stage between the nonblocking connect() and irc protocol negotation.
Traditionally, this SSL negotation has been blocking, but this can
take a long time, during which the client is locked up. So now
SSL negotiations are nonblocking. Yay.
Previously, the server state goes from CONNECTING to REGISTERING.
But if it has to take a detour for nonblocking ssl negotation, it
will go from CONNECTING to SSL_CONNECTING and then to REGISTERING.
*** News 06/24/2006 -- New script, 'nickcomp' from Blackjac
*** News 06/06/2006 -- Much improved configure support for perl/tcl/ruby
*** VERY IMPORTANT FOR PACKAGE MAINTAINERS ***
The code in the 'configure' script that decides how to integrate
perl, tcl, and ruby has been rewritten. For the most part, it
should automagically work. Here's the details:
PERL:
--with-perl
--with-perl=yes
--with-perl=/usr/local/bin/perl
--with-perl=no
--without-perl
By default, unless you specify --without-perl (or --with-perl=no),
configure will look for the 'perl' program in your path (or use the
perl you specify) and will interrogate the extmod package for details
how to compile sucessfully against perl. If the default 'perl' binary
is fine, you need do nothing at all. Otherwise, all you need know
is what 'perl' binary you want to use.
RUBY:
--with-ruby
--with-ruby=yes
--with-ruby=/usr/local/bin/ruby
--with-ruby=no
--without-ruby
Same deal as with perl. Configure will use the 'ruby' program (or
the one you specify) to get all the details necessary to get support
for ruby. For most people, you need do nothing at all.
TCL:
--with-tcl
--with-tcl=yes
--with-tcl=/usr/local/lib/tclConfig.sh
--with-tcl=no
--without-tcl
TCL is a little different. It looks for a 'tclConfig.sh' file.
These ones are used by default (in this order)
/usr/lib/tclConfig.sh
/usr/local/lib/tclConfig.sh
/usr/local/lib/tcl8.4/tclConfig.sh
If your tclConfig.sh is not in one of these places, or if you want
to use a specific tcl version, you must specify the path to the
tclConfig.h file to --with-tcl.
Note to package maintainers:
Please throw away all of the hacks and patches you have in place
to support the old nasty way to set these flags. I tried to make
this as painless as possible. If the user has ruby/perl installed,
then ruby/perl support will be included. The hard part is tcl, since
every system puts their tclConfig.sh in an odd place.
*** News 06/06/2006 -- /SET INPUT_ALIASES and /SET CMDCHARS deprecated
Due to recent optimizations in the epic command parser, these two
sets no longer have any function (although they have not yet been
removed). If you desparately need the use of these /set's, please
let me know. Otherwise someday they will vanish into the ether.
*** News 06/06/2006 -- Support for RUBY: $ruby() and /ruby
Support for ruby (1.6.4 and 1.8.4 are tested) has been added. The
support is similar to perl and tcl. You can call out to ruby using
either the $ruby() function or the /ruby command.
The following callbacks to epic are available from within ruby:
EPIC.echo(stringval) Same as /echo
EPIC.say(stringval) Same as /xecho -b
EPIC.cmd(stringval) Run "stringval" without $-expansion
EPIC.eval(stringval) Run "stringval" with $-expansion
EPIC.expr(stringval) Return value of epic expression
EPIC.call(stringval) Return value of epic function call
All of these functions take one argument (a string) and return one
value (also a string).
Some examples:
To export an epic variable to ruby (as a String object):
@ ruby(rubyvar='$epicvar')
or
ruby {rubyvar = EPIC.expr("epicvar")}
To export a ruby variable to epic:
@ epicvar=ruby(rubyvar)
or
ruby {EPIC.expr("epicvar=[#{rubyvar}]")}
To iterate over each item in a ruby collection, passing each
value as the argument to an epic command:
ruby {
something.each {|x|
EPIC.cmd("epiccmd #{x}")
}
}
(Think of using this to do database access)
The EPIC.cmd and EPIC.eval commands do not start off a new atomic
scope within epic. Consequently, you can read (and write) local
variables that are otherwise in scope:
alias booya {
@ :epiclocal = 5
ruby {
rubyvar = EPIC.expr("epiclocal").to_i
rubyvar = rubyvar + 1
EPIC.expr("epiclocal = '#{rubyvar}'")
}
echo $epiclocal
}
It is *IMPORTANT TO REMEMBER* that because EPIC is untyped, everything
returned to ruby is a String object. If you have a number in EPIC,
it will be a String in ruby, and you need to explicitly convert it
to an integer (as in the above example).
It is *ALSO VERY IMPORTANT TO REMEMBER* that if you use the /ruby
command, and you use it in a script that is loaded with the standard
(legacy) loader, the loader will insert semicolons into your ruby code
in the places where it would belong if it were ircII code. Needless
to say, THIS MAY OR MAY NOT ALWAYS BE CORRECT. The best solution is
to get with the program and switch over to the pf-loader where this
is entirely under your control.
*** News 06/06/2006 -- New commands: /PERL and /TCL
Support for perl and tcl has been via the $perl() and $tcl()
functions. Regretably, calling a function submits the argument
list to quoting hell, which can be particularly painful for perl.
To remedy this somewhat, you can now call a block of perl or tcl
code with these new commands. The block of code must be surrounded
by curly braces, which protect the inside from quoting hell.
Usage: /perl { <perl code goes here> };
Usage: /tcl { <tcl code goes here> };
See the above warnings (for ruby) about using these commands in a
script that is loaded by the standard loader. Semicolons may be
a problem. Use the PF loader instead.
*** News 06/06/2006 -- Removal of /set highlight_char
The long-threatened removal of /set highlight_char has occurred.
Please use the 'highlight' script for its replacement.
*** News 06/06/2006 -- New script, "chanmonitor"
*** News 06/06/2006 -- Extra support for 64 bits, if you have it.
Most built-in-functions that take an integer argument will
now support 64 bit integer values.
Further, the following functions can output 64 bits whereas
they never could before:
fseek numsort strtol
tobase tobase stat
EPIC5-0.2.0
EPIC5-0.2.0 was released somewhere in here
EPIC5-0.0.8
*** News 12/09/2005 -- New window verb, /WINDOW INDENT (ON|OFF)
The /window indent value permits you to tweak the /set indent
value on a per-window basis. However, if you do /set indent,
it will overwrite all of your per-window indent values (I'm
open to discussion on this), to retain backwards compatability.
*** News 12/09/2005 -- New built in function, $xform()
*** OBSOLETE *** THIS INFORMATION IS OLD *** OBSOLETE ***
This information is no longer useful. Do not rely on it. Please
check out the new documentation up above.
*** OBSOLETE *** THIS INFORMATION IS OLD *** OBSOLETE ***
The $xform() function does (symmetrical) string transformations.
What is a symmetrical transformation? It is one in which all of
the bits in the original string are present in the result string,
and the original string can be recreated from the result. This is
distinct from the idea of hashing, which is closer to being a lossy
compression algorithm.
The general format of the $xform() function is:
$xform(TYPE DIRECTION KEY text)
whereby TYPE is one of the following:
URL Convert non-printable chars to %HH equivalent
Equivalent to $urlencode() and $urldecode()
ENC Base16 encoding, for creating variable names
Equivalent to $encode() and $decode()
B64 Base64 encoding, for sending over email/http
Equivalent to $b64encode() and $b64decode()
NONE No changes (just copies the string)
CTCP Mangle things they way CTCP ought to be
No equivalent
and DIRECTION is either "E" (for encoding) or "D" (for decoding),
and KEY is ignored except for SED, where it is the cypher used in
the SED bit-twiddling, and DEF where it is the nickname of the
person who it should be transformed for
At the time I write this, SED, CTCP, and DEF are not implemented
yet, but they will be soon. Watch for more info.
More transformations are expected to be supported in the future
(including real encryption routines). It will probably be possible
to add your own at some point.
*** News 11/28/2005 -- New /ON, /ON KEYBINDING
This on goes off whenever a keybinding is activated:
$0 - The keybinding that is activated
$1 - Length of the sequence (future expansion -- always 0 for now)
$2 - The ascii number of the key that activated it.
Note that $2 only contains the last character in the bound sequence.
In the future, $2- will change to be a word list containing all of
the characters in the sequence. When this change is made, $1 will
be changed to a positive value. But for now, $1 is always 0, and
$2 is always just the last character.
If you hook this silently, you will suppress the keybinding!
If you only want to spy on a keybinding, hook it quietly.
The purpose for which this was requested was to be able to trap
everything bound to SELF_INSERT without having to rebind them.
Examples:
To do something every time capital-A is pressed:
on -keybinding "SELF_INSERT % 65" {echo You pressed A}
To keep the user from using the SWITCH_CHANNELS keybinding.
on ^keybinding "SWITCH_CHANNELS % *" #
*** News 10/30/2005 -- New function, $dbmctl() [hash table support]
*** Notice *** This function uses a custom implementation of SDBM.
The file format it generates should be compatable with $perl() but
is not compatable with ndbm or gdbm.
The $dbmctl() function is an interface to the unix DBM API:
$dbmctl(OPEN type filename)
Open a DBM file for read and write access.
$dbmctl(OPEN_READ type filename)
Open a DBM file for read-only access.
$dbmctl(CLOSE refnum)
Close a previously opened DBM file
$dbmctl(ADD refnum "key" data)
Insert a new key/data pair. Fail if key already exists.
$dbmctl(CHANGE refnum "key" data)
If key already exists, change its data. If it doesn't exist,
add it.
$dbmctl(DELETE refnum "key")
Remove a key/data pair
$dbmctl(READ refnum "key")
Return the data for a key.
$dbmctl(NEXT_KEY refnum start-over)
Return the next key in the database
$dbmctl(ALL_KEYS refnum)
Return all keys -- could be huge! could take a long time!
$dbmctl(ERROR refnum)
Return the errno for the last error.
"Type" must always be "STD" for now. Reserved for future expansion.
"Filename" must be a filename that doesn't include the ".db" extension!
This is a requirement of the DBM api, and not an epic thing.
"Refnum" is the integer value returned by OPEN or OPEN_READ
"Key" is a hash table key value
"Data" is a hash table data value
"Start-over" is 1 if you want to fetch the first key in the table, and
is 0 if you want to fetch the next key. You must call this
with 1 before you call it with 0, according to the API.
ALL_KEYS does a "start-over" and you need to do another "start-over"
after using it.
*** News 10/29/2005 -- New built in function, $levelctl()
You may now add new window/lastlog/ignore/flood levels at runtime!
Once you add a level, you can use it in your windows, and you can use
it in /xecho -l. Since ignore and flood control are hardcoded features
adding a level will show up in their types, but will never be used.
The $levelctl() function permits you to add and query levels:
$levelctl(LEVELS)
Return a space-separated list of all canonical level names.
This does not return any alias names (see below)
$levelctl(ADD new-name)
Add "new-name" as a new canonical level name. This new name
is automagically considered part of ALL. There is no way to
remove levels (yet). This returns the new level's refnum,
which is a small integer value. If you try to add a level
that already exists, it is not added again, but it's existing
refnum is returned.
$levelctl(ALIAS old-name new-name)
Add "new-name" as an alias for "old-name". An alias name is
permitted anywhere that level names are accepted, but an alias
name is never output by the client -- it is silently converted
into the canonical name. For example, "OTHER" is the canonical
level name, and "CRAP" is its alias. If you do
/WINDOW LEVEL CRAP
It will tell you
*** Window level is OTHER
$levelctl(LOOKUP level-name)
Returns the refnum for a level-name. The level-name can either
be a canonical level name or an alias level name.
$levelctl(LOOKUP refnum)
Returns the canonical level name for a refnum.
$levelctl(NORMALIZE level-name(s))
Given a comma-and-space separated list of level names (like
what you specify to /window level), this returns a canonical
form which is suitable for /save'ing or displaying to the user.
For example,
ALL,-CRAP
would return
PUBLIC MSG NOTICE WALL WALLOP OPNOTE SNOTE ACTION DCC
CTCP INVITE JOIN NICK TOPIC PART QUIT KICK MODE USER1
USER2 USER3 USER4 USER5 USER6 USER7 USER8 USER9 USER10
EPIC5-0.0.7
*** News 10/12/2005 -- The %D status bar expando (dcc activity) improved
Previously, the %D status bar expando showed you "packets" of
activity. A packet was 2k of data, so it looked like this:
( hop: 99 of 2350 (4%))
Now this is all done in reasonable units, like so:
( hop: 198Kb of 4.7Mb (4.2%))
Perhaps in the future I might remove the "b" after "Kb" and "Mb".
*** News 10/12/2005 -- New script 'highlight', removal of highlight ignores
This is kind of experimental for now, but there is a new script
'highlight' which you can /load, which will implement the features
that were previously available via "highlight ignores". I haven't
yet moved /set highlight_char over to the script, but I will do that
for EPIC5-0.0.8. If you want to help me make this script more robust,
drop me a line or just /msg me. If you have no idea what I'm talking
about, don't worry, you're not missing anything.
*** News 10/12/2005 -- New built in functions $b64encode() and $b64decode()
The $b64encode() function takes an arbitrary string and returns an
expanded string using the Base64 encoding, which uses all of the
characters A-Z, a-z, 0-9, and + and /. If you count them up, this
is 64 distinct characters (hence the name base64), which represent
six bits of information. Thus, 3 bytes of data (24 bits) can be
transformed into 4 characters which are safe to send through data
channels that can only handle text (such as the irc server, or
DCC CHAT, email, or a web server)
*** News 10/12/2005 -- Can now set both level and target with with /XECHO
Maybe it would help if I just re-documented /XECHO's options:
XECHO options can always be abbreviated as long as they're not
ambiguous. For example, /XECHO -CURRENT can be used as /XECHO -C,
and /XECHO -WINDOW can be used as /XECHO -W.
-CURRENT
The same as -W 0 (output to current global window)
-LINE <number>
Must be used in conjunction with -WINDOW. This allows you to
replace the <number>th line on a specified window. This is
the feature of the old "scratch windows". All windows behave
as scratch windows these days.
-LEVEL <window-level>
The window levels are of course NONE, CRAP, PUBLICS, MSGS,
NOTICES, WALLS, WALLOPS, OPNOTES, SNOTES, ACTIONS, DCCS,
CTCPS, INVITES, JOINS, NICKS, TOPICS, PARTS, QUITS, KICKS,
MODES, and USER1 through USER10. If you use this option
without using -WINDOW, then the output will be sent to the
window that claims the corresponding level for the current
server. If you use this option together with -WINDOW, then
it will be sent to that window anyways. This is new, because
previously you could not tag output to a window with a level
that didn't belong to that window.
-VISUAL
Output to a visible (non-hidden) window. If window 0 (the
global current window) is visible, it is used. If window 0
is hidden, then another visible window is chosen.
-WINDOW <refnum>
Output to a particular window, instead of the normal one.
Remember that window refnum 0 is special, and represents the
global current window which **may or may not** be connected
to the current server. If you need the current server's
current window, use $serverwin().
-ALL
Output to each and every window.
-BANNER
Prefix the output with the /SET BANNER value.
-RAW
Send the output directly to the terminal and do not attempt
to pre-process it. This is used to send special control
sequences to your terminal that EPIC does not support (such
as sequences to change your character set)
-NOLOG
Do not allow the line of output to be written to the global
logfile, a window logfile, or to a /LOG logfile.
-SAY
Use say() to output the line, which makes it subject to
output suppression rules. An example will help:
alias loud { xecho -b This is always displayed }
alias noloud { xecho -b -s This is not always }
In the first case, you could do
loud
or
^loud
and you would still see the output either way. There is no
way to "suppress" the output. In the second case
noloud
shows the output but
^noloud
does not.
-X
("Extended" output?) Ignore /SET DISPLAY_MANGLE for just
this one line, and pretend it was /SET to NORMALIZE instead.
The most obvious use for this would be to output something in
color even when the user has used /set display_mangle to strip
color.
-F
Do not allow the line of output to trigger hidden-window-
notification. Normally output to a hidden window will cause
that window's refnum to show up in the %F status bar expando.
Using this keeps that from happening.
--
End of argument processing: there are no more arguments after
this and everything else should just be output directly
xecho -- -f <- the -f here is output!
*** News 10/05/2005 -- Automatic Scrollback rebuilding, new /WINDOW operation
Whenever the width of a window changes (either because you're
swapping it in, and the screen is a different size than when you
swapped the window out, or because it's visible on a screen that
is changing size), the window's scrollback will be rebuilt. This is
accomplished by clearing the scrollback and then rebreaking the
lastlog. If you have a large scrollback and a small lastlog, this
may result in some data lossage.
Although the rebuilding process attempts to keep the top of the window
the same before and after the rebuild, it's possible for what you were
seeing on your window to be gone after the rebuild. If this occurs,
the window will be set to the very top of the scrollback (ie, as far
back as it can go).
Generally, it is advisable from now on to have a lastlog that is
at least as large as your scrollback, if you want to avoid any
chance of problems when your windows resize.
*** News 10/05/2005 -- DNS Helper (hostname lookups) now nonblocking by default
EPIC5-0.0.6 shipped with a dns helper, but it was synchronous (it
did not fork off a subprocess). It has been debugged and now it is
turned on, and it is asynchronous. This DNS helper is only used for
server connections. This is the final stage in making connections to
server fully nonblocking. yay! However, forking off a child process
to do the nonblocking dns lookup can cause issues with resource
limitations. (Typically you are only permitted to run a certain
number of processes at a time, and this would count against that limit.)
*** News 10/05/2005 -- New /SET, /SET MANGLE_DISPLAY, many sets removed
There is a new /SET, /SET MANGLE_DISPLAY, which mangles all output
being sent to your display, naturally. It works in the same way
that /set mangle_inbound, mangle_outbound, mangle_logfiles works,
and its default value is "NORMALIZE". You should always specify
either "NORMALIZE" or "MANGLE_ESCAPE" -- if you turn off both, then
it will be possible for remote people on irc to send raw escape
sequences to your display, and that is bad!
The following /SETs have been superceded by recent changes, and have
been removed:
alt_charset blink_video bold_video
color display_ansi display_pc_characters
inverse_video underline_video
*** News 10/05/2005 -- Functions that changed because of unified mangler
$leftpc(<COUNT> <TEXT>)
This function performs a $stripcrap(NORMALIZE <text>) now.
$numlines()
This function performs a $stripcrap(NORMALIZE <text>) now.
$printlen(<TEXT>)
This function performs a $stripcrap(NORMALIZE <text>) now.
$stripansicodes(<TEXT>)
This function is the same as $stripcrap(NORMALIZE <text>)
$stripc()
This function is the same as $stripcrap(COLOR <text>)
$stripcrap()
See below for important information.
*** News 10/05/2005 -- Unified string mangler/normalizer
Forget everything you thought you knew about the old mangler and
normalizer (sorry!). This is (believe it or not) much less complicated
than before, and certainly more well documented than before!
EPIC5 now includes a unified mangler/normalizer that is used by the
following features:
(The above functions)
The input prompt
/lastlog -mangle
/log mangle
/set mangle_inbound
/set mangle_outbound
The status bar
All characters are grouped into one of 9 "types":
0 Normal chars 32-127, 160-255
1 High bit control chars 128-159
2 Escape char ^[
3 Color char ^C
4 Highlight toggle ^B ^E ^F ^O ^V ^_
5 Unsafe char ^M (\r)
6 Control char ^@ ^A ^D ^H ^K ^L ^N ^P ^Q
^R ^T ^U ^W ^X ^Y ^Z ^\ ^] ^^
7 Beep ^G
8 Tab ^I
9 Non-destructive Space ^S
There are the 12 following mangle types:
MANGLE_ESCAPES NORMALIZE STRIP_COLOR STRIP_REVERSE
STRIP_UNDERLINE STRIP_BOLD STRIP_BLINK STRIP_ND_SPACE
STRIP_ALT_CHAR STRIP_ALL_OFF STRIP_UNPRINTABLE STRIP_OTHER
The mangle types transform the characters, according to this table:
-----------------------------------------------------------------------
A = Character or sequence converted into an attribute
M = Character mangled (ie, ^A into ^VA^V)
S = Character stripped, sequence (if any) NOT stripped
X = Character stripped, sequence (if any) also stripped
T = Transformed into other (safe) chars
- = No transformation
Type
0 1 2 3 4 5 6 7 8 9
(default) - - - - A - - T T T
NORMALIZE - - A A - X M - - -
MANGLE_ESCAPES - - S - - - - - - -
STRIP_COLOR - - - X - - - - - -
STRIP_* - - - - X - - - - -
STRIP_UNPRINTABLE - X S S X X X X - -
STRIP_OTHER X - - - - - - - X X
(/SET ALLOW_C1) - X - - - - - - - -
-----------------------------------------------------------------------
There are only *three* ambiguous cases:
* Type 2:
MANGLE_ESCAPES has first priority, then NORMALIZE, and
finally STRIP_UNPRINTABLE
* Type 3:
STRIP_UNPRINTABLE has first priority, then NORMALIZE, and
STRIP_COLOR. You need to use both NORMALIZE and STRIP_COLOR
to remove color changes in escape sequences
* Type 6:
STRIP_UNPRINTABLE has first priority over NORMALIZE.
*** News 10/05/2005 -- "ANSI" mangle type linked to "NORMALIZE"
The mangler type "ANSI" has been renamed to "NORMALIZE". You can
continue to use "ANSI", but it will be silently changed to "NORMALIZE"
internally.
*** News 10/05/2005 -- New behavior for $mask() [jm]
Jm needs to write me some documentation for this...
*** News 08/30/2005 -- De-support of 7-bit-only terminal/emulators
Once upon a time, long long ago, on a planet far away, there
used to be terminals and terminal emulators that did not know
how to handle characters with the 8th bit set. Thankfully,
nobody uses these any more. There has been rudimentary support
in ircII clients to support this old hardware, but it is now
unnecessary and only causes to torment people who can't figure
out how to input their 8 bit characters!
/SET EIGHT_BIT_CHARACTERS has been removed, and its behavior is
now hardcoded to the previous "ON" value. If you really need
7-bit support, epic4 will always have it...
*** News 08/30/2005 -- Simplification of display mangling, part one
There are 15 /set's that control how output to the display is
prepared ("mangled"). That's about 14 too many. The following
/set's are at best historical curiosities and do not serve any
modern purpose. Their function has been eliminated.
BEEP_MAX TAB TAB_MAX ND_SPACE_MAX
*** News 08/23/2005 -- New /window verb, /WINDOW FLUSH_SCROLLBACK
The /WINDOW FLUSH_SCROLLBACK option, which I already regret the
naming of, deletes all of the items in your scrollback buffer.
Because the scrollback buffer is used to paint your window, your
window will be cleared when you do this.
*** News 08/10/2005 -- Mangle level "ALL" does not include "UNPRINTABLE"
This was a mistake, and "ALL" should never have included the
UNPRINTABLE mangle level. So if you want to do them both, then
just do ALL,UNPRINTABLE. Although you would never want to do
that, since UNPRINTABLE is more encompassing than ALL.
EPIC5-0.0.6
*** News 08/08/2005 -- Updated behavior for /DCC GET
Based on a request from larne, the following syntaxes are now
supported for /DCC GET:
* /DCC GET nick file1 file2 ... fileN /directory
This will download one or more files to /directory.
* /DCC GET nick offered-file not-offered-file
This will do a /DCC RENAME get nick offered-file not-offered-file
and then a /DCC GET not-offered file. You cannot combine this with
the previous syntax.
* /DCC GET nick
Download ALL files that "nick" have offered you. You can combine
this with the first one, (/DCC GET nick /directory) to download
all files offered to a single directory.
*** News 08/06/2005 -- Generalized status bar activity handling
There are three new windowctls, and /window commands to follow
later on. They allow you to control a new status bar expando %E.
This will take a bit of explanation.
Each window has 11 "activity levels". An "activity level" is a
format and a $* value. The activity levels are numbered 0 to 10,
and 0 is special.
Each window has a 'current activity level' which you can set with:
$windowctl(SET <winref> CURRENT_ACTIVITY <number>)
When you set the current activity level to a number 1 to 10, then
the %E status bar expando will replace with that activity level's
format expanded against that activity level's data. The activity
level 0 is not usable, but instead stores default values that are
used if you don't define something else for the activity level.
To set a window's activity level format:
$windowctl(SET <winref> ACTIVITY_FORMAT <number> <string>)
Remember that $'s in <string> need to be doubled, in order to protect
them from being expanded at $windowctl() time. You do not need to
(and you should not) put quotation marks around <string>. If you do
not set an activity format for a given level, then the activity format
you set for level 0 will be used as a default.
To set a window's activity level data:
$windowctl(SET <winref> ACTIVITY_DATA <number> <string>)
This is the value of $* that will be used to expand the activity
format each time epic redraws the status bar. If you do not set
an activity data for a given level, the activity data you set for
level 0 will be used as a default.
So to put this all together, if you set the current_activity value
to 0, then the %E expando will expand to nothing. If you set the
current_activity level to any value 1 to 10, then it will expand to
the "activity_format" value, which is expanded on the fly using the
"activity_data" value as $*. If you use a current_activity level that
is missing an activity_format or activity_data value, the values you
set for level 0 are used as defaults.
Example:
$windowctl(SET 1 ACTIVITY_FORMAT 1 ^C3$$*)
$windowctl(SET 1 ACTIVITY_FORMAT 2 ^C4$$*)
$windowctl(SET 1 ACTIVITY_FORMAT 3 ^C7$$notifywindows())
$windowctl(SET 1 ACTIVITY_FORMAT 4 ^C12$$*)
$windowctl(SET 1 ACTIVITY_DATA 0 booya)
$windowctl(SET 1 ACTIVITY_DATA 2 hazmat)
Now if I
$windowctl(SET 1 CURRENT_ACTIVITY 1)
then %E will expand to a green "booya" because the format is
^C$$* and the value of $* is "booya"
(from activity_data 0)
If I then
$windowctl(SET 1 CURRENT_ACTIVITY 2)
then %E will expand to a bold red "hazmat" because the format is
^C4$$* and the value of $* is "hazmat"
(cause I set activity_data 2)
If I then
$windowctl(SET 1 CURRENT_ACTIVITY 3)
then %E will expand to a yellow $notifywindows() that will dynamically
update, because there are two $'s in front of it. It will ignore the
"booya" because it does not reference $*.
This feature is intended to be used to create a %F workalike that
gives you full and utter control over all aspects of how the expando
will show up, since you get 10 levels, plus a default level, and you
get to control which ones use the default and which ones get their
own custom $* and you control the formats -- you control it all.
Have fun!
*** News 08/05/2005 -- New flag to /LASTLOG, /LASTLOG -MANGLE
The /LASTLOG -MANGLE flag takes a mangle description (the thing that
$stripcrap() takes) and mangles each line in the lastlog before
matching against your pattern. THIS IS VERY EXPENSIVE so you should
not do this unless you really want to.
*** News 08/05/2005 -- *** IMPORTANT *** /EXEC -OUT changed
/EXEC -OUT will now output to the window's current target, instead
of to the window's current channel. The current target is $T, and
is the window's current query (if there is one) or the window's
current channel (if there isn't a query).
*** News 08/05/2005 -- Text following unmatched braces/parens/brackets
If an unmatched brace/bracket/paren is found, about 20 chars after
the character will be output in the error message, to help you find
it. Unfortunately I can't give you line numbers yet.
*** News 08/05/2005 -- New server status state, "ERROR"
The "ERROR" status state is used in the following cases:
* DNS lookup failed (DNS -> ERROR -> CLOSED)
* Connect failed (CONNECTING -> ERROR -> CLOSING -> CLOSED)
* Socket write failed (<ANY> -> ERROR -> CLOSING -> CLOSED)
*** News 08/05/2005 -- The script "altchan.bj" is renamed to "altchan" ...
... Because we deleted the old (lame) altchan script.
*** News 08/05/2005 -- New /set, /SET OLD_MATH_PARSER
To use the old math parser, you need to /SET OLD_MATH_PARSER ON.
This is a promoted version of /xdebug old_math, which you should
no longer use, it will no longer work. Please make plans to
migrate away from the old math parser in epic5 scripts.
*** News 08/05/2005 -- New mangle type, "UNPRINTABLE"
You can now mangle "UNPRINTABLE", which closely models the
/SET NO_CONTROL_LOG variable. When you mangle UNPRINTABLE, all
characters that are not printable (isgraph() || isspace()) will
be removed, which includes all of the highlight characters.
*** News 08/05/2005 -- New script 'ison' from jm
Jm has written a new 'ison' script which implements an ison queue,
and acts as the backend for the 'notify' script which he has also
revamped for this release. This notify script will soon take over
the notify duties for epic, so it'd be a good thing to test it
before the builtin notify goes away...
*** News 08/05/2005 -- New operators, === and !==
The new math parser now supports two new operators, which do case
sensitive string comparisons. === returns true if the two strings
are the same, and !== returns true if the two strings are not the
same.
*** News 08/05/2005 -- *** IMPORTANT *** Case insensitive changes
All case insensitive string comparisons should now be handled in
the CASEMAPPING=ascii sense. This means '{' and '[' are not equal,
and | and ~ and ] and } are not equal.
*** News 08/05/2005 -- 005 CASEMAPPING value now handled (sort of)
Some networks use CASEMAPPING=ascii, which means that the characters
{|} are not the same as [~] as they are when CASEMAPPING=rfc1459.
So in order to keep track of nicks correctly on the former servers,
we now track CASEMAPPING and use it as best we can.
*** News 08/05/2005 -- Flexible on patterns can match against themselves
When you do /ON TYPE '<pattern>', the value of $* in the pattern is
the $* of the ON, so you can essentially do self-references. For
example, this now works...
/on general_privmsg '% $0 *' {
... you sent a message to yourself ...
}
*** News 08/05/2005 -- Can set NOTIFY_NAME via $windowctl()
You can $windowctl(SET <refnum> NOTIFY_NAME <stuff>) now, instead
of having to battle with quoting hell with /window notify_name "..."
*** News 07/27/2005 -- Extended $userhost() behaviour.
Given a channel name in place of a nick, $userhost() will return the
unknown userhost as it did previously, but as a side effect, it will
attempt to resolve the remaining list of nicks in the given channel
only. This is a somewhat esoteric feature which should only be useful
for people who use the $serverctl() maxcache feature.
*** News 07/27/2005 -- New function $shiftbrace().
Given a variable name, $shiftbrace() will remove the braced expression
at the beginning of the variables value and return it. This is a
somewhat experimental scripting feature.
/assign qwer {asdf zxcv} {zxcv asdf qwer}
/eval echo $shiftbrace(qwer) => asdf zxcv
/eval echo $shiftbrace(qwer) => zxcv asdf qwer
*** News 06/21/2005 -- Many scripts desupported
Many scripts that shipped with epic4 are now unsupported in epic5.
They will always be available at
ftp://ftp.epicsol.org/pub/epic/old-scripts/epic5-old-scripts.zip
but they won't be supported for use with epic5, unless someone
makes a motion to re-support them. Here are the scripts:
alias altchan autokick autoop
away basical columns dcc_spacefix
dcc_timeout deban dig dns
edit efnext environment events
events.hop fake-dcc fe fe.pf
genalias hybrid6 imap ip-to-int
ircprimer keybinds killpath kpstat
langtrans list ls meta
mkpdir more mudirc netsplit.env
newformat nicks old-dcc prefix
recursion repeat scandir sdiff
silent sound starutils stat
status_lag tabkey.th tabkey tc
time tls vi-binds webster
window
*** News 06/03/2005 -- New script, "newnick" (blackjac)
The "newnick" script, which is loaded automatically by the 'global'
script [and which you need to load from your startup script if you
like this functionality] implements the functionality of the old
/SET AUTO_NEW_NICK feature, which has recently been removed.
It exposes four /SETs (default values):
/SET AUTO_NEW_NICK ON
When ON, automaticaly mangle the nickname to ensure that you
can connect to the server without delay.
/SET AUTO_NEW_NICK_CHAR _
Then character to append to your nickname in the mangling
process.
/SET AUTO_NEW_NICK_LENGTH 9
The maximum nickname length that can be mangled.
/SET -AUTO_NEW_NICK_LIST
A list of nicknames to try to use before mangling begins.
*** News 06/03/2005 -- New /TIMER flags, and execution contexts.
[ About timer domains ]
Each timer now belongs to one of three domains:
1) Server timers
2) Window timers
3) General timers
A "server timer" is created when you run /TIMER down-wind from
an /ON caused by a server event. A "window timer" is created
when you run /TIMER at any other time.
[ Forcing a particular type of timer ]
You can manually force a timer to be in a particular domain
with a flag:
/TIMER -SERVER <refnum> Create a server timer
/TIMER -WINDOW <refnum> Create a window timer
/TIMER -GENERAL Create a general timer.
[ When timers go off, they change the current window and server ]
When a timer goes off, if it is a server timer, then it will
switch the default server to its server, and switch the current
window to that server's current window. If the timer is a window
timer, it switches the current window to its window, and switches
the current server to that window's server. If the timer is a
general timer, it leaves the current window alone, and switches
the server to the current window's server.
[ When timers go off and their window or server is gone ]
So each server and window timer is "attached" to something, either
a server refnum or a window refnum. If that thing it is attached to
no longer exists when the timer goes off, then the timer has to either
turn into a general timer (and bind to the current server) or simply
not execute at all. If you use the -CANCELABLE flag, the timer is
cancelable and will not execute in this case. The default is to be
non-cancelable and to be treated as a general timer if the window or
server disappears.
*** News 06/03/2005 -- The SIGUSR2 signal now supported
If you send epic the SIGUSR2 signal (kill -USR2 pid) from an
outside shell, EPIC will throw a "system exception" which makes
epic give up on whatever it is doing and fully unrecurse. This
can be used to break out of an infinite loop.
*** News 06/03/2005 -- Several builtin /set's removed, now scripted
The following builtin sets which no longer are used in the base
executable have been formally removed. Many of them have been
implemented by the 'builtins' script.
AUTO_NEW_NICK AUTO_RECONNECT
AUTO_RECONNECT_DELAY AUTO_REJOIN_CONNECT
CONNECT_TIMEOUT HELP_PAGER
HELP_PATH HELP_PROMPT
HELP_WINDOW MAX_RECONNECTS
SWITCH_CHANNEL_ON_PART
*** News 06/02/2005 -- Your startup script is loaded before connecting
Historically ircII has always loaded your startup script (~/.epicrc
or ~/.ircrc) after you successfully completed your first connection
to a server. This was to allow you to do irc commands in your startup
script, such as /JOIN and /NICK and /UMODE, etc. This has now been
changed so your startup script is always loaded at startup before
epic has attempted to connect to a server.
If you need or prefer the prior semantics, please wrap your startup
script in a wrapper like so:
on #^connect -1 * {
... your old ircrc goes here ...
@hookctl(remove -1)
}
What this does is tell epic that you want the body of your script
(the "... your old ircrc goes here ..." part) to be loaded after
you connect to a server, and the @hookctl(remove -1) part makes sure
that the /on deletes itself after it goes off. This exactly effects
the prior behavior.
The -B command line option continues to be supported, but is ignored
since its behavior is now the default.
*** News 06/02/2005 -- Changes to how server descriptions w/o ports get handled
As you may or may not know, epic handles all server descriptions
in a unified way. Server descriptions are the things that look like:
<hostname>:<port>:<password>:<nick>:<group>:<protocol>
The places you can use a server description ("hostname") are:
/SERVER -ADD <hostname>
/SERVER -DELETE <hostname>
/SERVER +<hostname>
/SERVER -<hostname>
/SERVER <hostname>
/DISCONNECT <hostname>
$serverctl(REFNUM <hostname>)
/XEVAL -S <hostname>
/XQUOTE -S <hostname>
/MSG -<hostname>/target
$winchan(#chan <hostname>)
/LOG SERVER <hostname>
/WINDOW SERVER <hostname>
(Every other place in epic requires a server refnum)
This change makes the following backwards-incompatable change:
When you add the first server for a given <hostname>, the port you
use on that server becomes the default port for that <hostname> in
all other places in epic. This is true even if you later add other
servers for <hostname> using other ports!
Example 1:
/server -add irc.host.com:6666
adds a new server, we'll call server refnum 0. So now any place you
use "irc.host.com" (see above) will default to port 6666, and thus
"irc.host.com" will refer to server refnum 0, rather than being an
error. Furthermore, let's say you do:
/server -add irc.host.com:6667
and this becomes server refnum 1. The "irc.host.com" continues to
refer to server 0, even though this server uses port 6667.
Example 2:
/server -add irc.host.com:6666
adds a new server, server refnum 0. Then later on you do
/server irc.host.com
This will connect to server refnum 0, on port 6666, and WILL NOT
create a new server on port 6667 and connect on port 6667!
*** News 06/02/2005 -- /QUIT with no arguments uses per-server quit messages
If you do /QUIT with no arguments, then any per-server quit message
that you have previously set with $serverctl() will be used, and will
not be clobbered by /SET QUIT_MESSAGE. Thus, /SET QUIT_MESSAGE is
only used as a fallback for servers that do not have their own quit
message.
*** News 06/02/2005 -- Preliminary support for nonblocking dns for server
DNS lookups for server connections are now done in a nonblocking way.
This code has not been tested very much so it may be unstable. If you
try to break it, you probably will. Let me know how you did it.
Nonblocking DNS lookups require the use of a "dns helper" process,
which is fork()ed for every lookup. Since you only have a limited
number of processes available to you, this means you shouldn't try
to connect to an unreasonable number of servers concurrently. If you
do manage to do that, you may receive errors.
It should be safe to use /server to cancel a very long nonblocking
dns request.
*** News 06/02/2005 -- /WINDOW SERVER shows server list instead of error
Previously /window server without an argument displayed an error
which isn't terribly friendly. So now it will display the server
list, as if you had done /server without any arguments.
*** News 05/10/2005 -- Nickname rejections handled differently now
When the server rejects your NICK change request after you have
already connected and registered with the server, no further
action will take place because there's nothing that can be done
to stop a nick collision, and nothing that needs to be done if
your new nick is taken.
If the server rejects your NICK during the registration process,
epic will no longer "fudge" your nickname by adding _'s and/or
rotating your nickname, and will no longer "reset" your nickname
by prompting you for a new one and stopping the world until you
give it a new one. Rather, EPIC will throw /on new_nickname and
if you don't use it, will warn you that you need to use /NICK
to choose a new nickname (and /server +<ref> to reconnect if you
ping out)
This also means that /SET AUTO_NEW_NICK is gone (soon to be replaced
by a script, which will implement the old hardcoded behavior), and
handling nickname change failures is fully under control of script!
*** News 05/10/2005 -- New window verb, /WINDOW KILLABLE (default on)
When you /WINDOW KILLABLE OFF, the following changes occur:
* /WINDOW KILL will fail[1] with an error message.
* /WINDOW KILL_ALL_HIDDEN will not kill the window.
* /WINDOW KILL_OTHERS will not kill the window.
* /WINDOW KILLSWAP will fail[1] with an error message.
[1] A failure of *any* /window operation causes any subsequent
operations in the same statement to be discarded, to avoid
accidentally operating on the wrong window. This behavior
is not a special-case.
*** News 05/07/2005 -- New $windowctl(SET <ref> TOPLINE <num> <stuff>)
You can now set a topline literally (without wrangling with the
/window command) this way. The <stuff> is not subject to any
sort of double-quoting shenanigans. BTW, don't get too excited,
I haven't implemented any other $windowctl(SET *) operations,
but this one needed to be done right away.
*** News 05/02/2005 -- New $serverctl(), $serverctl(GET <ref> LOCALPORT)
This returns the port used by the local side of a connection to
the server. If the server is not connected, it returns 0.
*** News 04/28/2005 -- *** IMPORTANT *** /ON LEAVE changed to /ON PART
This is a hard cut-over breaking of backwards compatability.
There is no way to "go back", but there are means you can take
to compensate:
@type = (info(i) < 1224) ? [LEAVE] : [PART]
on $type * { ..... }
This is the last vestige of the senseless substitution of the
non-irc word "LEAVE" for the irc word "PART". Good riddens to it
and may it never return again.
*** News 04/25/2005 -- /SET -CREATE removed (use /ADDSET)
The /set -create command which was first marked for deletion 6 months
ago has now been removed. You can use the /addset alias provided by
the "builtins" script to get the same functionality:
/ADDSET <name> <type> {
... callback ...
}
Don't forget to /SET <name> <value> after you do an /addset to give
it an initial value!
*** News 04/25/2005 -- *** IMPORTANT *** NEW MATH PARSER NOW DEFAULT
The new math parser, which first appeared in 1998 in EPIC4pre2.001,
and has been stable since early 1999, has now finally been made the
default math parser. IT IS POSSIBLE THAT VERY BADLY WRITTEN SCRIPTS
OR SCRIPTS THAT DEPEND ON BUGS IN THE OLD MATH PARSER MAY BREAK AS A
RESULT OF THIS CHANGE!
If you need to continue using the old math parser, you can turn it
back on with:
/xdebug old_math
The old math parser won't be going away any time soon, but it will
never again be the default math parser (barring rioting crowds with
effigies and pitchforks at my door...)
The operation /xdebug new_math is now a no-op, and doing it will have
no effect. YOU CANNOT TURN OFF NEW MATH BY DOING /XDEBUG -NEW_MATH
ANY MORE. YOU MUST DO THE ABOVE /xdebug old_math.
EPIC5-0.0.5
*** News 04/18/2005 -- New $windowctl() stuff
$windowctl(GET <win> DISPLAY_SIZE) to replace $winsize()
$windowctl(GET <win> SCREEN) to replace $winscreen()
$windowctl(GET <win> LINE <num>) to replace $winline()
*** News 04/18/2005 -- /SET -OLD_SERVER_LASTLOG_LEVEL turns that feature off.
If you /set -old_server_lastlog_level, then the window's level is not
changed when it is connected to an existing server. This is probably
a bad idea as it can lead to level duplication, the effects of which
are poorly-defined
*** News 04/18/2005 -- /SET -NEW_SERVER_LASTLOG_LEVEL turns that feature off.
If you /set -new_server_lastlog_level, then the window's level is not
changed when it is connected to a new server. This allows you to
completely opt-out of this feature.
*** News 04/18/2005 -- New $serverctl() stuff
So $serverctl(LAST_SERVER) and $serverctl(FROM_SERVER) have been
added and are used by the builtins script
*** News 04/18/2005 -- Translations now fixed
I apologize to you RUSSIAN_WIN translation users for it being
broken. This release fixes it up, and the fix was back-ported
to EPIC4.
*** News 04/18/2005 -- /SET STATUS_* subformats no longer size limited
Previously, the effective size that /SET STATUS_* values you could
expand to (especially if you have /SET STATUS_DOES_EXPANDOS ON)
as limited on a per-expando basis. This was inconveniently small
for some people who were using lots of characters doing color
markup, etc. So all of those limits have been removed.
*** News 04/18/2005 -- "ERROR --" changed to "INFO --", not used for exec, dcc
The "ERROR --" io messages were alarming people so they were changed
to "INFO --" in this release. Further, EXEC and DCC connections do
not output these diagnostic messages.
*** News 04/18/2005 -- /XECHO -v outputs to current window if it's visible
/XECHO -v has traditionally output to the first visible window (the
first window on the first screen), but it was agreed that it is more
reasonable to output to the current window if that is visible.
*** News 04/18/2005 -- Ways to keep dcc xfers from swamping your cpu...
There are three new ways to keep high speed dcc xfers from swamping
your cpu with unnecessary status bar redraws:
$dccctl(UPDATES_STATUS [0|1])
Turns off (on) whether or not the %D status bar value should be
updated whenever any activity occurs. If you turn this off, then
%D is frozen until you turn it back on. The argument is optional,
and if you don't supply it, it returns the current value. If you
do supply it, the old value is returned.
$dccctl([SET|GET] <refnum> UPDATES_STATUS [0|1])
Turns off (on) whether or not a particular dcc should update the
%D status bar expando when it has activity.
/ON ^DCC_ACTIVITY * #
Hooking (and suppressing) /ON DCC_ACTIVITY will prevent the status
bar from being redrawn as a result of this activity. This won't
stop %D from being updated, but it does stop the status bar from
thrasing uncontrollably.
*** News 04/18/2005 -- The "builtins" script (Blackjac)
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
As noted below in "notes for forward compatability", there is a new
script called "builtins" which is loaded by "global" which is not
loaded by default if you have a startup script. This means it is
really important that you add either /LOAD global or /LOAD builtins
to your ~/.ircrc (or ~/.epicrc) file, or you will notice that the
following features have "disappeared":
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
Commands:
BYE, DATE, EXIT, HOST, IRCHOST, IRCNAME, LEAVE, REALNAME,
SAVE, SIGNOFF, WHOWAS
Functions:
LASTSERVER, SERVERGROUP, SERVERNAME, SERVERNICK, SERVERNUM,
SERVEROURNAME, SERVERTYPE, WINBOUND, WINCURSORLINE, WINLEVEL,
WINLINE, WINNAM, WINNICKLIST, WINNUM, WINQUERY, WINREFS,
WINSCREEN, WINSCROLLBACKSIZE, WINSERV, WINSIZE, WINSTATSIZE,
WINVISIBLE
Sets:
AUTO_REJOIN, AUTO_REJOIN_DELAY, AUTO_UNMARK_AWAY, AUTO_WHOWAS,
BEEP_ON_MSG, COMMAND_MODE, DCC_TIMEOUT, FULL_STATUS_LINE,
NUM_OF_WHOWAS, REVERSE_STATUS_LINE, SHOW_END_OF_MSGS,
SHOW_WHO_HOPCOUNT, VERBOSE_CTCP
Furthermore, the following new commands have been added:
ADDSET, DELSET
which allow you to add a scripted built in /set variable (which
is used extensively by this script).
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
THESE FEATURES NO LONGER EXIST AS HARDCODED EPIC5 FEATURES AND ARE
SOLELY IMPLEMENTED AS SCRIPT FEATURES VIA "builtins"! IT IS NOT A
BUG THAT THEY ARE "MISSING". The way to fix this is to /load global
or /load builtins in your startup script.
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
*** News 04/18/2005 -- New script, "loadformats" (fudd)
This script presents the usable interface to implied on hooks.
See the explanation for implied on hooks below.
/ADDFORMAT <type> [value]
This binds the implied on hook for /ON <type> to a new builtin set
that is called /SET FORMAT_<type>. Remember that implied on hooks
are only used if you don't hook serial number zero!
/DELFORMAT <type>
This removes the implied on hook for /ON <type> and removes the
builtin set /SET FORMAT_<type>.
/DUMPFORMATS
This does a /DELFORMAT for all possible values of <type>. You
will not have any implied on hooks after this is done.
/LOADFORMAT <filename>
Given a file that contains lines that look like this:
<TYPE> <VALUE>
Run /ADDFORMAT <TYPE> <VALUE> for each line.
/SAVEFORMATS <filename>
Save all implied hooks to a file so it can be loaded later with
/LOADFORMAT.
*** News 03/29/2005 -- Just a note about mangling of /on patterns...
In EPIC5, your /ON patterns are no longer "filled out" to the expected
number of words in $*. An example:
EPIC4: /ON PUBLIC "hop" becomes
/ON PUBLIC "hop % *"
EPIC5: /ON PUBLIC "hop" stays as it is.
Note that the EPIC5 version *WILL* *NOT* *EVER* *MATCH* any real
/on public's because it doesn't match any valid $* values.
Why was this change made? Because /on is a general purpose function,
there were problems where some /on's sometimes did not always have
the minimum number of words in $* that they were supposed to, and it
would lead to spaces in odd places, preventing matches.
It was decided that we would leave "filling it out" as a task that
the scripter would need to be responsible for. In the above case,
you can simple solve the problem with:
EPIC5: /ON PUBLIC "hop *"
*** News 03/20/2005 -- History recall moved into a script (Blackjac)
*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
History recall (BACKWARD_HISTORY and FORWARD_HISTORY) are now
scripted features, implemented by
/load history
instead of hardcoded into the client. If you want to be able to
use cursor up and down to recall input history you need to add
/load history
to your ~/.epicrc or ~/.ircrc file. Remember, if you do not put
/load history
in your startup file, then you will find that input history recall
will no longer be available. So just put
/load history
in your startup file, and everything will be cool!
EPIC5-0.0.4
*** News 03/14/2005 -- New option to $line(), $line(<num> -TIME)
You can now provide the "-TIME" option to the $line() function
which returns the timestamp when that line was added to the lastlog.
You can use -TIME together with -LEVEL, and if you do, the level is
always the second-to-last word, and the timestamp is the last word.
You can pass the timestamp to $strftime() for conversion.
Example:
$line(<num> -LEVEL -TIME)
might return
"Some line goes here CRAP 1110000000"
*** News 03/11/2005 -- Implied ON hooks ($hookctl(SET LIST <type> IMPLIED <str>)
A lot of people create a large number of on hooks that look like:
ON ^TYPE * { echo $cparse($format[type]) }
for each TYPE. Since all of these ONs are otherwise identical,
they clutter up the /on list, and managing all of the variables
is a hassle. So there is now a feature to allow you to set an
"implied" on hook that does nothing more than the above.
You can now set a format with
$hookctl(SET LIST <type> IMPLIED <string>)
and if you don't have an /ON <type> *, then epic will do
echo $cparse(<string>)
and suppress the normal output.
You may surround <string> with {}s if you wish, to avoid quoting
hell. Match sure to keep your {}s matched up if you do so.
See the "loadformats" info above for how to practically use this.
You can compile out this feature if it offends you by #undef'ing
IMPLIED_ON_HOOKS in config.h
*** News 03/03/2005 -- New status bar expandos, %{2}+ and %{3}+
These two status exapndos act like %+ and %{1}+ respectively,
except that %{2}+ and %{3}+ will contain only the mode string,
and not any subsequent arguments. Specifically, %{2}+ and %{3}+
don't include the channel's key or user limit (if any).
*** News 03/03/2005 -- New configure options, --with-multiplex
You can choose which multiplex function you want epic to use with
a new configure option, "--with-multiplex". These are the values:
--with-multiplex=select
--with-multiplex=poll
--with-multiplex=freebsd-kqueue
--with-multiplex=pthread
If you don't choose a multiplexer, or you choose one that isn't
supported by your system, it will use select instead. Note that
the kqueue() support is only tested on freebsd-4 and freebsd-5.
If you use --with-multiplex=pthread and --with-ssl together,
and your openssl version was not compiled to be thread-safe, then
you won't be able to use ssl with pthreads (it would crash if
you tried).
*** News 03/03/2005 -- New $hookctl() operation, "GET HOOK <ref> STRING"
The $hookctl(GET HOOK <ref> STRING) operation returns a string that
is suitable for passing to /eval {....} to recreate the hook. This
will be used by scripts that want to "/save" an /on. If you write
these values to a file, you will be able to /load it later.
*** News 03/03/2005 -- Changes to how error messages are displayed
Traditionally, ircII clients have tried to emit one error message
for each error event, putting all of the information into one line.
This has its advantages and disadvantages. The main disadvantage is
that if information is difficult to pass around, it is usually
discarded, and the user may be given a vague or useless error message.
So now error reporting has been revamped in epic. Whenever an error
is actually generated (or first noticed), the information that is
available will be displayed to the screen. Then a failure condition
will be sent up to the higher levels of epic, and each higher level
will give you whatever information it has available. Thus, while an
error message may take up 3 or 4 lines of display, each line has a
little piece of information the others don't, and taken together, you
get the full picture of what happened.
Each error line looks like this:
*** ERROR -- <message>
where "***" is the value of /SET BANNER. These errors are yells,
so if you want to hide them, use /ON YELL.
*** News 02/28/2005 -- !!! IMPORTANT !!! "global" SCRIPT NO LONGER AUTO-LOADED
This is a backwards incompatable change!
A lot of people who run script packs find that the "global" script
which is automatically and unconditionally loaded by epic at startup
is a nuisance which must be eliminated. After much deliberation, it
seems agreeable to most parties that *by default*, the "global" script
will only be loaded for those people who do not have their own startup
script (~/.ircrc or ~/.epicrc)
If you *have* your own startup script, and you *like* having the global
script loaded at startup then you need to make a one-time change to
the top of your startup script:
load global
which will give you old backwards-comaptable behavior. If you do not
make this change, then some /on's, /alias's, and other things that
you may have had access to will disappear until you make this change.
For those of you who do not have your own startup script, you will not
notice any changes.
For those of you who have wished the 'global' script to die a horrible
fiery death, you have got your wish.
*** News 02/28/2005 -- New built in command, /SUBPACKAGE
The /SUBPACKAGE command is probably temporary, so don't get too
attached to it yet. This command should be used in scripts that
are loaded from other scripts, who have used the /PACKAGE command,
to set up a "nested" package name. For example:
File "one":
/PACKAGE one
/LOAD two
/ALIAS frobnitz {echo hello!}
File "two"
/SUBPACKAGE two
/ALIAS oofda {echo hi!}
In this example, "frobnitz" will be in the package "one" and
"oofda" will be in the package "one::two".
*** News 02/28/2005 -- The invite command changed here
This was never documented for some reason until June 2007.
You can now invite people more flexibly:
INVITE #chan nick1 nick2 nick3
or INVITE nick #chan1 #chan2 #chan3
or INVITE nick
and it will just figure out the right thing to do.
*** News 02/04/2005 -- Clarification on /EXEC process output.
Until this time, partial lines of output from /EXEC processes
were silently ignored, could not be redirected, and callbacks
and /on's were not executed in the correct window. Now the
partial-line and full-line handler for /exec processes has been
unified, and they both work like this:
1) Set up the correct server and window
Note: Yes, I am aware this may need further refactoring.
2) Increment the line output
Note: Partial lines now count as a line of output for the
-LIMIT counter.
3) If you used -MSG or -NOTICE or -OUT, send the the text to
the target.
Note: This usually hooks an /ON SEND_* hook (see below)
4) If you used -LINE or -LINEPART or -ERROR or -ERRORPART, call
the appropriate callback
-or-
4a) If you didn't use them, hook the appropriate /ON.
4b) If you didn't hook the /ON, and you aren't redirecting the
output to another target, output it to the screen.
Note that (4b) and (3) work in complement to each other. If you do
/EXEC -MSG nick w
then the output will be handled through /ON SEND_MSG (either from
your own on, or from the default output). If you do not, then the
output will be handled by /ON EXEC.
*** News 02/02/2005 -- New $serverctl() attribute, "PROTOCOL"
$serverctl(GET <refnum> PROTOCOL) now either returns "IRC" or
"IRC-SSL" depending on whether you're doing a regular irc, or an
ssl-enabled irc connection, eh!
*** News 02/02/2005 -- Automatic creation of ALTNAME for servers, %S changes.
When you create a new server (with /server or /server -add or
/window server), the server will automatically be given its first
"altname" (see "Alternate server names" below).
Each server's first altname is constructed as:
* If the server name is an IP address, the whole name,
* Otherwise, the first segment that does not start with "irc".
This is the value you have historically seen at %S on your status
bar. This value is now automatically created as your server's
first altname, and you can change it!
@serverctl(SET <refnum> ALTNAMES <whatever>)
%S, and %{1}S have been changed to use the "first altname" for
the server, whatever you choose that to be.
Please note: If you clear your server's altname list, then %S and
%{1}S will have no choice but to show the server's full name. This
is intentional and not a bug. %{2}S will continue to show your
server's full name all the time.
*** News 01/27/2005 -- New status expando, %{3}S
%{3}S is just like %{2}S, but instead it shows the server's group
instead of the server's name.
*** News 01/26/2005 -- Notes for forward compatability
*** /SET -CREATE DEPRECATED ***
EPIC5-0.0.3 includes /SET -CREATE, but this is deprecated, and will
be removed by EPIC5-0.0.5. It is suggested that you start using
$symbolctl() [see below] in scripts that support EPIC5-0.0.3 and up.
*** THINGS ARE GOING TO BE CHANGING ***
Starting before EPIC5-0.0.5, there will be a signficant shift to try
to script as many /set's and builtin commands as possible. This
stuff is all intended to be put into the 'builtins' script which is
loaded from 'global' (ie, it's automatically loaded). Some of you do
not load 'global' and so by EPIC5-0.0.5, if you do not load builtins,
you will find a lot of features gone. I won't consider this a "bug",
but the natural progression of EPIC5's development...
Builtin commands that will be moved to 'builtins'
/BYE /DATE /EXIT
/HOST /IRCHOST /IRCNAME
/LEAVE /REALNAME
/SIGNOFF
Builtin functions that will be moved to 'builtins'
$serverhost()
Builtin SETs that will be moved to 'builtins'
AUTO_REJOIN AUTO_REJOIN_DELAY AUTO_UNMARK_AWAY
AUTO_WHOWAS NUM_OF_WHOWAS BEEP_ON_MSG
COMMAND_MODE FULL_STATUS_LINE REVERSE_STATUS_LINE
SHOW_CHANNEL_NAMES SHOW_END_OF_MSGS
SHOW_WHO_HOPCOUNT VERBOSE_CTCP
EPIC5-0.0.3
*** News 01/25/2005 -- New built in function, $symbolctl()
Here's the plan. An all-encompasing low-level symbol manipulation
thingee. This interface is not intended to replace $aliasctl(), but
rather to supplement it. No, $aliasctl() will never be removed.
Yes, much of its functionality (but not all) is duplicated here.
$symbolctl(TYPES)
Return all of the types supported in this version of EPIC:
ALIAS ASSIGN BUILTIN_COMMAND
BUILTIN_FUNCTION BUILTIN_EXPANDO BUILTIN_VARIABLE
$symbolctl(PMATCH <type> <pattern>)
Return all symbols of type <type> that match <pattern>. You can
use the special value "*" for <type> to get symbols of all types.
$symbolctl(CREATE <symbol>)
Ensure that <symbol> exists in the global symbol table. When
symbols are first created, they do not contain any actual values,
but rather act as a placeholder in case you want to set any.
You must ensure that a symbol exists before you try to change
its values. CREATEing a symbol that already exists is harmless;
feel free to do it.
$symbolctl(DELETE <symbol>)
$symbolctl(DELETE <symbol> <type>)
Delete all of the values of a particular symbol, or just one type.
Example: $symbolctl(DELETE booya ALIAS) is the same as
/alias -booya
Warning: You can delete built in variables/functions/etc with this!
There's no way to restore them back if you do! Caution!
$symbolctl(CHECK <symbol>)
Inspects <symbol> to see if it has any values left. If there are
no values left for <symbol>, it is removed from the global symbol
table. You must then CREATE it again if you want to use it later.
*** IMPORTANT NOTE ABOUT "LEVELS" ****
In order to "get" or "set" a symbol's values, the symbol needs to exist.
If you try to "get" or "set" a symbol that doesn't exist, $symbolctl()
will return the empty string to tell you that it failed. You need to
use the CREATE operation above to bootstrap a new symbol before using
it.
Now, /STACK PUSH and /STACK POP work by manipulating "levels" in the
symbol table. By rule, <level> == 1 always refers to the "current"
value of a symbol. If you do /STACK PUSH, then the value you pushed
will be copied to <level> == 2. If you /STACK PUSH something else,
that values moves to <level> == 3. So what you can do is use
"GET x LEVELS" to find out how many levels a symbol has, and then use
"GET x <num>" to find out if there is a symbol type that interest you
at that level. IN THIS WAY you can directly manipulate the /stack push
values without having to actually use the /stack command.
In general, <level> is always 1 for everything you want to do, unless
you are intentionally monkeying around with your /stack values.
*** NOW BACK TO YOUR REGULARLY SCHEDULED HELP ***
$symbolctl(GET <symbol> LEVELS)
Return the number of levels of <symbol> that are /STACKed. This
value is always 1 unless you have /STACK PUSHed something.
$symbolctl(GET <symbol> <level>)
Return all of the <type>s that are defined for <symbol> at <level>.
If <level> is 1, it gets the current value(s). If <level> is > 1,
it starts looking at the /STACK PUSHed values.
$symbolctl(GET <symbol> <level> ALIAS VALUE)
$symbolctl(GET <symbol> <level> ALIAS STUB)
$symbolctl(GET <symbol> <level> ALIAS PACKAGE)
$symbolctl(GET <symbol> <level> ALIAS ARGLIST)
Retrieve one of the values for one of your aliases
$symbolctl(GET <symbol> <level> ASSIGN VALUE)
$symbolctl(GET <symbol> <level> ASSIGN STUB)
$symbolctl(GET <symbol> <level> ASSIGN PACKAGE)
Retrieve one of the values for one of your assigns
$symbolctl(GET <symbol> <level> BUILTIN_COMMAND)
$symbolctl(GET <symbol> <level> BUILTIN_FUNCTION)
$symbolctl(GET <symbol> <level> BUILTIN_EXPANDO)
Returns 0 if these types are not in use (ie, if there is not a
built in command), and returns non-zero if there is. If you're
smart, you won't try to do anything with the non-zero value.
$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE TYPE)
$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE DATA)
$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE BUILTIN)
$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE SCRIPT)
$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE FLAGS)
Retrieve information about a /SET.
The "TYPE" is one of "STR", "INT", "BOOL", or "CHAR"
Generally, either "BUILTIN" or "SCRIPT" is set, but not both.
$symbolctl(SET <symbol> <level> ALIAS VALUE <string>)
$symbolctl(SET <symbol> <level> ALIAS STUB <string>)
$symbolctl(SET <symbol> <level> ALIAS PACKAGE <string>)
$symbolctl(SET <symbol> <level> ALIAS ARGLIST <string>)
Change one of the values for one of your aliases. If you omit
the <string>, it will clear the value.
$symbolctl(SET <symbol> <level> ASSIGN VALUE <string>)
$symbolctl(SET <symbol> <level> ASSIGN STUB <string>)
$symbolctl(SET <symbol> <level> ASSIGN PACKAGE <string>)
Change one of the values for one of your assigns. If you omit
the <string>, it will clear the value.
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE)
Create a new user-created /SET with default values (type == BOOL,
data == OFF, script is <empty>.)
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE TYPE <set-type>)
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE DATA <string>)
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE BUILTIN)
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE SCRIPT <code>)
$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE FLAGS)
Change one of the values for one of your /set's. You cannot
change values for system /set's, sorry. Setting the TYPE value
changes the DATA value to a default (<empty> for strings, 0 for
everything else) so always set DATA after setting TYPE.
Yes, you can change the TYPE of a /set after you create it!
It's probably a bad idea to set FLAGS for the present.
*** News 01/13/2005 -- New $logctl() feature, $logctl(CURRENT)
$logctl(CURRENT) can return one of these values:
-1 Nothing is being logged right now
0 Something is being logged to the global log, or to
a window log
>0 Something is being logged to the given log refnum.
You can use this log refnum with $logctl().
*** News 01/11/2005 -- New /ON, /ON NEW_NICKNAME
This allows you to create your own nickname mangler whenever EPIC
is resetting your nickname to register to a server. Remember that
your nickname is (usually) not reset if /SET AUTO_NEW_NICK is ON, so
you need to /SET that to OFF before this can be used.
Each time that your nickname is "reset" (see next entry), the
/ON NEW_NICKNAME hook will be thrown.
$0 - Server whose nickname is being reset
$1 - Your current nickname ("*" if you're unregistered)
$2 - The nickname you tried to change to ("*" if none)
You should somehow use this information to generate a new nickname
and then do a /NICK <newnick> operation. You should avoid trying
to do anything else, particularly asynchronous things like /wait,
because the status of the connection is unknown when this /ON is
thrown (ie, you may not be connected). Just stick to /NICK.
If you do not hook the /ON, or you do not do a /NICK within the
/ON, then epic will prompt you for a new nickname in the way it
has always done (so this change is opt-in and backwards compatable).
*** News 01/11/2005 -- Changes to how nick change errors are handled
Until this point, EPIC sometimes (rather aggressively) forced the
user to provide a new nickname, when it wasn't necessary. This
was called "resetting" the nickname. The variable /SET AUTO_NEW_NICK
existed to try to avoid needlessly annoying the user with requests
for nicknames when a new one could be whipped up.
Well, anyways, this has all been refactored. If you are already
connected to the server, epic will no longer "reset" your nickname
when it recieves one of the many numerics that indicate that your
nickname is not acceptable. "Resets" will only occur when you are
unregistered (when you do not have a nickname yet).
As with before, if you have /SET AUTO_NEW_NICK ON, then your nickname
will never be "reset" unless the nickname mangler is unable to come
up with an alternate nickname for you.
*** News 01/11/2005 -- Change to how /set new_server_lastlog_level works
In EPIC4, when you do /window server, the window that is changing
server has its window level changed to /SET NEW_SERVER_LASTLOG_LEVEL.
This can result in two windows with level ALL if the new server can't
be connected to. Starting with now, this change will not occur until
after we have registered with the server (when we get the 001 numeric).
This means if you do /window new server foo.com, that the new window
will be level NONE until the connection to "foo.com" is successful.
Furthermore, only the "current window" for "foo.com" will be changed.
If you move multiple windows to a new server at the same time, only
one of them is the "current window" and only that window ever has
its window levels changed. The others stay at "NONE".
*** News 01/06/2005 -- Can now set ipv4/ipv6 vhosts separately
The /hostname (/irchost) and -H command line option may now take
two hostnames, separated by a slash. Example:
/hostname foo.bar.com Use "foo.bar.com" as the vhost for
both ipv4 and ipv6
/hostname foo.bar.com/faz.bar.com
Use "foo.bar.com" as the vhost for
ipv4, and "faz.bar.com" as the vhost
for ipv6.
/hostname foo.bar.com/ Use "foo.bar.com" as the vhost for
ipv4 only -- don't change the ipv6
vhost
/hostname /foo.bar.com Use "foo.bar.com" as the vhost for
ipv6 only -- don't change the ipv4
vhost
*** News 01/06/2005 -- New serverctl attr: $serverctl(GET <num> ADDRFAMILY)
The $serverctl(GET <num> ADDRFAMILY) value returns either
ipv4 if the server connection is ipv4
ipv6 if the server connection is ipv6
unix if the server connection is a filename
*** News 01/06/2005 -- Old (undocumented) function: $servports()
There has been a function $servports() around for a very long time,
but it's never been documented. It returns two values, the first
one is the remote port (what you connected to the server with), and
the second one is the local port (which is not always useful).
*** News 01/01/2005 -- Argument lists for hooks, and $fix_arglist() (howl)
$fix_arglist(arglist) returns how argument list arglist will be parsed
by epic.
It is now possible to supply argument lists to hooks, just like
one would do for aliases:
/on hook "*" (a,b,...) {echo $a $b $*;};
They are optional, of course.
/ON lists the argument list as part of its output, and does also include
the hook's userial (unique serial)
*** News 01/01/2005 -- New function: $hookctl() (howl)
This function presents a low-level interface to the /on system
=== ADDING AND REMOVING HOOKS ===
$hookctl(ADD [#][!][']<noise><TYPE> [<serial>] <pattern>
[(<arg list>)] <code>)
Compare this to:
/ON [#]<noise><TYPE> [<serial>] [!]<pattern> [(<arglist>)] <code>
Where [#] is used to indicate a <serial> number should be used,
where [!] is used to indicate that the ON is a "negative" ON
where ['] is used to indicate that the ON is a "flexible" ON
where [<noise>] is one of "?", "^", "-", "+", "%", or nothing.
where [<TYPE>] is one of the ON types (ACTION, MSG, PUBLIC, etc)
where [<serial>] is the ON's serial number (NOT the refnum!)
where [<pattern>] is the ON's wildcard pattern (the "nick") that is
matched against $* each time the ON is checked
where [<code>] is the ircII code that is executed each time the ON
is run.
ADD registers a new /ON and returns the /ON's new <refnum>. This
<refnum> can be used in other $hookctl() operations.
Example: $hookctl(ADD ^MSG * (nick, msg) {echo msg from $nick: $msg})
is the same as
/ON ^MSG * (nick, msg) {echo msg from $nick: $msg}
except it returns the new /on's <refnum> (of course).
$hookctl(REMOVE <refnum>)
Delete the given /ON. If <refnum> is -1, it removes the currently
executing /ON.
=== WORKING WITH THE ONs YOU'VE CREATED ===
-- In these GET HOOK operations, the values in <> are the values that
were originally provided to the ADD operation (or the /ON command)
<Refnum> is always allowed to be -1, and refers to the currently
executing /ON.
$hookctl(GET HOOK <refnum> ARGUMENT_LIST)
Return an /ON's <arglist> if it has one.
$hookctl(GET HOOK <refnum> FLEXIBLE)
Return 1 if /ON was created with ['] (flexible -- <pattern> is
expanded each time the /ON is checked)
Return 0 if not.
$hookctl(GET HOOK <refnum> NICK)
Return an /ON's <pattern>.
$hookctl(GET HOOK <refnum> NOT)
Return 1 if /ON was created with [!] (negative on)
Return 0 if not.
$hookctl(GET HOOK <refnum> NOISE)
$hookctl(GET HOOK <refnum> NOISY)
Return an /ON's <noise>.
$hookctl(GET HOOK <refnum> PACKAGE)
Return an /ON's </package> value.
$hookctl(GET HOOK <refnum> SERIAL)
Return an /ON's <serial>. If one wasn't given, 0 is the default.
$hookctl(GET HOOK <refnum> SKIP)
Return 1 if the /ON is being "skipped"
("skipped" == ignored -- treated as if it had been deleted)
$hookctl(GET HOOK <refnum> STUFF)
Return an /ON's <stuff>
("stuff" == the ircII code when the /ON goes off)
$hookctl(GET HOOK <refnum> TYPE)
Return an /ON's <TYPE>
-- In these SET HOOK operations, if you attempt to change a value so it
clobbers (duplicates) an existing ON's value, then the operation will
either fail, or it will replace the existing ON. I'll have to ask
howl how he handled this.
$hookctl(SET HOOK <refnum> ARGUMENT_LIST)
Clear an /ON's argument list (so it no longer takes one)
$hookctl(SET HOOK <refnum> ARGUMENT_LIST <list>)
Replace an /ON's argument list
$hookctl(SET HOOK <refnum> FLEXIBLE [0|1])
Clear (or set) an /ON's flexible-pattern attribute
$hookctl(SET HOOK <refnum> NICK <pattern>)
Change an /ON's <pattern>. Warning -- You can only have one /ON
per serial number with the exact same <pattern>.
$hookctl(SET HOOK <refnum> NOT [0|1])
Clear (or set) an /ON's "negative on" attribute
$hookctl(SET HOOK <refnum> NOISE <noiseref|noise>)
$hookctl(SET HOOK <refnum> NOISY <noiseref|noise>)
Change an /ON's <noise> value using either a noise-refnum or
the noise's name itsself
Example: $hookctl(SET HOOK 147 NOISE SILENT)
and $hookctl(SET HOOK 147 NOISE 1) do the same thing.
$hookctl(SET HOOK <refnum> PACKAGE <string>)
Change an /ON's </package> value. This is used by /unload.
$hookctl(SET HOOK <refnum> SERIAL <number>)
Change an /ON's <serial> value. Warning -- You can only have one
/ON per serial number with the exact same <pattern>.
$hookctl(SET HOOK <refnum> SKIP [0|1])
Clear (or set) an /ON's skippable attribute. When an /ON is being
"skipped", it cannot ever be executed; it is treated as if it were
deleted.
$hookctl(SET HOOK <refnum> STUFF <ircII code>)
Change the ircII commands executed when an /ON goes off.
=== GETTING INFORMATION ABOUT ON TYPES ===
$hookctl(LIST)
$hookctl(LIST LISTS)
Return all of the valid <TYPE>s
$hookctl(LIST LISTS <pattern>)
Return all of the valie <TYPE>s that match the <pattern>
Ex: $hookctl(LIST LISTS g*) returns "GENERAL_NOTICE GENERAL_PRIVMSG"
$hookctl(LIST POPULATED_LISTS)
Return all of the valid <TYPE>s that have an /ON registered for them.
$hookctl(LIST POPULATED_LISTS <pattern>)
Return all of the valid <TYPE>s that match the <pattern> that have an
/ON registered for them.
$hookctl(LIST HOOKS)
Return all of the registered <refnum>s
$hookctl(LIST HOOKS <pattern>)
Return all registered <refnum>s for <TYPE>s that match <pattern>.
Ex: $hookctl(LIST HOOKS MSG) returns the refnums of your /ON MSG's
$hookctl(FIRST_NAMED_HOOK)
Return the number such that
$word($hookctl(FIRST_NAMED_HOOK) $hookctl(LIST))
returns the first non-numeric /ON type.
$hookctl(NUMBER_OF_LISTS)
$hookctl(COUNT)
$hookctl(COUNT LISTS)
Return the number of items in $hookctl(LIST)
$hookctl(COUNT LISTS <pattern>)
Return the number of items in $hookctl(LIST LISTS <pattern>)
$hookctl(COUNT POPULATED_LISTS)
Return the number of items in $hookctl(LIST POPULATED_LISTS)
$hookctl(COUNT POPULATED_LISTS <pattern>)
Return the number of items in $hookctl(LIST POPULATED_LISTS <pattern>)
$hookctl(COUNT HOOKS)
Return the number of items in $hookctl(LIST HOOKS)
$hookctl(COUNT HOOKS <pattern>)
Return the number of items in $hookctl(LIST HOOKS <pattern>)
$hookctl(GET LIST <TYPE> NAME)
This just returns <TYPE>, since the name of any <TYPE> is itsself.
$hookctl(GET LIST <TYPE> PARAMS)
Return the mininum number of words in $* for any /ON of this type.
Remember that your <pattern> is expected to match a $* that has
AT LEAST this number of words. If your <pattern> doesn't, the /ON
will never go off.
$hookctl(GET LIST <TYPE> MARK)
Return the number of invocations of this /ON type are pending.
For example, the first time an /ON MSG event is thrown, then
$hookctl(GET LIST MSG MARK) is 1. If your /ON does something
funky like a /WAIT and another MSG comes in before your /ON is
finished, then $hookctl(GET LIST MSG MARK) is 2.
$hookctl(GET LIST <TYPE> FLAGS)
This is an internal bitmask value. The only defined bit is 1, which
is used to prevent an /ON from going off recursively. One such ON
is /ON INPUT. If $hookctl(GET LIST INPUT MARK) is 1, then another
/ON INPUT event is thrown, no /ON's will actually be executed; the
ON is considered unhooked. This allows you do perform certain
commands (like /sendline) from within certain /ON's (like /on input)
where without this flag that would result in infinite recursion
(and crash)
=== GETTING INFORMATION ABOUT NOISE TYPES ===
$hookctl(DEFAULT_NOISE_LEVEL)
This always returns "NORMAL" for now. This is the <noisetype> whose
VALUE (see below) is the null character.
$hookctl(NOISE_LEVELS)
This returns all of the <noisetype> values.
Ex: $hookctl(NOISE_LEVELS) returns "SILENT QUIET NORMAL NOISY SYSTEM"
$hookctl(NOISE_LEVELS <pattern>)
This returns all of the <noisetype> values that match <pattern>
Ex: $hookctl(NOISE LEVELS s*) returns "SILENT SYSTEM"
$hookctl(NOISE_LEVEL_NUM)
This returns the highest <noiseref> value.
In the GET NOISE operations, <noisetype> is the name of a noise
flag. This is one of "SILENT", "QUIET", "NORMAL", "NOISY", and
"SYSTEM". <noiseref> is a refnum that uniquely identifies each
of the noise types. The above are numbered 1, 2, 3, 4, and 5
respectively.
$hookctl(GET NOISE <noisetype|noiseref> NAME)
Get the name of the noise type. One of "SILENT", "QUIET",
"NORMAL", "NOISY", or "SYSTEM"
$hookctl(GET NOISE <noisetype|noiseref> DISPLAY)
Returns 0 if the noise type does a /SET DISPLAY OFF while
executing the /ON body.
Returns 1 if /SET DISPLAY is not changed when the /ON goes off.
$hookctl(GET NOISE <noisetype|noiseref> ALERT)
Returns 0 if you are not told when the /ON is executed.
Returns 1 if you are told whenever the /ON is executed.
$hookctl(GET NOISE <noisetype|noiseref> SUPPRESS)
Preface: With most /ON's, if you do not have any /ON's that
are appropriate to run, then some "default" action will
be taken.
Returns 0 if executing the /ON does not cause the "default" action
to be suppressed.
Returns 1 if executing the /ON causes the "default" action to be
suppressed.
$hookctl(GET NOISE <noisetype|noiseref> VALUE) (refnum)
Returns the refnum of the noise type.
Example: $hookctl(GET NOISE SILENT VALUE) returns "1".
$hookctl(GET NOISE <noisetype|noiseref> IDENTIFIER)
Returns the <noise> value to use when you want to use this noise type.
Example: $hookctl(GET NOISE SILENT IDENTIFIER) returns "^".
$hookctl(GET NOISE <noisetype|noiseref> CUSTOM)
This always returns 0 for now.
=== MISCELLANEOUS OPERATIONS ===
$hookctl(EXECUTING_HOOKS)
This returns the refnums of all of the hooks that are currently
pending (executing). Since /ONs work like a LIFO queue, the first
word is the current /ON, and the second word is the /ON that is waiting
for the first one to finish, etc. Obviously you can use this to
operate on an /ON from within itsself whenever it goes off.
$hookctl(HALTCHAIN <refnum>)
$hookctl(DENY_ALL_HOOKS)
$hookctl(DENY_ALL_HOOKS 1)
$hookctl(DENY_ALL_HOOKS 0)
$hookctl(EMPTY_SLOTS)
$hookctl(HOOKLIST_SIZE)
$hookctl(LAST_CREATED_HOOK)
$hookctl(PACKAGE <package> [<type>])
$hookctl(SERIAL <sernum> [<type>])
$hookctl(RETVAL)
$hookctl(RETVAL <value>)
$hookctl(LOOKUP <type> <pattern> <serial>)
$hookctl(MATCH <type> <pattern>)
*** News 01/01/2005 -- New function: $hookctl() (howl)
This new function, $hookctl(), lets the users do pretty much whatever
they
$hookctl() arguments:
ADD <#!'[NOISETYPE]><list> [[#]<serial>] <nick> [(<argument list>)] <stuff>
Argument list not yet implemented for $hookctl()
ADD <#!'[NOISETYPE]><list> [[#]<serial>] <nick> <stuff>
- Creates a new hook. Returns hook id.
COUNT
- See COUNT/LIST
HALTCHAIN <recursive number>
- Will set the haltflag for eventchain. May halt the current chain,
or any chain currently being executed.
Returns 1 on success, 0 otherwise.
DEFAULT_NOISE_LEVEL
- returns the 'default noise level'. It is not currently possible
to change the current noise level, and probably never will be.
DENY_ALL_HOOKS <arguments>
- this sets the deny_all_hooks flag, or gets it's value. If set,
to anything non negative, all hooks will be "ignored", and the
default action of any event will be taken. Similar to a /DUMP ON
but doens't actually remove any hooks.
EMPTY_SLOTS
- will return a list of empty slots in the hook-list.
EXECUTING_HOOKS
- will return a list of the current executing hooks. This is a
'recursive' list, listing the current hook first.
FIRST_NAMED_HOOK
- returns FIRST_NAMED_HOOK
HOOKLIST_SIZE
- will returns HOOKLIST_SIZE
LAST_CREATED_HOOK
- returns the value of LAST_CREATED_HOOK
LIST
- See COUNT/LIST
NOISE_LEVELS <pattern>
- Returns a list of 'noise-types'. If <pattern> is specified only
noise levels matching pattern will be returns.
NOISE_LEVEL_NUM
- Returns NOISE_LEVEL_NUM
NUMBER_OF_LISTS
- Returns NUBER_OF_LISTS
PACKAGE <package> [<list>]
- Returns a list of hooks of the given package. If <list> is
specified, it will return only hooks in list <list>
RETVAL <recursive number> [<new value>]
- If recursve number isn't specified, 0 (the current) is specified.
Will either return the value of retval for the given hook, or
set it.
SERIAL <serial> [<list>]
- Works exactly like PACKAGE.
GET <type> <arg>
- See GET/SET
LOOKUP <list> <nick> [<serial>]
- Returns hook matching given parametres.
MATCH <list> <pattern>
- Returns a list of matching hooks.
REMOVE <hook id>
- Removes the hook with the given hook ID. Returns 1 on success,
0 otherwise.
SET <type> <arg>
- See GET/SET
* GET/SET usage
GET gettype <arguments>
- will return 'gettype'
SET gettype <arguments>
- will set 'gettype' or similar, and return 1 on success. Not all
'gettypes' may be set, and not all gettypes will silently ignore
being set.
It is very important to remember that GET won't ever SET anything(!!!)
Won't, and shouldn't.
* GET/SET types:
HOOK <argument>
- More info on this under GET/SET HOOK
LIST <arguments>
- More info on this under GET/SET LIST
NOISE <argument>
NOISY <argument>
- More info on this under GET/SET NOISE/NOISY
MATCHES <argument>
- More info on this under GET/SET MATCHES
* GET/SET HOOK usage:
GET HOOK <hook id> <prop> <arg>
SET HOOK <hook id> <prop> <arg>
<prop> may be one of the following:
ARGUMENT_LIST
- Returns or sets the argument list, if SET and <arg> is empty,
it will be set to NULL, and therefore not used.
FLEXIBLE
- Returns or sets the value of flexible
NICK
- Sets or gets the hook's nick. The position of the hook will
be changed if needed, and it is not possible to change this
to a "crashing nick"
NOT
- Sets or gets the value of NOT.
NOISE
NOISY
- Sets or returns the value of noisy.
PACKAGE
- Returns or sets the hook's packagename
SERIAL
- Returns or sets the serial for the hook. The hook's position
in the list will be changed if necesarry, and it is not
possible to set the serial to a crashing serial.
SKIP
- Returns or sets the value of skip.
STUFF
- Returns or sets the value of stuff.
TYPE
- Returns or sets the type.
* GET/SET LIST usage:
GET LIST <listname> <prop>
SET LIST <listname> <prop> - not functional
<prop> may be one of the following:
COUNT
- Returns count of hooks
FLAGS
- Returns flags
MARK
- Returns mark
NAME
- Returns name
PARAMETERS
PARAMS
- Returns value of params
* GET/SET NOISE/NOISY usage:
GET NOISE <noisename> <prop>
SET NOISE <noisename> <prop> - not functional
<prop> may be one of the following:
ALERT
- returns value of alert.
CUSTOM
- returns value of custom.
DISPLAY
- returns value of display.
IDENTIFIER
- returns value of identifier.
NAME
- returns name.
SUPPRESS
- returns value of suppress.
VALUE
- returns value of value. d'oh!
* GET/SET MATCHES:
- This function is not ready yet, and will currently RETURN_NULL.
* COUNT/LIST usage:
COUNT / LIST work doing the same, the only difference is that
COUNT will return the count of lists/hooks, while list will return
a list
The following options are permitted:
LISTS <pattern>
- Will either return all lists available, or only the
matching ones.
POPULATED_LISTS <pattern>
- Works _just_ like LISTS, but will only return "populated"
lists
HOOKS <pattern>
- Will either return all the hooks on the system, or all
the hooks in the matching lists
*** News 10/29/2004 -- New /ison features.
To go with the -d and -f switches, the following switches have been
added to exploit the new queueing mechanism:
-n # Prioritise this request.
-s # Send the next ison request now.
-len number # Change the number of nicks per request.
-oncmd {commands} # Run these commands for online users.
-offcmd {commands} # Run these commands for offline users.
The descriptions of these switches are simplistic and a little
inaccurate. Some clarifications follow.
-len will change the maximum length of an ISON request from 500 to the
given number. This number will be used for _all_ requests from then on
including those from the notify system. In practice it may be
necessary in some cases to tune this value downwards to avoid the
server dropping some names off the list when they are all online.
-oncmd and -offcmd will run the given lines of code with $* set to all
the users that a reply indicates are online or offline, respectively.
Note that a single /ison request can generate multiple replies. Also
note, that there is no guarantee that the code will or will not run if
$* is empty.
-n will place the current requests at the head of the queue. This is
useful when many requests are waiting to be sent and it is necessary to
have this one replied to quickly. Note that if the request isn't
actually sent by the time the next -n is used, the newer request will
always get the higher priority.
-s will "kick" the ison system back into action in cases where
something has gone wrong and it has become necessary to use the -f flag
for eg. This is more of a debugging tool. It will not actually cause
more than $serverctl(get $servernum() maxison) requests to be sent.
*** News 10/01/2004 -- New status format, %{3}W
This is a compromise between %W and %{2}W. %W only shows in the
input window when there are split windows, and %{2}W shows in all
split windows. So %{3}W shows in the input window, even if it is
the only visible window (ie, there are no split windows).
*** News 10/01/2004 -- New window option, "toplines"
You may now reserve 0 to 9 lines at the top of every windows to be
removed from the scrollable portion of the window, creating a place
for you to put things like a channel topic, or channel users, or
whatever.
/WINDOW TOPLINES <N>
Reserves and displays <N> lines at the top of the window,
which will not be part of the window's scrollable display.
By default, toplines are blank until you set them with...
/WINDOW TOPLINE <N> "<string>"
Sets the window's <N>th topline to <string>. <N> must be
1 to 9. You should put <string> in double quotes. You can
change toplines even if they aren't visible.
$windowctl(GET <refnum> TOPLINES)
Returns the number of toplines reserved at the top of the
window.
$windowctl(GET <refnum> TOPLINE <n>)
Returns the <n>th topline for the window.
*** News 09/14/2004 -- Added Howls shebang script support.
It is now possible to write epic scripts that run from the shell
command line. Yaaay..! The nature of the epic binary itself made this
a little difficult at the interface level, so a little hackery was
required. The form of the shebang line is this:
#!/path/to/epic -S [command line options] -l
Note that the -l switch must be the last on the line, and -S must be
the first. Also note that at this point in time, -S will only work as
the first part of the first argument. The results of the use of this
switch anywhere else is currently undefined.
*** News 09/14/2004 -- Added some features to the commandqueues script.
The first argument to /1cmd may now have a second number attached, with
a coma. This number if given, will cause any recurrences of the same
command within that number of seconds to reset the last-executed time
_without_ executing the command.
Use of the 0 or 1 argument form of /qcmd will now cause the timer to be
reset to 5 seconds, and if called as a function, the command will be
returned without executing it.
*** News 08/25/2004 -- New target syntax, -<serverdesc>/<target>
You can now send messages to the special message type:
-<serverdesc>/<target>
where <serverdesc> is a server description (see below) and <target>
is obviously a nick or channel on that server. This allows you to
send a message to a nickname on a server other than your current
window's server. For example:
@serverctl(SET 0 ALTNAME booya) (set an altname)
/msg -booya/nick hi there!
Will send the message to "nick" on server 0.
*** News 08/25/2004 -- "Server descriptions"
Anywhere EPIC expects you to give it a server, it now expects a
"server description" which is one of the following (in this order)
1) A number, which is taken as a server refnum
2) An "ourname" of an open server
3) An "itsname" of an open server
4) A "group" of an open server
5) An "alternate name" of an open server
6) An "ourname" of a closed server
7) An "itsname" of a closed server
8) A "group" of a closed server
9) An "alternate name" of a closed server
The server description may be a wildcard! The first server
(starting with server 0) that matches is used.
This means you can do something like this:
@serverctl(SET 0 ALTNAME booya) (set an altname)
/server -0 (disconnect from 0)
/server +booya (reconnect to "booya")
and it will connect to server 0, because server 0 has the alternate
name of "booya"!
*** News 08/25/2004 -- Alternate server names
You may now give a server a list of "alternate names". There is no
limit. You add a new alternate name with:
$serverctl(SET <refnum> ALTNAME <name>)
You can totaly replace the list with:
$serverctl(SET <refnum> ALTNAMES <names>)
<name> and <names> should be space-separated list of words.
You can get the list of alternate names with
$serverctl(GET <refnum> ALTNAMES)
*** News 08/25/2004 -- Aliases now shown with their argument lists
When you do /alias, you now see the argument list along with all
of the other stuff.
*** News 08/25/2004 -- Mangling now supports "ALT_CHAR"
How did this ever get missed?
*** News 08/25/2004 -- New function, $mktime()
Usage: $mktime(year month day hour minute second DST)
The first six arguments are required. Returns -1 on error.
Returns whatever mktime(3) on your system would return, usually
the number of seconds since the epoch represented by the arguments.
*** News 08/25/2004 -- Support for ircnet's "unique id" nicknames
You can now always use your "unique id" as your nickname, and also
the "0" shortcut nickname, on ircnet.
*** News 08/25/2004 -- New status expando, %{1}F
This is just like %F, it displays all of the "notified" windows,
except it uses the window's "notify_name" instead of its refnum.
*** News 08/25/2004 -- New window command, /WINDOW NOTIFY_NAME
If you change the /WINDOW NOTIFY_NAME, and use the %{1}F status
expando, then the notify_name, and not the window's refnum, will
show up. Howl wanted to colorize the refnum up, and this is how
you should do it.
*** News 08/25/2004 -- Support for +I channel mode (ratbox)
Because adm asked me to
*** News 08/25/2004 -- User-created /SETs, /SET -CREATE -- WARNING
*** DEPRECATED ***
You can create your own /set's for now with
/SET -CREATE <name> <type> {<code>}
where <type> is one of BOOL, STR, or INT. <code> is code that
will be run any time the user does /SET <name> <newval>. You can
/SET the value within <code> to override the user's value.
*** WARNING *** This interface is temporary and will go away in
the future. It will be replaced by $symbolctl() which has not
yet been written, so stay tuned for more information!
*** DEPRECATED ***
This feature only existed in EPIC5-0.0.3 and was/will be removed
in EPIC5-0.0.4. Do not use this feature.
*** DEPRECATED ***
*** News 08/25/2004 -- Unification of symbol namespaces
There is now one big table that holds all of the symbol names for
aliases, assigns, built in commands, built in functions, sets, and
inline expandos. You should not notice any changes at all, except
maybe epic runs faster. This was done to pave the path towards
plugins, which will need to be able to add their own commands and
functions on the fly!
*** News 08/25/2004 -- The /IRCNAME and /REALNAME commands removed here...
because they are duplicates of /SET REALNAME. Use the /SET now.
*** News 08/25/2004 -- $stripcrap(ALL) no longer strips "ALL_OFF"...
because the crap-mangler makes liberal use of ALL_OFFs and it is of
no harm to leave them in there, and it does great harm to take them
out. ;-) If you want to remove them, do $stripcrap(ALL,ALL_OFF)
*** News 08/25/2004 -- New script 'builtins' loaded from global
Some things are starting to migrate from hardcoded builtins to
script features. They are not "being removed", their implementation
is just changing. This script will contain backwards compatability
stuff for epic4. You really do need this script! Do 'make install'!
*** News 08/25/2004 -- Automatic command completion removed
You can no longer do /whoi as a replacement for /whois. You'll have
to spell out the command name in full now.
*** News 08/25/2004 -- Using your nickname as a command removed here
You can no longer do /<mynick> as an alias for /me. Just use /me.
*** News 08/25/2004 -- The COMMAND_COMPLETION keybinding removed here
A new script replacement is forthcoming -- stand by!
*** News 08/25/2004 -- New serverctl, $serverctl(GET <refnum> STATUS)
This returns the server's current status, which is described below
in the /on server_status stuff.
*** News 08/25/2004 -- New script, 'slowcat'
This script cats a file to your current target, 2 lines per second
to avoid triggering flood control.
/load slowcat
/slowcat filename
*** News 08/25/2004 -- New status expando, %{2}W
This acts just like %W, but it shows in every window, and not just
the current window.
*** News 08/25/2004 -- New /SET, /SET OLD_SERVER_LASTLOG_LEVEL
When you /WINDOW SERVER to move a window to a server that is already
connected, the window's level will be set to this /set value. This
is important, because of the following situation:
Window 1, server 0, level ALL
Window 2, server 1, level ALL
If you do /window 1 server 1 then you have two servers connected
to server 1 with level "ALL". Who wins? Not you. ;-) This defaults
to NONE, which is probably the only sensible value.
*** News 08/25/2004 -- /WINDOW KILL_ALL_HIDDEN kills your hidden windows.
After you run this, you will be left with only your visible windows.
*** News 08/25/2004 -- /ON TYPE !"PATTERN" acts as an exception.
If you use this syntax, then the default action will occurs whenever
the pattern is matched. This is how ircII's /ON TYPE ^PATTERN works.
For example:
on ^msg * echo msg from $0: $1-
on ^msg !"nick"
In this case, if anyone but nick sends you a msg, it is echoed as
in the first /on. But if nick sends you a message, it will be
displayed in the "default" way by epic, as though you did not have
an on at all.
*** News 08/25/2004 -- It is now always safe to delete ONs from within ONs
Up until now, you needed to /defer the removal of any /ONs from
within other /ONs, or you risked crashing epic. This meant you
could not safely stop an /ON with a higher serial number from
running by deleting it. All of this has been fixed now. You can
delete /ONs without restriction and the change takes place
immediately.
*** News 08/25/2004 -- ONs no longer compile patterns to regexes
This was fraught with peril, so ONs no longer compile their
patterns to regexes, and now we do things like we have always
done with ONs
*** News 08/25/2004 -- New built in function, $regcomp_cs()
This is just like $regcomp(), but it's case sensitive.
*** News 08/25/2004 -- In /ON DCC_RAW "* E *", $3 is the port number
Previously it held the "othername", which wasn't terribly useful.
*** News 08/25/2004 -- /WAIT =<fd> waits for a dcc connection to complete
If you do $connect(), it is nonblocking and returns before the
connection is ready to be used. If you need to wait until the
connection completes, like it did in epic4, do this:
@fd = connect(host port)
wait =$fd
and it's pretty much the same. This wait is of course recursive
(and does not block the client)
EPIC5-0.0.2
*** News 08/25/2004 -- Level names are always plural, except for CRAP
The levels have these names now, and they're gonna stay this way:
CRAP PUBLICS MSGS NOTICES WALLS WALLOPS
OPNOTES SNOTES ACTIONS DCCS CTCPS
INVITES JOINS NICKS TOPICS PARTS QUITS
KICKS MODES USER1 USER2 USER3 USER4
USER5 USER6 USER7 USER8 USER9 USER10
ALL (special) NONE (special)
*** News 08/18/2004 -- Overloadable function aliases.
When an alias name "collides" with a built in function, the built in
function has traditionally been called. This update changes this
behaviour to calling the alias first.
NOTE: This will cause recursive loops in scripts that rely on this
behaviour. To fix this the aliases in question need to be renamed or
rewritten to use the following ::function() feature.
It is possible to call the built in with the :: notation used for
global variables, as in $::function(). $:function() will explicitly
call the alias.
NOTE: Do not use the $::function() and $:function() features just yet,
as they will crash epic if the alias or the built in doesn't exist. It
is safe to use if you are sure they do though.
*** News 08/02/2004 -- New commands for $dccctl().
$dccctl(readables) will return the refnums of DCCs that have data
waiting to be read and $dccctl(get [refnum] readable) will return a 1
or 0 depending on whether the given refnum is readable or not.
Since epic will automatically read data from all unheld DCCs, this
feature is expected to be useful only for DCCs in the "held" state.
*** News 08/02/2004 -- General improvements to the flood detection system.
Flood detection now works for channel PARTS and for ctcp replies, which
is bound to the NOTICES flood.
Also, the first argument from each flood returned from $floodinfo()
when flood_maskuser is set to 1 or 2 is now a valid user@host mask for
the flooder in question, suitable for putting in a ban or kline.
*** News 08/02/2004 -- New argument for /on flood.
The fourth argument ($3) in the flood hook is now the number of repeats
of the flood in question. This makes it easy to deal with particular
kinds of floods in different ways, as they occur. For example:
/on flood "% parts % 5" mode $2 +b *!*@$after(@ $userhost())
/on flood "% ctcps % 5" mode $2 +b *!*@$after(@ $userhost())
/on flood "% % % 50" mode $2 +b *!*@$after(@ $userhost())
*** News 08/02/2004 -- Improvements to $floodinfo().
$floodinfo() will now accept as input the same list of lists it
outputs. The lists themselves don't have to be complete. Any
unspecified arguments will match all records. For example:
$floodinfo("% #chan joins") # Return all join records for #chan.
$floodinfo(*) # This still works.
$floodinfo($floodinfo(*)) # Same output as above.
Feeding $floodinfo() output back into its input is useful for tuning
the flood /sets by seeing which non-flooders are being caught long term
in the system.
The fields are these:
u@h mask that matches the flooder. Defaults to "*".
channel mask. Defaults to "*".
flood type mask. Defaults to "*".
Server number. Defaults to -1, which matches all.
Numeric minimum number of flood hits.
Numeric minimum duration of flood.
Numeric minimum flood rate.
The last three numeric arguments may be negative, in which case, they
specify the _maximum_ values. These fields make it possible to deal
with different kinds of floods in different ways _after_ they occur.
For example, a join flood may be falsely triggered by a net join, but
it is reasonable to expect that if you have join and part flood records
for the same u@h, then it is participating in a join/part flood.
/on flood "% parts % 5" {
if (floodinfo("$userhost() $2 joins $servernum() 5")) {
mode $2 +b *!*@$after(@ $userhost())
}
}
Or alternately:
/on flood "% joins % 5" {
if (floodinfo("$userhost() $2 parts $servernum() 5")) {
mode $2 +b *!*@$after(@ $userhost())
}
}
*** News 08/02/2004 -- Changes to /userhost and notify.
The changes to the ison back end mentioned in the previous entry now
also apply to the userhost back end, along with the caveats relating to
/wait and flush. This applies to the /userhost, /userip and /usrip
commands.
A new option has been added to these commands. /userhost -count
[number] will change the number of items that epic will put into each
USERHOST request. This isn't a particularly significant change since
this number is already tuned to a number that works on all servers.
To change the number of USERHOST requests sent at one time, use
$serverctl(set [servernum] maxuserhost [number]). Set it to 0 to turn
the new behaviour off.
*** News 07/08/2004 -- Changes to /ison and notify.
The back end of the notify system and the /ison command has been
changed to permit only a certain number of ISONs to be sent to a server
at one time. The benefit of this is that it will typically prevent a
large notify list flooding the client off the server.
The down side is that it will cause scripts like $is_on() in script/guh
that use "/wait for ison .." to fail until they have been fixed. The
fix is to put "@ serverctl(set $servernum() maxison 0)" at the top of
any alias that uses it. This will turn the new behaviour off.
The notify system itself will not queue an ISON to be sent if there are
any ISONs waiting to be sent, but the /ison command will.
One final note is that the "waiting to be sent" queue won't be flushed
when the client reconnects to the server or when "/ison -f" is run.
This won't cause any particular damage, but it's not nice and will
probably change soon.
*** News 07/08/2004 -- Userhost updating in NICK changes.
This is relevant to those who use the $serverctl() maxcache feature,
which, if in effect, will prevent a /who message being sent to a
server, and thereby make $userhost() fail for every nick that joined
the channel before the client did.
This patch will grab the userhost information for these users from the
NICK message itself, and help to rebuild the $userhost() database
faster. It also makes it possible to manually get it into the database
by /pretend'ing a NICK message with a userhost obtained from other
sources such as the /userhost command.
*** News 03/19/2004 -- New built in function, $tobase(<base> <num>) [howl]
This function converts <num>, a number in base 10, to base <base>.
For example, $tobase(16 65536) returns "10000"
*** News 03/19/2004 -- New built in function, $strtol(<base> <num>) [howl]
This function converts <num>, a number in base <base> to base 10.
For example, $strtol(16 10000) returns "65536"
*** News 03/19/2004 -- Changes to /WINDOW NOTIFY, /WINDOW NOTIFIED
These two /WINDOW operations now take ON, OFF, or TOGGLE arguments,
instead of taking no arguments and behaving as toggle switches.
If you do not provide an argument, they show you their current
values as the other /WINDOW boolean values do.
*** News 03/19/2004 -- Addition and changes to $windowctl()
$windowctl(GET <refnum> MISCFLAGS) always returns 0, and
$windowctl(GET <refnum> NOTIFY) returns 1 if /window notify is on
$windowctl(GET <refnum> NOTIFIED) returns 1 if /window notified is on.
NOTIFY and NOTIFIED replace MISCFLAGS.
*** News 03/19/2004 -- New key binding, SWITCH_QUERY
Whenever a window has multple nicknames in its nickname list,
and one of those nicknames is active as the window's query, it
is possible to use this binding to switch between all of the
nicks in the nick list, just in the same way you can switch
between channels using SWITCH_CHANNELS. If the window does not
have an active query, this key binding will have no effect, even
if the window has nicks in its nicklist!
*** News 03/19/2004 -- Unification of /WINDOW QUERY and /WINDOW ADD
Historically, when you /WINDOW QUERY (or just /QUERY) <NICK>, then
it would add <NICK> to the window's "NICK LIST". The "NICK LIST"
is a list of nicknames for which output goes to that window, just
like output to channels go to windows. Output to or from a nick
that is not on any window's "nick list" goes to the LEVEL_MSG level.
When you used /WINDOW QUERY <NICK2> to change the query, it would
remove the old query from the nick list, and messages to and from
the original query went back to LEVEL_MSG.
Well, this has been unified somewhat. Now the following rules apply:
1) When you /WINDOW QUERY <NICK>, then <NICK> is added to the
window's nick list.
2) If the window already has a query, then the old query nickname
is NO LONGER REMOVED from the window's nick list. Output to
that nick will continue to go to the window as it had before.
3) When you use /WINDOW QUERY to cancel a query, then the current
query IS STILL REMOVED from the window's nick list, and output
to or from that nick will go to LEVEL_MSGS.
It is no longer possible to have a window query that is not on the
window's nicklist, because the query is selected from the members of
the window's nicklist, rather than being a separate thing.
*** News 03/17/2004 -- Change to how /SET INDENT behaves
Historically, if you have /SET INDENT ON, and the first word of the
first line of output is wider than 1/3 of your screen, then the
second (and subsequent) line(s) of output are NOT INDENTED. This
has been changed so subsequent lines are indented 1/3 of the window's
width. To understand this change, think about how /set indent usually
works, and if it would indent more than 1/3 of your screen, then it
will indent 1/3 instead of not at all.
*** News 03/17/2004 -- New flag to /XECHO , /XECHO -F
If you use the /XECHO -F flag, "hidden window output notification"
will not occur for any hidden windows that receive the output.
*** News 03/16/2004 -- You can now bind the 255 character ()
There has been a problem with the new key binding system that
made it difficult for Russian language speakers to bind the 255
character which is in their alphabet. This should be fixed now.
*** News 03/16/2004 -- Can now join channels simultaneously per window
Previously, if you attempted to join multiple channels in the same
window simultaneously, you were not assured that all of the channels
would go to that window. Now you can be assured of this. This should
make reconnection/rejoin scripts much more sane.
*** News 03/16/2004 -- New built in function, $startupfile()
This expands to the file that the client loaded at startup as your
"startup file". Usually this is ~/.ircrc or ~/.epicrc or whatever
you specified as the IRCRC environment variable or the argument to
-l or -L on the command line.
*** News 03/16/2004 -- Unknown CTCP requests offered via /ON CTCP_REQUEST
It was pointed out that unknown/unhandled CTCP requests were only
being hooked through /on ctcp, so it wasn't possible to use
/on ctcp_request to handle EVERY request. Well, now unhandled CTCPs
are hooked through both /on's just like handled CTCPs are.
*** News 03/16/2004 -- Semantic changes to $connect()
You used to be able to depend on /ON DCC_RAW "% % E %" or
/ON DCC_RAW "% % C" hooking before $connect() returned. Now that
$connect() is nonblocking, YOU CAN NO LONGER DEPEND ON THIS. You
must set up your script to assume that /ON DCC_RAW will be hooked
asynchronously, after at least the next sequence point. Think of
it as being like not being able to depend on /WHOIS returning the
numerics. I'll probably add a way to /wait for a connection in the
future. Stay tuned.
*** News 03/16/2004 -- DCC connections are now nonblocking
All connect()ions for DCC, including /DCC GET, /DCC CHAT, /DCC RESUME
and $connect() are all fully nonblocking. This means all connects
in EPIC are now fully nonblocking! HUZZAH!
*** News 03/15/2004 -- /HELP command now handled by script
The built in /HELP command has been replaced by a script that
was written by howl for our use. Much thanks to him!
*** News 03/14/2004 -- Six new USER lastlog levels
You may now use USER5, USER6, USER7, USER8, USER9, and USER10
as levels with your window, lastlog, flood, and ignore. Just
use /xecho -l USER5 for example to send to your USER5 window.
*** News 01/20/2004 -- kqueue() support
You can uncomment #define USE_FREEBSD_KQUEUE in newio.h if you
want to play around with this experimental feature.
*** News 01/15/2004 -- /WINDOW DISCON and /WINDOW NOSERV now the same
There was a subtle semantic difference between /WINDOW DISCON
and /WINDOW NOSERV that had to do with the window's "last server"
that was used for reconnects. Because the client no longer does
reconnections, this difference is moot. These two commands now
always do the same thing, which is to disassociate the window
with any server. The window becomes "server-less".
*** News 01/15/2004 -- Changes to /SERVER command
/SERVER
Show the server list.
/SERVER -DELETE <refnum|desc>
Remove server <refnum> (or <desc>) from server list.
Fails if you do not give it a refnum or desc.
Fails if server does not exist.
Fails if server is open.
/SERVER -ADD <desc>
Add server <desc> to server list.
Fails if you do not give it a <desc>
/SERVER +<refnum|desc>
If the server's state is "CLOSED", change it to "RECONNECT".
This allows the server to reconnect if windows are pointed to it.
Note: server reconnection is asynchronous
/SERVER -<refnum|desc>
Unconditionally close a server connection
Note: server disconnection is synchronous!
/SERVER +
Switch windows from current server to next server in same group
/SERVER -
Switch windows from current server to previous server in same group
/SERVER <refnum|desc>
Switch windows from current server to another server.
*** News 01/08/2004 -- /ON WIDELIST went away here
This /ON hasn't been hooked in many a year, and here it officially
passed into the void.
*** News 01/07/2004 -- Removal of WINDOW BIND feature
As part of the larger project to decouple windows from channels,
the "window bind" feature has been removed. This means you can
no longer /WINDOW BIND, /WINDOW REBIND, /WINDOW UNBIND, and you
cannot use $windowctl(* BIND_CHANNEL *) or $winbound(). It is
expected that eventually scripts will take over the job of routing
channels to the appropriate windows and EPIC will stay entirely
out of the way.
*** News 01/07/2004 -- New /ON, /ON SERVER_STATUS
This /ON is thrown every time a server changes its "state".
The states are listed below in "Server States" and I won't
go into that again here.
$0 - The server changing state
$1 - The old status (a string, not a number)
$2 - The new status
If you find that you do something particularly onerous in
this /ON and EPIC panics or crashes, try /DEFERing it, and
if that doesn't work either, let me know.
*** News 01/07/2004 -- Removal of NOTE support
I doubt anyone will notice this, and if you do, bummer.
*** News 01/07/2004 -- Server states
Servers now exist in one of several "states" each time it connects
to the server. It moves through each of the states from start to
end, and stays at the end until manually reset by the user (or script)
RECONNECT As soon as a window is attached to the server, the
server should be connected to.
CONNECTING A connection to the server is in progress. The server
is not ready to be used.
REGISTERING We are attempting protocol registration (NICK/USER)
with the server. The server is open, but we cannot
really use it yet.
SYNCING Our registration has been accepted and we're doing
whatever meta-tasks are needed to get the connection
fully active
ACTIVE The connection is fully ready for all use.
EOF An End Of File (EOF) has been detected from the server.
The connection was closed by the server and cannot be
used any longer.
CLOSING The connection to the server is being shut down. If
the previous state was "ACTIVE" then you can still
send something to the server. If the previous state
was "EOF" then it's too late. You cannot stop the
closing of a server.
CLOSED The server is disconnected and cannot be used. The
server (and any windows connected to this server) stay
in this state until the user resets the state to
RECONNECT.
*** News 01/07/2004 -- Channels are not tracked across disconnects
When you are disconnected from a server for *any* reason, EPIC
will not retain knowledge of the channels for the next connection
and will not rejoin them. It is expected that scripts will use
this to their advantage to fully control the semantics you will
have governing "auto-rejoin-on-reconnect".
*** News 01/07/2004 -- Server connections are now brought up asynchronously
When you do /WINDOW SERVER or /SERVER or otherwise change the
server of a window, the server is not immediately connected or
disconnected, and the change will not take effect until the
next time through the event looper. This means that all server
connections are "asychronous" (they don't interrupt the current
flow of the script). This means you most definitely cannot
do /WINDOW SERVER <host> CHANNEL <channel> any more. So please
stop doing that. ;-) Use /ON SERVER_STATUS to join channels.
*** News 01/07/2004 -- /XDEBUG SERVER_CONNECT a lot more interesting
If you want to watch epic work its gory nonblocking connects,
you can turn on this /xdebug and see everything in its glory.
*** News 01/07/2004 -- Nonblocking server connects
EPIC now does all server connections using asynchronous,
nonrecursive, nonblocking connections. And yes, it still
supports multiple protocols and multiple addresses (ie,
"us.undernet.org"), and *yes*, it will try another address if
a server refuses us registration ("You do not have access to
this server").
*** News 01/07/2004 -- EPIC no longer tracks server "dialect" per se
The $version() string now always returns "2.8" since all
servers are nominally 2.8 class (rfc1459) servers, and epic
does not attempt to determine if it's an undernet, ircnet,
efnet, or dalnet server, etc. This is mostly because scripts
can hook /on 004 if they care, and the 005 numeric (ISUPPORT)
is making dependance on the server's version much less important.
*** News 01/07/2004 -- EPIC loads ~/.ircrc (or ~/.epicrc) on 001 now
Traditionally, ircII has loaded your ircrc when it received
the 002 numeric, and traditionally, epic has done it when it
received the 004 numeric. Due to some refactoring in epic,
it is now possible for epic to load your ircrc when it receives
the 001 numeric *and before it hooks /on 001* This means you
shouldn't have to suffer the default epic output for any of
the numerics from the server.
*** News 01/07/2004 -- Usermodes now tracked as strings instead of bits
Before this change, ircII clients had always tracked your user
and channel modes as bits, and the valid (supported) modes were
hardcoded into the client at compile time. With this change,
EPIC will no longer track your modes using bits, but instead
using strings. This means that epic won't need source code
changes to support new modes from your server. You can't do
$serverctl(SET|GET <refnum> UMODES) any more (but the old
"UMODE" still works)
*** News 01/07/2004 -- /ON wildcard patterns now compiled into regexes
*** OBSOLETE ***
At or around this date, EPIC started converting wildcard patterns
used by /ON into extended POSIX regexes and compiling them, and
using the regexes instead of the pattern matcher. In the future,
epic will allow you to specify your own regexes. "Flexible"
/on hooks are still wildcard pattern matched (for now) because
recompiling the pattern every time the /on is thrown is senseless.
*** OBSOLETE ***
This feature was removed (see note above for 08/25/2004)
*** OBSOLETE ***
EPIC5-0.0.1
*** News -- 12/16/2003 -- New levels, KICK, QUIT, and MODE
So just for a canonical list, here are all of the levels supported
by flood, ignore, lastlog, and windows:
CRAP PUBLICS MSGS NOTICES WALLS WALLOPS
OPNOTES SNOTES ACTIONS DCCS CTCPS
INVITES JOINS NICKS TOPICS PARTS QUITS
KICKS MODES USER1 USER2 USER3 USER4
USER5 USER6 USER7 USER8 USER9 USER10
ALL (special) NONE (special)
*** News -- 12/16/2003 -- Unification of ignore, flood, and lastlog levels
Previously, the ignore, flood, and lastlog levels used the same
names, but they had different meanings in each subsystem (ie, CRAP
in flood was different from CRAP in ignore, and CRAP in lastlog).
Now all three subsystems use the same levels, all named the same,
and (more or less) all defined the same. There are some holes in
this conversion cause I didn't check every possible combination.
Report any odd behavior to me so I can fix it.
*** News -- 12/16/2003 -- New noise type for /ON, /ON %TYPE
The /ON %TYPE modifier acts just like /ON ^TYPE, because it
suppresses the default action, but it is unlike /ON ^TYPE
because it does not turn off the display (what /ON ^TYPE
does is it prefixes all the commands in the ON body with
the ^ modifier, which turns off output for that command.)
This new modifer does not prefix each command with ^, so any
commands not so prefixed will generate their normal output.
The idea is you can use this for /on set's
/ON %SET "HOLD_MODE *" {WINDOW HOLD_MODE $*}
*** News -- 12/16/2003 -- Removed /SET BEEP_WHEN_AWAY
This feature can be re-implemented in one line of script:
/ON #MSG 617 * {IF (A) {BEEP}}
*** News -- 12/16/2003 -- Removed /SET BEEP_ON_MSG
The /SET BEEP_ON_MSG feature has been removed because it was only
half-implemented, and even that half didn't work right. Keep an
eye out for a scripted re-implementation of this in the future.
*** News -- 12/16/2003 -- Runtime auto-append-of-$* removed
Historically, the ircII language has allowed you to auto-append
$* onto the end of an alias at runtime by creating an alias that
does not refer to any of the command line arguments. For example,
/alias m msg
behaves at runtime as
/alias m msg $*
but with a performance penalty. This behavior has now been removed
and if you wish to have $* appended to your aliases, you need to
change them. This change would be backwards compatable with epic4.
# End of file
|