BOT-BAS...UGGABLE(1p)

πŸ“¦
version 1.30 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ‘‘ NAME

okay bestie, so bot-basicbot-pluggable β€” it's a standard Bot::BasicBot::Pluggable script. that's the whole name. slay. πŸ’…


✨ VERSION ✨

version 1.30 β€” yes she's got a version number and yes she's serving. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so like. this script is the standard interface for Bot::BasicBot::Pluggable, which is a generic framework for writing pluggable IRC bots in perl. πŸ¦‹

the whole point? you get to administrate a full-fledged bot without writing any perl code. none. zero. not a single line. you're welcome. 🌸


🌈 SYNOPSIS 🌈

bot-basicbot-pluggable --nick MyBot --server irc.perl.org

that's it. that's the vibe. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • --server β€” the server you're connecting to. defaults to localhost, so if you're like "where is my bot going" the answer is probably right here. 🫢
  • --configfile FILE β€” read config options from the FILE you specify. for a whole discussion of possible values and format, go read the CONFIGFILE section below (it's iconic, trust). the default is to read the configfile found by Config::Find. πŸ“‚
  • --logconfig FILE β€” the logging configuration gets read from this specified file. format? please refer to Log::Log4perl::Config, she has the answers. heads up: the parameter loglevel will be ignored if you supply this option. 😀
  • --loglevel LEVEL β€” sets the bot's loglevel to one of the following levels, listed in decreasing order of output: trace, debug, info, warn, error, or fatal. defaults to warn. πŸ”₯
  • --nick NICKNAME β€” the nickname to use. defaults to basicbot, which is honestly a whole aesthetic. πŸ’œ
  • --channel CHANNELNAME β€” the channel to connect to. you can provide this parameter several times (yes, more channels, more fun). you do not have to prefix the channel name with a hash symbol β€” which would have to be escaped in shell anyway β€” because it's automatically added for you. so thoughtful. 😭
  • --password β€” sets the admin password of the Auth module. this also loads the Auth module implicitly, sneaky. ⚠️ but please be warned: this password will probably be seen on any process listing, like ps or top. so like... everyone can see it. hide. πŸ™ˆ
  • --module β€” modules to load. this parameter may be provided several times. you can call --list-modules to get a list of all available modules. if you don't define any module via this option, then Auth and Loader are loaded by default. periodt. ✨
  • --list-modules β€” lists all installed modules and then exits. no bot is started. just a lil peek. πŸ‘€
  • --list-stores β€” lists all installed storage modules and then exits. again, no bot is started. 🧚
  • --store β€” defines which storage module is used to save module settings. the default is Memory, which does not save any settings between sessions β€” but also doesn't leave any files behind and doesn't need any special settings. balanced, as all things should be. βš–οΈ

this option takes a string in the form key=value and can be specified multiple times. the value of the key type defines which storage backend to load; all other parameters are passed to the object constructor as a hash reference.

for example:

./bot --store type=Deep --store file=foo.deep

that command will create a Bot::BasicBot::Pluggable::Store::Deep object and pass "file => 'foo.deep'" to its constructor. πŸ’–

  • --charset β€” the charset to use for the bot. defaults to utf8, but you can use any encoding listed in Encode. here's the tea though: the IRC protocol doesn't define a specific character-set to use, and that presents a big problem, because if you don't use the same as everybody else in the channel you just receive garbage. 😭 garbage!! πŸ—‘οΈ
  • --port β€” the port to connect to on the target host. this defaults to the irc standard port 6667. in most cases you won't need to define this at all. slay. πŸ’…
  • --command-line β€” the bot does not connect to any irc server, but instead waits on stdin for commands from the user. ⚠️ but heads up bestie: this mode won't actually work with a lot of irc-related modules, like ChanOp. πŸ’€

πŸŽ€ CONFIGFILE πŸŽ€

the bot reads a configfile that's either found by Config::Find (usually named ~/.bot-basicbot-pluggable.yaml) or specified on the command line via --configfile at startup. πŸ“„

the file should be a syntactically correct yaml file with a hash as its first-level element. it understands every option listed above, plus the special settings parameter β€” which is a hash where the keys are module names and the value is a hash of configurable module settings. easier to show than to explain, so:

---
server: host
nick: bot
settings:
  Karma:
    self_ignore: 0
store:
  type: Deep
  file: foo.deep

all modules listed under settings are also loaded on startup. 🫢

please remember that you have to escape hash (or pound) signs in YAML:

---
channel:
  - '#botzone'

like. yes. the # is a comment character, she's dramatic, you gotta escape her. πŸ™ˆ


🌸 AUTHOR 🌸

Mario Domgoergen <mdom@cpan.org> β€” thank you king. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

Bot::BasicBot::Pluggable β€” go read it, iykyk. πŸ“š


Copyright 2005-2009 Mario Domgoergen.

this program is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
  • the Artistic License version 2.0.

and that's the whole page bestie!! 🌈

this one's from the User Contributed Perl Documentation corner of the manual, and the footer says perl v5.40.0, dated 2024-08-24. go forth and bot. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from