Ambrose the infobot

Ambrose is an infobot, a program that connects to IRC channels and automatically responds to certain commands. Its main function is to serve as a database, so channel users can enter and retrieve short pieces of texts, for instance to answer frequently asked questions.

Ambrose is written in C++ using Berkley sockets and runs under many Unices and Win32. You can download the source here.

Ambrose participates in some channels on EFNET, like #cryptonomicon and #informatik. If you'd like an infobot for your own channel, please contact me.

The following commands are supported.


In the channel:
(these commands require user rights on Ambrose)

  -----------------------------------------------------------------------------

  findinfo <argument> <argument> !<argument> [...]

    Performs a fulltext search of the entire database and displays a list of
    relevant keys. The search is case-insensitive and the arguments are
    searched in the keys and values of all records.

    If multiple arguments are specified, only records that match all of them
    are displayed. Prefixing an argument with ! omits all records that contain
    this word. The order in which the arguments are given is not relevant.

    Example:

      findinfo frobnitz
      no match

      findinfo computer
      29 matches: alu, case, rfc0031, rfc0062, rfc0144, rfc0146, rfc0169,
                  rfc0174, rfc0195, rfc0219 [...]

      findinfo computer programming !rfc
      2 matches: alu, case

  -----------------------------------------------------------------------------

  info <key>

    Retrieves the record with the specified key and sends it to the channel.

    Example:

      info alu
      alu = a random number generator supplied as standard with all computer
            systems.

      info frobnitz
      "frobnitz" not found

  -----------------------------------------------------------------------------

  mkinfo <key> = <value>
 
    Creates (or overwrites) a record.

    Note that keys are always lower-case. You can supply a mixed-case keyword,
    but it will be automatically converted to lower-case.

    Example:

      mkinfo rtfm = Read The Fscking Manual!
      "rtfm" added

  -----------------------------------------------------------------------------

  rminfo <key>

    Deletes a record.

    Example:

      rminfo foo
      "foo" removed

      rminfo bar
      "bar" not found

  -----------------------------------------------------------------------------

As private messages: /msg Ambrose <command>
(these commands require oper rights on Ambrose)

  -----------------------------------------------------------------------------

  channel <channel> op

    Gives yourself channel operator status.

      Example:

        channel #informatik op
        --- Ambrose gives channel operator status to dhartmei

  -----------------------------------------------------------------------------

  channel <channel> voice <nick(s)>

    Gives voice to the specified nick(s).

      Example:

        channel #informatik voice dhartmei
        --- Ambrose gives voice to dhartmei

  -----------------------------------------------------------------------------

  channel <channel> devoice <nick(s)>

    Removes voice from the selected nick(s).

      Example:

        channel #informatik devoice dhartmei trudel
        --- Ambrose removes voice from dhartmei
        --- Ambrose removes voice from trudel

  -----------------------------------------------------------------------------

  channel <channel> topic <new topic>

    Sets a new channel topic.

      Example:

        channel #informatik topic Welcome to the channel
        --- Ambrose sets channel topic to 'Welcome to the channel'

  -----------------------------------------------------------------------------

  channel <channel> kick <nick> <reason>

    Kicks the specified user from the channel.
    If no reason is specified, 'requested' will be used.

    Note that persons who have oper rights on Ambrose will not be kicked.

      Example:

        channel #informatik kick dhartmei you suck
        --- Ambrose has kicked dhartmei from #informatik (you suck)

  -----------------------------------------------------------------------------

  channel <channel> kickban <mask> <reason>

    Add the specified mask to the ban list and kicks all matching nicks.
    If the mask consists only of a nick, !*@* will be appended.
    If no reason is specified, 'requested' will be used.

    Note that persons who have oper rights on Ambrose will not be kicked.
    Nonetheless you should be careful and specify the mask as narrow as
    possible.

      Example:

        channel #informatik kickban *!root@* don't irc as root
        --- Ambrose sets ban on *!root@*
        --- Ambrose has kicked dhartmei from #informatik (don't irc as root)
        --- Ambrose has kicked trudel from #informatik (don't irc as root)

        channel #informatik kickban dhartmei blindfisch
        --- Ambrose sets ban on dhartmei!*@*
        --- Ambrose has kicked dhartmei from #infromatik (blindfisch)

  -----------------------------------------------------------------------------

  channel <channel> unban <mask>

    Removes the specified mask from the ban list.

      Example:

        channel #informatik unban dhart*!*@*.ch
        --- Ambrose removes ban on dhart*!*@*.ch

  -----------------------------------------------------------------------------

  channel <channel> status

    Reports the status of the database in the specified channel.

    Example:

      channel #informatik status
      database contains 3867 entries, mode is answer

  -----------------------------------------------------------------------------

  channel <channel> shutup

    Changes into quiet mode, where no in-channel commands are answered.

      Example:

        channel #informatik shutup
        mode set to quiet

  -----------------------------------------------------------------------------

  channel <channel> answer

    Changes into answer mode, where in-channel commands are answered.

      Example:

        channel #informatik answer
        mode set to answer

  -----------------------------------------------------------------------------

  channel <channel> list

    Lists the access rights. By default, only channel operators can use
    Ambrose. With this list, operators can grant operator and user rights to
    arbitary masks. To use the in-channel commands, user rights are sufficient.

    Important: wildcard support is limited to a maximum of one * in nick, ident
    and host, and it must be at the beginning or end of the word. ? is not
    supported yet.

      Example:

        channel #informatik list
        opers: trudel!*@*.de
        users: *!*@*

  -----------------------------------------------------------------------------

  channel <channel> grant|deny user|oper <mask>

    Grants or denies a mask user or operator rights.

      Example:

        channel #informatik grant user dhartmei!*dhartmei@*.ch
        granted user access to dhartmei!*dhartmei@*.ch

        channel #informatik deny oper dhartmei!*dhartmei@*.ch
        denied oper access to dhartmei!*dhartmei@*.ch

  -----------------------------------------------------------------------------

  help

    Returns a brief help text.

    Example:
   
      help
      channel <channel> status / shutup / answer / list /
                        grant|deny user|oper <mask>

  -----------------------------------------------------------------------------

If you have comments or questions, please send email to Daniel Hartmeier.