matabot.8 (4118B)
1 .Dd $Mdocdate: June 11 2025 $ 2 .Dt MATABOT 8 3 .Os 4 . 5 .Sh NAME 6 .Nm matabot 7 .Nd seek and destroy technomage 8 . 9 .Sh SYNOPSIS 10 .Nm matabot 11 .Op Fl tlv 12 .Op Fl H Ar path 13 .Op Fl b Ar path 14 .Op Fl j Ar join 15 .Op Fl p Ar port 16 .Op Fl h Ar host 17 .Op Fl q Ar port 18 . 19 .Sh DESCRIPTION 20 .Nm 21 starts an IRC bot nicknamed 22 .Sq mata_bot 23 and joins the channel 24 .Sq #testmatabot 25 on localhost (port 6667) with with TLS turned off by default. 26 It's typically started as a daemon via an rc.d script. 27 .Pp 28 The options are as follows: 29 .Bl -tag -width Ds 30 .It Fl H Ar path 31 Load the hellos file from 32 .Ar path 33 .Po default: Pa /usr/local/share/matabot/hellos Pc Ns . 34 .It Fl b Ar path 35 Load the 8ball file from 36 .Ar path 37 .Po default: Pa /usr/local/share/matabot/ball Pc Ns . 38 .It Fl h Ar host 39 Connect to 40 .Ar host 41 (default: localhost). 42 .It Fl j Ar join 43 Join 44 .Ar channel 45 (default: testmatabot). 46 Don't include the leading #. 47 .It Fl l 48 Log errors to stderr. 49 .It Fl p Ar port 50 Connect to 51 .Ar port 52 (default: 6667). 53 .It Fl q Ar path 54 Load the quotes file from 55 .Ar path 56 .Po default: Pa /usr/local/share/matabot/quotes Pc Ns . 57 .It Fl t 58 Turn on TLS. 59 .It Fl v 60 Produce more verbose output (logs all irc events in addition to errors). 61 .El 62 .Sh COMMANDS 63 Bot can do some tricks (non-exhaustive, or it won't be funny): 64 .Bl -tag -width Ds 65 .It s/HaCkERS/wizards/ig 66 He corrects you. 67 .It ...watch?=SOMEID... 68 He reads out youtube video titles for you. 69 (Make sure that the character after the end of 70 .Sq SOMEID 71 is outside the range of valid characters for a youtube video ID, okay?). 72 .It ...http://what.ever/idk#lol... or ...https://what.ever/idk#lol... 73 He reads out website titles or the content-type for you. 74 (Make sure the character after the end of your link is a space) 75 .It mata_bot ...${number1}d${number2}... 76 Ask him to roll ${number1} of ${number2}-sided dice. 77 He's a dungeon master too!! 78 .It mata_bot: *pray* 79 Stay prayed up!! 80 .It MATABOT I LOVE U!!! 81 Love the boy. 82 .It thank you mata_bot!! 83 Thank your future master. 84 .It mata_boi: Who's the good boy?? (or boi, girl, bot, etc.). 85 Praise your future master. 86 .It mata_bot, hru? 87 Ask him how he's doin. 88 .It wassup mata_bot? 89 Ask him what he's up to. 90 .It mata_bot, What doth life? 91 Ask him your burning questions... 92 (He can't hear you if you don't 93 .Sq \&? 94 him :c). 95 .It mata_bot, good boy! (or boi, girl, bot, etc.). 96 Praise your future master. 97 .It hi, mata_boy! 98 Say hi to the boy 99 .It noodle -> matabot: clean your room! 100 (when sent by noodle) issue direct commands to the boy 101 .It .../mata_?bo[ity]/i... 102 Mention him! This boy talks back!? 103 .El 104 .Sh FILES 105 .Bl -tag -width Ds 106 .It Pa /etc/rc.d/matabot 107 OpenBSD rc script for running matabot as a service. 108 .It Pa /usr/local/share/matabot/ball 109 8ball answers file. 110 has 10 answers for positive, negative, and ambigious each; 111 keep the ratio when adding new lines as the answer is chosen randomly from the 112 file. 113 .It Pa /usr/local/share/matabot/hellos 114 Random greetings. 115 .It Pa /usr/local/share/matabot/quotes 116 Random quotes; mostly from the 117 .Lk https://analognowhere.com 118 comic. 119 .El 120 . 121 .Sh EXIT STATUS 122 .Ex 123 . 124 .Sh EXAMPLES 125 Typical invocation 126 .Po use these flags in your Pa /etc/rc.conf.local Pc Ns : 127 .Pp 128 .Dl $ matabot -lth irc.server.tld -j #analognowhere -p 6697 129 .Pp 130 Test on a local ircd with verbose logging turned on. 131 (No TLS): 132 .Pp 133 .Dl $ matabot -lv 134 . 135 .Sh SEE ALSO 136 .Xr perl 1 , 137 .Xr HTTP::Tiny 3p , 138 .Xr IO::Socket 3p , 139 .Xr IO::Socket::SSL 3p 140 . 141 .Sh STANDARDS 142 .Bl -item 143 .It 144 .Rs 145 .%A Jack Allnutt 146 .%A Daniel Oaks 147 .%A Val Lorentz 148 .%T Modern IRC Client Protocol 149 .%I ircdocs 150 .%U https://modern.ircdocs.horse/index.html 151 .Re 152 .It 153 .Rs 154 .%A J. Oikarinen 155 .%A D. Reed 156 .%T Internet Relay Chat Protocol 157 .%I IETF 158 .%R RFC 1459 159 .%U https://tools.ietf.org/html/rfc1459 160 .%D May 1993 161 .Re 162 .It 163 .Rs 164 .%A C. Kalt 165 .%T Internet Relay Chat: Client Protocol 166 .%I IETF 167 .%R RFC 2812 168 .%U https://tools.ietf.org/html/rfc2812 169 .%D April 2000 170 .Re 171 .El 172 . 173 .Sh AUTHORS 174 .An noodle Aq Mt noodle@pastanoggin.com Ns . 175 . 176 .Sh CAVEATS 177 Noodle (noodle) is the only person in chat who can give direct commands to mata_bot. 178 (It's hard-coded. 179 Sorry). 180 .Sh BUGS 181 The bot cannot detach from terminal yet to become a daemon. 182 daemon-izing is handled in the rc service script.