Assembla home | Assembla project page
 

Welcome to the Phergie Trac site

Phergie is an IRC bot written in PHP 5 with an OO API.

Download an official release or check out the Subversion repository.

DevelopersGuide (work in progress)

Current Development Phase: Alpha
Next Release: 1.1.0
Tentative Release Date: TBA

Links

Main Assembla site for Phergie

Ai, the original inspiration for Phergie

Public Commands

Notes

  • Words enclosed by lower than (<) and greater than (>) signs are "variables" to be replaced by whatever fits their description
  • <Nick> represents a random person, while <Bot> represents the bot name
  • Words/parts enclosed by square brackets ([]) are optional
  • Unless otherwise specified, commands are lowercase and parameters are case-insensitive
  • Optionally, you can prefix the name of the bot when calling commands, for example Bot: beer me will work the same as simply beer me

Plugins

  • Acronym
    • [<Nick>: ]ACRONYM? or [<Nick>: ]A.C.R.O.N.Y.M? returns possible definitions for the given acronym. Acronym must be upper-cased
  • Convert
    • convert <Amount><Unit> in <Unit2> or convert <Amount><Unit> to <Unit2> will convert the amount in the given unit
  • Daddy
    • <Bot>: Who's your daddy? returns a random message to the person saying it
  • Dns
    • [rev]dns <IP> or [rev]dns <Domain> returns the IP associated to a domain or the host associated to the IP
  • Drink
    • coke <Nick> or soda <Nick> sends an energy drink
    • pop <Nick> sends a sucker punch
    • beer <Nick> sends a beer
    • cocktail <Nick> sends a cocktail
    • tea <Nick> sends a tea
      • if <Nick> is "me", it throws to the person requesting it
      • if <Nick> is "you", it throws to the bot
  • Karma
    • <Word>++ or ++<Word> adds 1 to that word's karma
    • <Word>-- or --<Word> removes 1 to that word's karma
    • (<Words>)++ or (<Words>)-- to act on multiple words
    • <Word>++ <Comment>, <Word>-- <Comment> and their multi-word variants save a comment describing the reason of the karma increase/decrease
    • <Word> > <Word2> or <Word> < <Word2> makes the bot check both word's karma values and return a message agreeing or disagreeing with that assertion, if one of the words is *, all or everything, then the other word is compared against a zero value, and it is at the same time incremented/decremented according to what the user asserted
    • karma <Word> displays the karma of a word (no braces needed for multiple words here)
    • Karma changes are restricted, don't try to spam it
  • Lart
    • <Bot>: <Word(s)> is <Definition> assigns a definition to a word (or group of words)
    • <Bot>: <Word> is <Word> links the first word to the definition of the second (creates an alias)
    • <Word> returns the definition of the word
    • <Bot>: lartinfo <Word> returns information about the word if a definition exists for it
    • <Bot>: forget <Word> makes the bot forget that definition and all of the word's aliases
      • Circular references are automatically detected and expunged from the database
      • Lart can be set so only admins can add and remove entries with the lart.admin_only setting in the ini
  • Seen
    • seen <Nick> returns the last action of that person on the active channel
    • heard <Nick> returns the last sentence that person said on the active channel
    • search <Query> returns the 1 (in channel) or 6 (in query) most recent results matching the query
  • Math
    • calc <Equation> or math <Equation> returns the result of the equation
  • Php
    • php <Function> returns the function prototype (arguments and types)
  • Spellcheck
    • <Word> (sp?) or <Word> (sp) return alternative spellings for that word if it was mis-spelled
  • Tld
    • .<TLD extension> returns the description or country matching that TLD (Top Level Domain, i.e. .com)
  • UrbanDictionary
    • ud <Word> returns the first result for that word on Urban Dictionary

Background Services

Plugins

  • Url
    • http://.. returns the page title and a short url if the original one is too long
  • ChuckNorris
    • saying chuck norris (case insensitive) in a sentence makes the bot return a random chuck norris fact
  • Sed
    • s/pattern/replacement/g replaces every instance of pattern in the last thing you said with replacement and returns the results
      • The third slash in the statement is optional, you can simply go s/pattern/replacement where replacement can be empty
      • You can correct other people by prefixing their nick name before the said statement such as User: s/pattern/replacement
      • You can also specify which line back to correct by going s#/pattern/replacement where # is the number of lines back to correct. The default value is 1
      • Various flags are supported s/pattern/replace/<flags> where <flags> can be empty (Match the first instance), g (match every instance), i (Case insensitive matching). Also note that multiple flags can be used at one time

Passive Services

