### Install available update Source: https://armour.bot/cmd/update Demonstrates the process of downloading and installing the latest available script update. ```bash @Empus | y update install @yolk | starting script upgrade to version: 4.0 (revision: 20221214 -- branch: 4_0) @yolk | script v4.0 (revision: 2022121400) installation tested (runtime: 34 secs -- new config settings: 1) ``` -------------------------------- ### Install Prerequisites Source: https://armour.bot/setup/script Installs the necessary prerequisite packages using the system's package manager. It first checks for 'sudo' and then executes the package installation command. It handles macOS differently to avoid running 'brew' as root. The function checks the return code of the installation command and aborts if it fails. ```shell install_prereq() { check_sudo ohai "Installing prerequisites..." if [[ "${SYSTEM}" != "macOS" ]]; then ohai "sudo ${PKGMGR} ${PKGMGR_ARGS} ${PACKAGES}" sudo ${PKGMGR} ${PKGMGR_ARGS} ${PACKAGES} return_code=$? else # -- macOS: don't run brew as root ohai "${PKGMGR} ${PKGMGR_ARGS} ${PACKAGES}" ${PKGMGR} ${PKGMGR_ARGS} ${PACKAGES} return_code=$? fi if [ ! $return_code -eq 0 ]; then echo ring_bell echo "${tty_red}Error:${tty_reset} failed package install. Please correct and try again." echo abort fi echo ohai "Done!" echo } ``` -------------------------------- ### chanscan Command Example Source: https://armour.bot/cmd/chanscan Example of using the chanscan command and its output. ```bash @Empus | y chanscan @yolk | scanning #newchan... @yolk | done. scanned 3 users (0.003 sec) ``` -------------------------------- ### Install Armour Script Source: https://armour.bot/ Execute this command in your shell to start the interactive installation of the Armour script. ```bash bash -c "$(curl -fsSL https://armour.bot/install.sh)" ``` -------------------------------- ### Test install from a specific branch Source: https://armour.bot/cmd/update Simulates an installation from the '4_0_beta' branch without applying changes. ```bash @Empus | y update install 4_0_beta -t @yolk | starting script upgrade to version: 4.0 (revision: 20221214 -- branch: 4_0_beta) @yolk | script v4.0 (revision: 2022121400) installation tested (runtime: 34 secs -- new config settings: 1) @yolk | info: debug mode enabled, update not actually applied. ``` -------------------------------- ### Execute Existing Eggdrop Installation Flow Source: https://armour.bot/setup/script This function orchestrates the setup process for an existing Eggdrop installation. It calls subsequent functions to handle directory selection, bot naming, Eggdrop configuration, Armour installation, Armour configuration, and starting the bot. ```bash existing_eggdrop() { ask_for_eggdrop_dir ask_for_botname configure_eggdrop install_armour configure_armour start_eggdrop show_success } ``` -------------------------------- ### Prompt for Prerequisite Installation Source: https://armour.bot/setup/script Asks the user if they wish to install prerequisite packages. It displays the command that will be used for installation and handles user input ('Y' or 'N'). If prerequisites are not installed and the user chooses not to install them, it provides an error message and aborts. ```shell ASKED=0 ask_for_prereq() { local input echo ohai "Do you wish to install prerequisite packages and tools? (${tty_green}Y${tty_reset})es or (${tty_green}N${tty_reset})o" echo echo " sudo ${PKGMGR} ${PKGMGR_ARGS} ${PACKAGES}" echo getc input if [[ "${input}" == 'y' ]] then install_prereq elif [[ "${input}" == 'n' ]] then warn "Not installing prerequisite TCL packages and tools. Armour will not run if these are not already installed." if [[ "${ASKED}" -eq 1 ]] then echo ring_bell echo "${tty_red}Error:${tty_reset} You must install the prerequisites before installing Armour. See:" echo " ${tty_underline}https://armour.bot/setup/install/#requirements${tty_reset}" abort fi echo else ring_bell warn "Invalid input, please select (Y)es or (N)o" echo ask_for_prereq fi } ``` -------------------------------- ### Load Database Example Source: https://armour.bot/cmd/load Demonstrates loading the database, showing a confirmation of entries loaded. ```bash @Empus | y load @yolk | loaded 12 whitelist, 27 blacklist, and 4 user entries to memory ``` -------------------------------- ### Armour User Creation Example Source: https://armour.bot/setup/config An example demonstrating the sequence of commands for creating a user, logging in, and changing the password, as seen in a partyline or console interaction. ```irc Empus | inituser Empus Empus yolk | newuser created. please login: /msg yolk login Empus ks&j8%*%2s Empus | login Empus ks&j8%*%2s yolk | login successful. 0 unread notes. Empus | newpass myNewP@$$w0d yolk | password changed. ``` -------------------------------- ### chanlist Command Example Source: https://armour.bot/cmd/chanlist Example of using the chanlist command to view registered channels and access. ```bash @Empus | y chanlist @yolk | [chanlist]: *, #armour, #newchan ``` -------------------------------- ### Login with Username and Password Source: https://armour.bot/cmd/login Example of logging in as user 'Empus' with the password 'myP@ssw0d!'. ```bash Empus | login Empus myP@ssw0d! ``` ```text yolk | login successful. 0 unread notes. ``` -------------------------------- ### Example of newpass Command Execution Source: https://armour.bot/cmd/newpass This example demonstrates a successful execution of the newpass command, showing the user's input and the bot's confirmation. ```bash Empus | newpass newP@ssw0rd! yolk | password changed. ``` -------------------------------- ### Armour Installer Help Source: https://armour.bot/setup Display usage information for the Armour installer script. This script can be used for installation, adding bots, loading Armour, or non-interactive deployment. ```bash empus@armour:~$ ./install.sh -h Armour Installer Usage: ./install.sh [options] -i Install Armour (and optionally, eggdrop) -a Add a new bot to existing Armour install -l Load Armour on an existing eggdrop with Armour already configured -f Deploy an additional Armour bot non-interactively from a deployment file -h, --help Display this message empus@armour:~$ ``` -------------------------------- ### Access Command Example - Basic Source: https://armour.bot/cmd/access An example of checking access without specifying a channel. The output indicates the user and the command's usage. ```bash Empus | access yolk | usage: access ?chan? ``` -------------------------------- ### ASN Lookup Example Source: https://armour.bot/cmd/asn An example of using the 'asn' command with an IP address, showing the expected output format including ASN, description, BGP information, country, registry, allocation date, and a link for more info. ```bash @Empus | y asn 142.250.188.238 @yolk | (ASN) for 142.250.188.238 is 15169 (desc: GOOGLE, US -- bgp: 142.250.188.0/24 -- country: US -- registry: ARIN -- allocation: 2012-05-24 -- info: https://bgp.he.net/AS15169) ``` -------------------------------- ### Start eggdrop Bot Source: https://armour.bot/setup/manual Starts an eggdrop bot using a specified configuration file. Ensure the bot is online and accessible before proceeding with Armour installation. ```bash ./eggdrop -m mybot.conf ``` -------------------------------- ### Install eggdrop Prerequisites on FreeBSD/NetBSD/OpenBSD Source: https://armour.bot/setup/manual Installs necessary development tools and libraries for eggdrop on FreeBSD, NetBSD, and OpenBSD systems. ```bash pkg install curl git tcl tcllib tcltls sqlite3 tcl-sqlite3 oath-toolkit ImageMagick7 ``` -------------------------------- ### Armour Bot Update Command Example Source: https://armour.bot/setup/update3 This command forces an update and installation of Armour script, merging configuration and cleaning up old settings. Monitor the output for confirmation of the upgrade and any new configuration settings or available plugins. ```irc @Empus | c update install -f @yolk | starting script upgrade to version: 4.0 (revision: 2022121400 -- branch: 4_0_beta) @yolk | Armour script v4.0 (revision: 2022121400) installation complete (runtime: 32 secs -- files: 110) @yolk | info: retained 47 non-default settings -- check 1 new config setting (dronebl:key) @yolk | info: found 1 available new RBL (rbl.undernet.org) @yolk | info: found 4 available new plugins (tell, smsbot, push, email) <-- | yolk (armour@armour.bot) has quit (Quit: Loading Armour v4.0 (revision: 2022121400)) --> | yolk (armour@armour.bot) has joined #armour ``` -------------------------------- ### Channel Response Example Source: https://armour.bot/cmd/add Demonstrates the channel response when a text whitelist entry is triggered. ```bash @Empus | who likes pepsi anyway? @yolk | Coke is better ``` -------------------------------- ### Voice Myself Example Source: https://armour.bot/cmd/voice Demonstrates how to use the voice command to grant voice privileges to yourself. ```irc @Empus | y voice -- | Mode #newchan [+v Empus] by yolk ``` -------------------------------- ### View current mode Source: https://armour.bot/cmd/mode This example shows how to query the current mode setting for a channel. The bot responds with the current mode. ```irc @Empus | y mode @yolk | mode is: on ``` -------------------------------- ### Country Command Example Source: https://armour.bot/cmd/country Example of using the country command with an IP address and the expected output format, including ASN and network details. ```bash @Empus | y country 142.250.188.238 @yolk | (country) for 142.250.188.238 is US (asn: 15169 -- desc: GOOGLE, US -- bgp: 142.250.188.0/24 -- registry: ARIN -- allocation: 2012-05-24 -- info: https://bgp.he.net/AS15169) ``` -------------------------------- ### Restart Bot with Custom Reason Source: https://armour.bot/cmd/restart This example demonstrates restarting the bot with a custom reason, 'performing an upgrade'. The reason will be included in the quit message. ```bash Empus | y restart performing an upgrade <-- | yolk (armour@armour.bot) has quit (Quit: performing an upgrade) --> | yolk (armour@armour.bot) has joined #armour ``` -------------------------------- ### Install eggdrop Prerequisites on Ubuntu/Debian Source: https://armour.bot/setup/manual Installs necessary development tools and libraries for eggdrop on Ubuntu/Debian systems. ```bash apt-get install -y gcc make curl git tcl tcl-dev tcllib tcl-tls sqlite3 libsqlite3-tcl oathtool imagemagick ``` -------------------------------- ### Voice Multiple Users Example Source: https://armour.bot/cmd/voice Illustrates how to voice multiple users simultaneously by listing their nicknames. ```irc @Empus | y voice MrBob MsJane -- | Mode #newchan [+vv MrBob MsJane] by yolk ``` -------------------------------- ### Install eggdrop Prerequisites on CentOS Source: https://armour.bot/setup/manual Installs necessary development tools and libraries for eggdrop on CentOS systems. ```bash yum install -y gcc epel-release curl git tcl tcl-devel tcltls sqlite-devel oathtool ImageMagick ``` -------------------------------- ### Voice a Single User Example Source: https://armour.bot/cmd/voice Shows how to voice a specific user by providing their nickname. ```irc @Empus | y voice MrBob -- | Mode #newchan [+v MrBob] by yolk ``` -------------------------------- ### Install oathtool Source: https://armour.bot/setup/script Installs oathtool for 2FA (TOTP) authentication with network services. Supports different package managers based on the system. ```shell # -- use sudo ohai "sudo $PKGMGR $PKGMGR_ARGS $PKG_OATHTOOL" sudo $PKGMGR $PKGMGR_ARGS $PKG_OATHTOOL return_code=$? ``` ```shell # -- macOS: do not run brew via sudo ohai "$PKGMGR $PKGMGR_ARGS $PKG_OATHTOOL" $PKGMGR $PKGMGR_ARGS $PKG_OATHTOOL return_code=$? ``` -------------------------------- ### Install ImageMagick Source: https://armour.bot/setup/script Installs ImageMagick for text overlay on DALL-E images. Supports different package managers based on the system. ```shell # -- use sudo ohai "sudo $PKGMGR $PKGMGR_ARGS $PKG_IMAGEMAGICK" sudo $PKGMGR $PKGMGR_ARGS $PKG_IMAGEMAGICK return_code=$? ``` ```shell # -- macOS: do not run brew via sudo ohai "$PKGMGR $PKGMGR_ARGS $PKG_IMAGEMAGICK" $PKGMGR $PKGMGR_ARGS $PKG_IMAGEMAGICK return_code=$? ``` -------------------------------- ### Remove User Example Source: https://armour.bot/cmd/remuser Demonstrates how to remove a user from a specific channel. The output confirms the user removal and the channel. ```bash @Empus | y remuser MrBob @yolk | removed user MrBob (chan: #newchan -- level: 450) ``` -------------------------------- ### Scan by nick and find matching entries Source: https://armour.bot/cmd/scan This example shows how to scan for entries by matching a nickname. It returns the number of results and the runtime. ```text @Empus | y scan empfoo @yolk | list match: whitelist user: * (id: 82 chan: #newchan action: accept hits: 0 flags: silent added: 0 days, 17:42:04 ago by: Empus!empus@172.16.164.1 reason: Authenticated user) @yolk | scan complete (results: 1 -- runtime: 0.0 sec) ``` -------------------------------- ### Check for Sudo Installation Source: https://armour.bot/setup/script Verifies if the 'sudo' command is available on the system. If 'sudo' is not found, it displays an error message and aborts the script, as it's required for installing prerequisites. ```shell check_sudo() { if ! command -v sudo >/dev/null then ring_bell echo "${tty_red}Error:${tty_reset} You must install ${tty_bold}sudo${tty_reset} to install prerequisites from this script." abort fi } ``` -------------------------------- ### Version Check - Current Source: https://armour.bot/cmd/version Example output when the Armour script is up-to-date. ```bash @Empus | y version @yolk | version: Armour v4.0 (revision: 2022121300 -- status: current) ``` -------------------------------- ### Access Command Example - User Only Source: https://armour.bot/cmd/access Shows how to check a user's access when only the username is provided. The output includes global access details. ```bash Empus | access empus yolk | chan: * -- user: Empus -- level: 500 -- automode: none yolk | added by: Empus!empus@172.16.164.1 (Empus) -- when: 2 years, 303 days, 21:44:03 ago ``` -------------------------------- ### Scan with a mask and find matching entries Source: https://armour.bot/cmd/scan This example demonstrates scanning for entries matching a specific mask. It shows results from both whitelist and blacklist matches. ```text @Empus | y scan #newchan *!foo@*.isp.com @yolk | list match: whitelist user: *!foo@*.cablemodem.com (id: 82 chan: #newchan action: accept hits: 0 flags: silent added: 0 days, 17:38:42 ago by: Empus!empus@172.16.164.1 reason: Friend) @yolk | list match: blacklist host: *!foo@*.isp.com (id: 94 chan: #newchan action: kickban hits: 0 added: 0 days, 00:11:36 ago by: Empus!empus@172.16.164.1 reason: abuse) @yolk | scan complete (results: 2 -- runtime: 0.007 sec) ``` -------------------------------- ### Display channel information Source: https://armour.bot/cmd/info Example of how to display information about a channel named '#armour'. This includes channel ID, managers, current modes, URL, and description. ```bash @Empus | y info #armour @yolk | chan: #armour (id: 3) -- manager: Empus @yolk | mode: on strictop: off strictvoice: off trakka: off @yolk | url: www.armour.bot @yolk | desc: Armour -- an advanced eggdrop channel protection script for IRC ``` -------------------------------- ### Install Armour using wget Source: https://armour.bot/setup/manual Downloads and extracts the Armour script from a tarball. Ensure you are in the correct directory before running. ```bash cd ~/bots wget https://github.com/empus/armour/archive/refs/tags/armour-v5_0.tar.gz tar xzf armour-v4.0.tar.gz mv armour-v4.0 armour ``` -------------------------------- ### Example: Verify unauthenticated client Source: https://armour.bot/cmd/verify Shows the output when using the verify command for a client named 'BogusJack' who is not authenticated. The response clearly indicates that the client is not authenticated. ```bash @Empus | y verify BogusJack @yolk | BogusJack is not authenticated. ``` -------------------------------- ### View Channel Settings Source: https://armour.bot/cmd/modchan This example shows how to view the current settings for a specific channel using the 'info' command, which displays mode, autotopic, quote, trakka, correct, URL, description, and registration details. ```bash @Empus | y info #armour ``` -------------------------------- ### Basic 'and' command usage Source: https://armour.bot/cmd/and Use this to provide a follow-up question to an existing conversation started with the 'ask' command. ```bash and ``` -------------------------------- ### Add New Armour Bot to Existing Install Source: https://armour.bot/setup/script Use this function to add a new bot to an already installed Armour instance. It guides through configuration steps like bot name, IRC network, and Armour settings. ```shell ADD_BOT=false add_bot() { NEW_EGGDROP=false ADD_BOT=true IRCU=0 ohai "Adding a new ${tty_green}Armour ${ARMOUR_VER}${tty_reset} bot to ${tty_green}existing${tty_reset} installation" echo ask_for_eggdrop_dir ARMOUR_INSTALL_DIR="${EGGDROP_INSTALL_DIR}/armour" if [ ! -d $ARMOUR_INSTALL_DIR ]; then # -- Armour does not exist in this eggdrop install ring_bell echo "${tty_red}Error:${tty_reset} Armour is not installed in this eggdrop directory. Please install via:" echo echo " ${tty_blue}./install.sh -i${tty_reset}" abort fi ohai "Using Armour install directory: ${tty_green}$ARMOUR_INSTALL_DIR${tty_reset}" echo ask_for_botname echo ohai "Copying ${tty_green}${ARMOUR_INSTALL_DIR}/armour.conf.sample${tty_reset} to ${tty_green}${ARMOUR_INSTALL_DIR}/${BOTNAME}.conf${tty_reset} ..." cp ${ARMOUR_INSTALL_DIR}/armour.conf.sample ${ARMOUR_INSTALL_DIR}/${BOTNAME}.conf echo # -- ask for IRC network ask_for_network # -- ask for eggdrop setting values configure_eggdrop # -- ask for Armour setting values configure_armour # -- check for ImageMagick and oathtool optional_support # -- ask whether to start eggdrop (and start if chosen) start_eggdrop # -- complete! echo echo ohai "${tty_green}Installation complete!${tty_reset}" echo show_success exit } ``` -------------------------------- ### Display configuration setting value for a specific channel Source: https://armour.bot/cmd/conf This example demonstrates retrieving configuration settings for a specific channel, 'chan:report', after a previous command that listed auth settings. ```bash @Empus | y conf * chan:report ``` -------------------------------- ### Armour Bot install.sh Script Source: https://armour.bot/setup/script The complete installation script for the Armour Bot project. This script handles all necessary setup and configuration steps. ```shell 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 ``` -------------------------------- ### Scan by IP address and find DNSBL matches Source: https://armour.bot/cmd/scan This example demonstrates scanning an IP address and shows results from DNSBL checks, including the score and info. ```text @Empus | y scan #newchan 217.243.231.202 @yolk | dnsbl match: rbl.ircbl.org desc: IRCBL (ip: 217.243.231.202 score: 1 info: 1) @yolk | scan complete (results: 1 -- runtime: 0.14 sec) ``` -------------------------------- ### Speak Response with Audio File Source: https://armour.bot/cmd/ask When the `speak` plugin is loaded, this shows how to get a spoken response (mp3 file) for a query. ```irc Empus | yolk: speak the meaning of life yolk | Empus: https://yolk.armour.bot/s8H1.mp3 ``` -------------------------------- ### Get Help for a Specific Command Source: https://armour.bot/cmd/help Retrieves detailed information about a specific command, such as 'newuser'. This includes the command's level, usage, and a description of its functionality. ```bash @Empus | y help newuser @yolk | command: newuser -- level: 400 -- usage: newuser [globlevel] @yolk | registers a new user with the bot with the given network account. autologin will be attempted immediately, if they are online and authenticated to network services @yolk | global level is optional otherwise the configured default will be automatically applied. ``` -------------------------------- ### Add Whitelist Entry and Set Flags Source: https://armour.bot/cmd/mod This example demonstrates adding a whitelist entry and then modifying its flags to enable 'onlysecure' and 'silent' behavior. It also shows how to view the entry's details after modification. ```bash @Empus | y add white user * accept Authenticated user @yolk | added user whitelist entry (id: 82 -- value: * -- action: accept -- reason: Authenticated user) ``` ```bash @Empus | y mod 82 onlysecure on @yolk | modified user whitelist entry (chan: #newchan -- id: 82 -- value: * -- onlysecure: on) ``` ```bash @Empus | y mod 82 silent on @yolk | modified user whitelist entry (chan: #newchan -- id: 82 -- value: * -- silent: on) ``` ```bash @Empus | y view 82 @yolk | list match: whitelist user: * (id: 82 chan: #newchan action: accept hits: 0 flags: onlysecure,silent added: 0 days, 00:00:28 ago by: Empus!empus@172.16.164.1 reason: Authenticated user) ``` -------------------------------- ### Compile and Install eggdrop Source: https://armour.bot/setup/manual Downloads, compiles, and installs eggdrop from source. The DEST variable specifies the installation path. ```bash mkdir ~/sources cd ~/sources wget http://ftp.eggheads.org/pub/eggdrop/source/1.9/eggdrop-1.9.5.tar.gz tar xzf eggdrop-1.9.5.tar.gz cd eggdrop-1.9.5 ./configure make make config make install DEST=~/bots cd ~/bots ``` -------------------------------- ### Add Channel Example Source: https://armour.bot/cmd/addchan Adds channel #newchan with MrBob as the channel manager. This registers the channel and sets the specified user as its manager. ```bash @Empus | y addchan #newchan MrBob @yolk | done. registered #newchan (user: MrBob) ``` -------------------------------- ### Check for Git Prerequisite Source: https://armour.bot/setup/script Checks if the 'git' command is available on the system. If not found, it informs the user, sets the ASKED flag, and prompts them to install prerequisites. ```shell # -- check for Git GIT=`command -v git` ohai "GIT: ${GIT}" if [ "${GIT}" == "" ]; then ring_bell echo echo "${tty_red}Error:${tty_reset} You must install ${tty_bold}Git${tty_reset} before installing Armour. See:" echo " ${tty_underline}https://armour.bot/setup/install/#requirements${tty_reset}" ASKED=1 ask_for_prereq fi ``` -------------------------------- ### Armour Installer Command-Line Argument Parsing Source: https://armour.bot/setup/script Parses command-line arguments to determine the action to perform, such as installing, loading, adding, or deploying a bot. Defaults to installation if no arguments are provided. ```bash LAUNCH=0 # -- check usage if [[ $# -gt 0 ]]; then case "$1" in -h | --help) usage ;; -i) install_bot ;; -l) load_armour ;; -a) add_bot ;; -f) deploy_from_file $@ ;; *) warn "Unrecognized option: '$1'" usage 1 ;; esac fi # -- default action to run installer echo install_bot ``` -------------------------------- ### Access Command Example - With Channel Source: https://armour.bot/cmd/access Demonstrates checking access for a user in a specific channel ('#yolk'). The output details the channel, user, access level, automode, and addition information. ```bash Empus | access #yolk empus yolk | chan: * -- user: Empus -- level: 500 -- automode: none yolk | added by: Empus!empus@172.16.164.1 (Empus) -- when: 2 years, 303 days, 21:36:32 ago ``` -------------------------------- ### Enable secure mode Source: https://armour.bot/cmd/mode This example demonstrates enabling 'secure' mode. The bot confirms the mode change and may show changes to channel flags like +mD and voiced users. ```irc @Empus | y mode secure -- | Mode #armour [+mD] by yolk -- | Mode #armour [+vv MrBob MsJane] by yolk @yolk | done. ``` -------------------------------- ### Prompt for Eggdrop Installation Directory Source: https://armour.bot/setup/script Prompts the user to specify the directory for the Eggdrop installation. It includes validation to ensure the directory is suitable for a new installation or if an existing one is being used. ```bash ask_for_eggdrop_dir() { local input ohai "What eggdrop installation directory should be used? [${tty_green}${HOME}/bots${tty_reset}]" echo read input EGGDROP_INSTALL_DIR=${input} if [ "${EGGDROP_INSTALL_DIR}" == "" ]; then EGGDROP_INSTALL_DIR="${HOME}/bots" fi echo ohai "Using eggdrop install directory: ${tty_green}${EGGDROP_INSTALL_DIR}${tty_reset}" if [ -d ${EGGDROP_INSTALL_DIR} ]; then # -- chosen eggdrop install directory exists if [ ${NEW_EGGDROP} == true ]; then # -- new eggdrop install but directory already exists ring_bell echo echo "${tty_red}Error:${tty_reset} new eggdrop install directory ${EGGDROP_INSTALL_DIR} already exists. Please either:" echo " - Delete, move or rename this directory; ${tty_bold}or${tty_reset}" echo " - Run this script for an ${tty_green}existing${tty_reset} eggdrop installation; ${tty_bold}or${tty_reset}" echo " - Choose another eggdrop installation directory." echo ask_for_eggdrop_dir elif [ ! -f "${EGGDROP_INSTALL_DIR}/eggdrop" ]; then # -- install directory exists but eggdrop binary does not ring_bell echo echo "${tty_red}Error:${tty_reset} chosen eggdrop install directory ${EGGDROP_INSTALL_DIR} does not contain ${tty_bold}eggdrop${tty_reset} binary. Please either:" echo " - Choose another eggdrop installation directory; ${tty_bold}or${tty_reset}" echo " - Run this script again after eggdrop is propery installed; ${tty_bold}or${tty_reset}" echo " - Run this script again and select to create a ${tty_green}new${tty_reset} eggdrop install" echo ask_for_eggdrop_dir fi else if [ ${NEW_EGGDROP} == false ]; then # -- existing eggdrop, but directory doesn't exist ring_bell echo echo "${tty_red}Error:${tty_reset} existing eggdrop install directory ${EGGDROP_INSTALL_DIR} doesn't exist. Please either:" echo " - Choose another eggdrop installation directory; ${tty_bold}or${tty_reset}" echo " - Run this script again and select a new eggdrop installation" echo ask_for_eggdrop_dir fi fi echo } ``` -------------------------------- ### Copy Configuration File Source: https://armour.bot/setup/config Copy the sample configuration file to create a new configuration for a specific bot. This is the initial setup step for a new Armour bot instance. ```bash cd ~/bots/armour cp armour.conf.sample mybot.conf ``` -------------------------------- ### Install update from a specific branch Source: https://armour.bot/cmd/update Installs the latest update from the '4_0_beta' branch. ```bash @Empus | y update install 4_0_beta @yolk | starting script upgrade to version: 4.0 (revision: 20221214 -- branch: 4_0_beta) @yolk | script v4.0 (revision: 2022121400) installation tested (runtime: 28 secs -- new config settings: 1) ``` -------------------------------- ### Autologin Example Source: https://armour.bot/cmd/login Networks like Undernet and Quakenet support autologin using an associated network account, eliminating the need for manual password entry. This can be done even in channels. ```bash @Empus | y login ``` ```text - | yolk (armour@arbour.bot): autologin successful. 0 unread notes. ``` -------------------------------- ### Change Channel Topic Example Source: https://armour.bot/cmd/topic Example of changing the topic of a specific channel to 'Breaking some eggs!'. ```text @Empus | y topic Breaking some eggs! -- | yolk has changed topic for #newchan to "Breaking some eggs!" ``` -------------------------------- ### Configure Blacklist Entry for Manual Review Source: https://armour.bot/cmd/mod This example sets up a blacklist entry to require manual review under specific conditions: when the user is in no other channels, the channel is in secure mode, and they lack a resolved ident. It also configures the entry to only kick and not ban. ```bash @Empus | y add black host *!~* kb secure mode: risky user in no channels @yolk | added host blacklist entry (id: 83 -- value: *!~* -- action: kickban -- reason: secure mode: risky user in no channels) ``` ```bash @Empus | y mod 83 manual on @yolk | modified host blacklist entry (chan: #newchan -- id: 83 -- value: *!~* -- manual: on) ``` ```bash @Empus | y mod 83 onlysecure on @yolk | modified host blacklist entry (chan: #newchan -- id: 83 -- value: *!~* -- onlysecure: on) ``` ```bash @Empus | y view 83 @yolk | list match: blacklist host: *!~* (id: 83 chan: #newchan action: kickban hits: 0 flags: manual,onlysecure added: 0 days, 00:00:28 ago by: Empus!empus@172.16.164.1 reason: secure mode: risky user in no channels) ```