LizardBot/Docs

From LizardWiki, FastLizard4's wiki and website
Jump to: navigation, search



Ambox rewrite orange.svg

Note: Some experience in the PHP programming language - which this bot is written in - is recommended for using this bot. The documentation on this site assumes that you are familiar with at least the basics of PHP (such as declaring variables, how to quote strings, etc.). That said, this is only a recommendation - if you don't know PHP at all, you are welcome to try out LizardBot, and do ask for help on our IRC channel or elsewhere if you need it.

Commands

To run a command, simply say the command either in a channel the bot is in or as a PM to the bot. Commands are displayed in this format:

command [parameters] {optional parameters} (access level required by default to execute) description

NOTE: For the access level, s-trusted inherits *, trusted inherits s-trusted and *, v-trusted inherits trusted, s-trusted, and *, and root inherits v-trusted, trusted, s-trusted, and *. The special ignore group causes the bot to completely ignore messages from people in it.

NOTE: As of v5.3.2.0b, you may choose a custom command trigger. Being the default, @ is used below, but you may customize it for your bot. See Bot Setup for details on setting this.

NOTE: As of v5.4.0.2b, if you pass a : to the bot in a @eval or @exec command, you must replace it with $$ to avoid the bot from screwing up. For example, instead of @eval return self::$test, you should do @eval self$$$$$test.

  • @test (*) Tests the bot to see if it is running
  • @die (root) Orders the bot to disconnect from the current network
  • @say {target} [text] (s-trusted) Says text in the channel. Target necessary when command sent in PM. If sent in channel, sends text to that channel.
  • @do {target} [text] (s-trusted) Performs a /me with text in the channel. Target necessary when command sent in PM. If sent in channel, sends text to that channel.
  • @join [channel] (trusted) Joins the specified channel.
  • @part [channel] (trusted) Parts the specified channel.
  • @notice {target} [text] (trusted) Sends a notice to the target. Target is necessary when command sent in PM, otherwise, target is the channel command sent in.
  • @raw [data] (root) Dumps the raw data to the uplink stream as a raw IRC command. Do not use if you don't know what you're doing!
  • @oper (DEFUNCT) Defunct command. Was useful to me, never bothered to remove it from the bot.
  • @fap {nick} (s-trusted) Ceiling_cat is watching you! If no nick is specified, defaults to the person calling the command. Must be run in the target channel.
  • @kick {channel} [target] [comment] (trusted) Kicks target from channel with comment comment. Channel only useful if command sent in PM, otherwise uses channel the command was called in.
  • @op (trusted) Asks the bot to op itself in the channel it was called in. Bot must be on channel access list.
  • @deop (trusted) Asks the bot to deop itself in the channel it was calld in.
  • @deoper (DEFUNCT) Defunct command. Bot can't oper.
  • @rehash (root) Causes the bot to reparse the configuration file. Use after editing the configuration file.
  • @nick [nick] (root) Causes the bot to change its nick to nick.
  • @info (*) Some help output. Aliased as @help and, if $setEnableAllTriggerHelp is enabled in the configuration file, will listen for the help command on all common bot triggers (such as ! and .).
  • @nyse [symbol] (*) Get the stock quote on the New York Stock Exchange for symbol.
  • @fantasy (*) Shows whether the AI is enabled or not.
  • @fantasy-on (v-trusted) Enables the AI
  • @fantasy-off (v-trusted) Disables the AI
  • @mute (v-trusted) Disables the bot entirely except for the @unmute command. WARNING: This will cause the bot to ping timeout, so only use in emergencies and disable when not needed!
  • @unmute (v-trusted) Reenables the bot after use of @mute
  • [bot nick]: [text] (*) Allows someone to invoke the AI, if enabled.
  • @exec [command string] (root) DANGEROUS! Allows priveleged users to DIRECTLY EXECUTE commands on the server! If you really want it, remember to enable it ($setEnableExec in the config file)
  • @eval [PHP] (root) DANGEROUS! Allows priveleged users to DIRECTLY EXECUTE PHP! If you really want it, remember to enable it ($setEnableEval in the config file)
  • @update (*) Checks for updates
  • @wot [site] (*) Checks the WoT reputation rating for site. site is without the protocol prefix (en.wikipedia.org instead of http://en.wikipedia.org). The reply is in this format:
    The WoT rating for [site] is: Trust: <[rating], [% users that agree] >; Reliability: < ... >; Privacy: < ... >; Child Safety: < ... >
  • @gcalc [operation] (*) Asks google to perform the operation using Google Calculator. Can be a math function (2+2) or a currency conversion (150 USD in Yen)
  • @insult {target} (*) Using the Shakespearean Insult Generator, the bot will throw an insult as The Bard would have at users. If used in PM, it PM's an insult back to you (even if you specify a target). If used in a channel without a target, it messages it prefixed with your nickname in the channel. If used in a channel with a target, it messages the insult back to the channel prefixed with the target's nickname.
  • @status (*) Returns the bot's status. It is in the format below:

I am bot nickname. Software: PHP-LizardBot version (http://fastlizard4.org/wiki/LizardBot) on OS operating system; Uptime: d days, h:m:s; I have been used a total of x times (Commands: n [Of which, m were insult commands], Server pings: p, Recognized CTCPs: y, AI calls: z).

  • @tinyurl [url] (*) Gets a tinyurl for the provided long URL. URL must have the protocol prefix (e.g., http://example.com)
  • @untiny [TinyURL ID] (*) Expands the tinyurl associated with the tinyurl ID. The TinyURL ID is the number sequence following http://tinyurl.com/, for example, http://tinyurl.com/yvdle. The command would be sent like this for the aforementioned TinyURL: @untiny yvdle.
  • @fish (*) Whether or not the fishbot module is enabled. See also: Fishbot.
  • @fish-on (v-trusted) Temporarily enable the fishbot module. See also: Fishbot.
  • @fish-off (v-trusted) Temporarily disable the fishbot module. See also: Fishbot.
  • For the stimuli and commands recognized by the fishbot module, see LizardBot/Fishbot.
  • @remind (*) [target] [message] Asks the bot to remind the person specified in the target parameter with your message. An example of this command might be @remind FastLizard4 that you need to fix your bot! (think of "you" referring to the person who will eventually read the message). See the section below for more info on the reminder system.
  • @bit.ly [action] [arguments] (*) See LizardBot/bit.ly API.

Reminder System

The @remind command (described above) is a part of the reminder system. When a reminder is entered into LizardBot using the @remind command, when it sees the specified "target" join a channel that LizardBot is in (if $setRemindOnJoin is enabled; see LizardBot/Setup), or talk in a channel that LizardBot is in, it will send that user all of the messages in its database that are marked as being destined for that user. It then automatically removes those reminders from its database. Disabling the system from the config file will disable the system entirely, while denying access in the config file will disallow adding from - but not sending to - the restricted users.

Reminders are sent to their "targets" like this: <target>: <original sender> asked me at