matabot.8 (5045B)
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 d | v 12 .Op Fl r 13 .Op Fl H Ar path 14 .Op Fl b Ar path 15 .Op Fl j Ar join 16 .Op Fl p Ar port 17 .Op Fl h Ar host 18 .Op Fl q Ar port 19 . 20 .Sh DESCRIPTION 21 .Nm 22 starts an IRC bot nicknamed 23 .Sq mata_bot 24 and joins the channel 25 .Sq #testmatabot 26 on localhost (port 6667) with with TLS turned off by default. 27 It's typically started as a daemon via an rc.d script on OpenBSD. 28 .Pp 29 To use the rc.d script and the RSS feature via the 30 .Fl r 31 flag, create a user like so: 32 .Pp 33 .Dl # useradd -m -c 'mata_bot daemon' -d /var/matabot -k /var/empty -s /sbin/nologin _matabot 34 .Pp 35 The options are as follows: 36 .Bl -tag -width Ds 37 .It Fl H Ar path 38 Load the hellos file from 39 .Ar path 40 .Po default: Pa /usr/local/share/matabot/hellos Pc Ns . 41 .It Fl d 42 Produce debugging output (logs irc messages and warnings in addition to errors). 43 .It Fl b Ar path 44 Load the 8ball file from 45 .Ar path 46 .Po default: Pa /usr/local/share/matabot/ball Pc Ns . 47 .It Fl h Ar host 48 Connect to 49 .Ar host 50 (default: localhost). 51 .It Fl j Ar join 52 Join 53 .Ar channel 54 (default: testmatabot). 55 Don't include the leading #. 56 .It Fl p Ar port 57 Connect to 58 .Ar port 59 (default: 6667). 60 .It Fl q Ar path 61 Load the quotes file from 62 .Ar path 63 .Po default: Pa /usr/local/share/matabot/quotes Pc Ns . 64 .It Fl r 65 Turn on RSS news from https://analognowhere.com/feed/rss.xml (updated hourly). 66 .It Fl t 67 Turn on TLS. 68 .It Fl v 69 Produce verbose output (logs warnings in addition to errors). 70 .El 71 .Sh COMMANDS 72 Bot can do some tricks (non-exhaustive, or it won't be funny): 73 .Bl -tag -width Ds 74 .It s/HaCkERS/wizards/ig 75 He corrects you. 76 .It ...watch?=SOMEID... 77 He reads out youtube video titles for you. 78 (Make sure that the character after the end of 79 .Sq SOMEID 80 is outside the range of valid characters for a youtube video ID, okay?). 81 .It ...http://what.ever/idk#lol... or ...https://what.ever/idk#lol... 82 He reads out website titles or the content-type for you. 83 (Make sure the character after the end of your link is a space) 84 .It mata_bot ...${number1}d${number2}... 85 Ask him to roll ${number1} of ${number2}-sided dice. 86 He's a dungeon master too!! 87 .It mata_bot: *pray* 88 Stay prayed up!! 89 .It MATABOT I LOVE U!!! 90 Love the boy. 91 .It thank you, mata_bot!! 92 Thank your future master. 93 .It mata_boi: Who's the good boy?? (or boi, girl, bot, etc.) 94 Praise your future master. 95 .It mata_bot, hru? 96 Ask him how he's doin. 97 .It wassup mata_bot? 98 Ask him what he's up to. 99 .It mata_bot, What doth life? 100 Ask him your burning questions... 101 (He can't hear you if you don't 102 .Sq \&? 103 him :c). 104 .It mata_bot, good boy! (or boi, girl, bot, etc.) 105 Praise your future master. 106 .It mata_boi: wb!! 107 Give him attention. 108 .It hi, mata_boy! 109 Say hi to the boy 110 .It mataboi: tell me more about allah (or god) 111 Ask him to recite verses from abrahamic religious scripture!! 112 .It noodle -> matabot: clean your room! 113 (When sent by noodle) issue direct commands to the boy 114 .It yesterday matabot told me the funniest joke! we're besties!! 115 Mention him! This boy talks back!? 116 .El 117 .Sh FILES 118 .Bl -tag -width Ds 119 .It Pa ./rss 120 RSS last-read link database file. 121 Currently, it tracks only one RSS feed. 122 The file is written to the current working directory; preferably, a user 123 .Sq _matabot 124 should be created as explained above with it's 125 .Xr passwd 5 126 home_dir field set to 127 .Pa /var/matabot 128 and the script ran as that user, as to protect it from accidental change or 129 removal. 130 .It Pa /etc/rc.d/matabot 131 OpenBSD rc script for running matabot as a service. 132 .It Pa /usr/local/share/matabot/ball 133 8ball answers file. 134 has 10 answers for positive, negative, and ambigious each; 135 keep the ratio when adding new lines as the answer is chosen randomly from the 136 file. 137 .It Pa /usr/local/share/matabot/hellos 138 Random greetings. 139 .It Pa /usr/local/share/matabot/quotes 140 Random quotes; mostly from the 141 .Lk https://analognowhere.com 142 comic. 143 .El 144 . 145 .Sh EXIT STATUS 146 .Ex 147 . 148 .Sh EXAMPLES 149 Typical invocation 150 .Po use these flags in your Pa /etc/rc.conf.local Pc Ns : 151 .Pp 152 .Dl $ matabot -r -t -h irc.server.tld -j analognowhere -p 6697 153 .Pp 154 Test on a local ircd with verbose logging turned on. 155 (No TLS): 156 .Pp 157 .Dl $ matabot -d 158 . 159 .Sh SEE ALSO 160 .Xr perl 1 , 161 .Xr HTTP::Tiny 3p , 162 .Xr IO::Socket 3p , 163 .Xr IO::Socket::SSL 3p , 164 .Xr passwd 5 , 165 .Xr useradd 8 166 . 167 .Sh STANDARDS 168 .Bl -item 169 .It 170 .Rs 171 .%A Jack Allnutt 172 .%A Daniel Oaks 173 .%A Val Lorentz 174 .%T Modern IRC Client Protocol 175 .%I ircdocs 176 .%U https://modern.ircdocs.horse/index.html 177 .Re 178 .It 179 .Rs 180 .%A J. Oikarinen 181 .%A D. Reed 182 .%T Internet Relay Chat Protocol 183 .%I IETF 184 .%R RFC 1459 185 .%U https://tools.ietf.org/html/rfc1459 186 .%D May 1993 187 .Re 188 .It 189 .Rs 190 .%A C. Kalt 191 .%T Internet Relay Chat: Client Protocol 192 .%I IETF 193 .%R RFC 2812 194 .%U https://tools.ietf.org/html/rfc2812 195 .%D April 2000 196 .Re 197 .El 198 . 199 .Sh AUTHORS 200 .An noodle Aq Mt noodle@pastanoggin.com Ns . 201 . 202 .Sh CAVEATS 203 Noodle (noodle) is the only person in chat who can give direct commands to mata_bot. 204 (It's hard-coded. 205 Sorry). 206 .Sh BUGS 207 The bot cannot detach from the terminal yet to become a daemon. 208 daemon-izing is handled in the rc service script.