Plugins

  • Altnick
    • adds support for alternate nicks when the primary nick is in use
  • Autojoin
    • automatically instructs the bot to join a given set of channels based on a configuration setting
  • FeedTicker
    • displays new articles from syndicated feeds on the channel
  • Nickserv
    • automatically authenticates with NickServ and handles ghost connection termination and nick recovery
  • Users
    • tracks user mode and presence changes and makes the information available to other plugins
  • Pong
    • replies to the server's ping keep alive requests with pong
  • CTCP
    • replies to Version, Time, Ping, Source, Finger and Uptime CTCP requests
  • Logging
    • Logs all channel activity including messages, mode changes, kicks, parts, ect

Admin Commands

Notes

  • All admin commands should be preceded by <Bot>: , however that can be omitted if you query the bot directly
  • Admin commands are restricted to authorized people and/or channel operators, depending on settings

Plugins

  • Debug
    • mem outputs a memory usage statistics
    • uptime outputs the bots uptime
    • extensions outputs a list of extensions loaded in PHP
    • getversion [<extension>] gets the current version of Phergie by default, or a currently running extension
  • JoinPart
    • join <Channel>[,<Channel>,...] instructs the bot to join that channel
    • part [<Channel>[,<Channel>,...]] [<Reason>] instructs the bot leave the specified channel, or the current one if none or # is specified. Specifying 'all' without the quotes will make the bot part every channel
  • Puppet
    • say <Channel> <Message> makes the bot repeat the message in the target channel
    • act <Channel> <Message> makes the bot repeat the action in the target channel
    • raw <Message> makes the bot send a raw message to the server
      • Only admins listed in the admincommand.admins ini setting can send raw messages
  • Quit
    • quit [message] or die [message] makes the bot disconnect from the server with the given message if specified
      • Only admins listed in the admincommand.admins ini setting can use quit
  • Reconnect
    • reconnect [message] makes the bot disconnect with the given message if specified and then reconnect to the server, which at the same time forces all the plugin to re-read their ini settings
      • Only admins listed in the admincommand.admins ini setting can use reconnect
  • Set
    • set [-a|append] <iniVar> <value> writes the value to the currently loaded .ini file, do not use double quotes or whatever, just the value. Specifying -a or append appends the value to the variable assuming it is a comma separated list
    • get <iniVar> returns the value for that ini setting
      • Only admins listed in the admincommand.admins ini setting can get and set
  • Toggle
    • enable <Plugin> and disable <Plugin> respectively enable and disable a plugin altogether. It won't receive any events
      • Only admins listed in the admincommand.admins ini setting can use enable and disable
    • mute <Plugin> [target] and unmute <Plugin> respectively mute and unmute a plugin, which affects its ability to output messages, but won't affect its ability to receive events. For instance Logging will continue logging but will not answer seen or heard requests while it is muted. By default, the plugins will only be muted or unmuted where the command is called unless a target is specified. If target is global, then the plugin will be muted for every channel
      • Only admins listed in the admincommand.admins ini setting can specify a target
  • Eval
    • eval [-r] <code> evaluates the code passed using PHP's eval command and returns the results. By default, return is prefixed to the code to return the results automatically while using the optional -r argument evaluates the code as is. If eval returns a value, it displays the results in channel, while any output is dumped to the console
    • exec [-c] <command> runs the given command using PHP's exec command and returns the last line of the results. If the optional -c argument the entire results are dumped to the console
      • Only admins listed in the admincommand.admins ini setting can use eval and exec
  • ModuleList
    • plugins [-h][-v][-e][-d][-m][-g][-l][-u][-a][-b][-p][-i] returns a list of currently running plugins based on the the arguments passed; also multiple arguments can be used return multiple lists. By default, plugins will return a list of all currently running plugins
      • Arguments:
        • -h, -help will return help information of every supported argument
        • -v, -verbose will return a list of all currently running plugins including their state such as disabled, global and locally muted and if its an admin plugin. If verbose is used, all other arguments are ignored
        • -e, -enabled will return a list of every enabled plugin
        • -d, -disabled will return a list of every disabled plugin
        • -m, -muted will return a list of every global and local muted plugin. Plugins appended with an asterisk are global muted
        • -g, -globalmuted will return a list of every global muted plugin
        • -l, -localmuted will return a list of every local (active channel) muted plugin
        • -u, -unmuted will return a list of every unmuted plugin
        • -a, -admin will return a list of every admin plugin
        • -b, -base will return a list of every base plugin
        • -p, -passive will return a list of every passive plugin
        • -i, -inactive will return a list of every inactive plugin