Difference between revisions of "Help Bot"

From Rizon Wiki
Jump to navigation Jump to search
m (Protected "Help Bot" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(8 intermediate revisions by 3 users not shown)
Line 5: Line 5:
<h4> <span class="mw-headline" id="Retrieving_a_factoid"> Retrieving a factoid </span></h4>
<h4> <span class="mw-headline" id="Retrieving_a_factoid"> Retrieving a factoid </span></h4>
<pre>&lt;Nando&gt;&nbsp;!factoid
<pre>&lt;Nando&gt;&nbsp;!factoid
&lt;Help_Bot&gt; Hi! I'm #Help's favorite infobot, you can search my brain yourself at http://ubottu.com/factoids.cgi - Usage info: http://wiki.ubuntu.com/UbuntuBots
&lt;Help_Bot&gt; Hi! I'm #Help's infobot
</pre>
</pre>
<h4> <span class="mw-headline" id="Adding_a_factoid"> Adding a factoid </span></h4>
<h4> <span class="mw-headline" id="Adding_a_factoid"> Adding a factoid </span></h4>
Line 85: Line 85:
</p>
</p>
<pre>!search &lt;string&gt;
<pre>!search &lt;string&gt;
</pre>
<p>You can also browse and search the factoids on-line  <a rel="nofollow" class="external text" href="http://ubottu.com/factoids.cgi">Here</a>
</p><p>Sorted by:
</p>
<pre>* <a rel="nofollow" class="external text" href="http://ubottu.com/factoids.cgi?db=ubuntu&amp;search=&amp;order=popularity%20DESC&amp;page=0">Most popular first</a>
* <a rel="nofollow" class="external text" href="http://ubottu.com/factoids.cgi?db=ubuntu&amp;search=&amp;order=added%20DESC&amp;page=0">By date</a>
* <a rel="nofollow" class="external text" href="http://ubottu.com/factoids.cgi?db=ubuntu&amp;search=&amp;order=name%20ASC&amp;page=0">Alphabetical</a>
</pre>
</pre>
<h4> <span class="mw-headline" id="Factoid_modifiers"> Factoid modifiers </span></h4>
<h4> <span class="mw-headline" id="Factoid_modifiers"> Factoid modifiers </span></h4>

Latest revision as of 21:16, 11 October 2016

Using

The Encyclopedia plugin is used to store, retrieve and edit factoids; short pieces of information triggered by a specific term.
In order to add/edit/forget factoids, a user must have the editfactoids capability; to add editors, a user must have the addeditors capability.

Retrieving a factoid

<Nando> !factoid
<Help_Bot> Hi! I'm #Help's infobot

Adding a factoid

<Nando> !foo
<Help_Bot> Sorry, I don't know anything about foo
<Nando> !foo is bar
<Help_Bot> I'll remember that Nando
<Nando> !foo
<Help_Bot> foo is bar

If the format "<term> is <factoid>" is not suitable, you can use the <reply> keyword:

<Nando> !bar is <reply> baz
<Help_Bot> I'll remember that Nando
<Nando> !bar
<Help_Bot> baz

Editing factoids

Editing existing factoids is done with the no keyword:

<Nando> !foo is <reply> bar
<Help_Bot> But foo already means something else.
<Nando> !no foo is <reply> bar
<Help_Bot> I'll remember that Nando
<Nando> !foo
<Help_Bot> bar

Factoids can also be edited with the <sed> keyword, this works similarly to the sed command-line tool:

<Nando> !foo
<Help_Bot> bar
<Nando> !foo is <sed> /$/./
<Help_Bot> I'll remember that Nando
<Nando> !foo
<Help_Bot> bar.

Aliasing one factoid to another

You can alias a factoid to another with the <alias> keyword, this is useful when you want more than one term to refer to the same information:

<Nando> !foobar
<Help_Bot> Sorry, I know nothing about foobar
<Nando> !foobar is <alias> foo
<Help_Bot> I'll remember that Nando
<Nando> !foobar
<Help_Bot> baz
<Nando> !no foo is <reply> FOO!
<Help_Bot> I'll remember that Nando
<Nando> !foobar
<Help_Bot> FOO!

When editing a factoid, always edit what the alias points to, so in the example above you edit "foo", not "foobar".

Forgetting factoids

If you want to remove a factoid you use the forget keyword:

<Nando> !foo
<Help_Bot> FOO!
<Nando> !forget foo
<Help_Bot> I'll forget that Nando
<Nando> !foo
<Help_Bot> Sorry, I don't know anything about foo

The factoid is not deleted, just marked as forgotten. This means that attempting to add a new factoid with the same name will not work:

<Nando> !foo
<Help_Bot> Sorry, I don't know anything about foo
<Nando> !foo is <reply> bar
<Help_Bot> But foo already means something else!

You must first unforget a factoid to edit it:

<Nando> !unforget foo
<Help_Bot> I suddenly remember foo again, Nando
<Nando> !no foo is <reply> bar
<Help_Bot> I'll remember that Nando

Looking for Factoids

If you are looking for a specific factoid but cannot remember which one, you can search the factoid database by factoid name or fact:

!search <string>

Factoid modifiers

Getting factoid information

Some information on factoids can be retrieved by using the '-' modifier when calling a factoid. This information includes information on if the factoid is an alias to another, what factoids are aliases to the factoid, when the factoid was created, and when the factoid was last modified.

You can see this information by added the '-' modifier before the factoid name:

<User> !-bot
<Bot> bot is <alias> ubotu - added by SomeNick on 2006-06-18 00:41:01 - last edited by AnotherNick on 2010-09-02 10:30:22
<User> !-ubotu
<Bot> ubotu aliases: yourself, bot, usage, factoid, brain, add, help me, syntax, factoids, everything, me, ubottu, bots, fact - added by SomeNick on 2006-06-19 12:15:56 - last edited by AnotherNick on 2010-09-18 20:14:50
Getting raw factoids

The raw factoid, as it is stored in the database, can be retrieved by using the '+' modifier when calling a factoid. Sometimes it can be useful to see a raw factoid as it is stored in the database, for instance when working with <a href="#Variables">variable substitutions</a>.

You can see the raw factoid by adding the '+' modifier before the factoid name:

<User> !+ubotu
<Bot> <reply> Hi! I'm $chan's favorite infobot, you can search my brain yourself at http://ubottu.com/factoids.cgi | Usage info: http://ubottu.com/devel/wiki/Plugins | Bot channels and general info: https://wiki.ubuntu.com/IRC/Bots
<User> !+lts
<Bot> <reply> LTS means Long Term Support. LTS versions of Ubuntu will be supported for 3 years on the desktop, and 5 years on the server. The current LTS version of Ubuntu is !$curLTS ($curLTSLong $curLTSNum)

Variables

Ubottu also understands some variables and will substitute them when the factoid is called.

<User> !lts is <reply> LTS means Long Term Support. LTS versions of Ubuntu will be supported for 3 years on the desktop, and 5 years on the server. The current LTS version of Ubuntu is !$curLTS ($curLTSLong $curLTSNum)
<Bot> I'll remember that, User
<User> !lts
<Bot> LTS means Long Term Support. LTS versions of Ubuntu will be supported for 3 years on the desktop, and 5 years on the server. The current LTS version of Ubuntu is !Hardy (Hardy Herron 8.04)
$nick

This variable will be replaced with the nick-name of the bot. E.g: ubottu

$who

This variable will be repalced with the nick-name of the person who called the factoid. E.g: Nando

$chan

This variable will be replaced with the current channel the factoid is called in. E.g: #ubuntu

$curStable

This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Jaunty

$curStableLong

This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Jaunty Jackalope

$curStableLower

Same as $curStable, but lower-case.

$curStableNum

This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 9.04

$curLTS

This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Hardy

$curLTSLong

This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Hardy Heron

$curLTSLower

Same as $curLTS, but lower-case.

$curLTSNum

This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 8.04

$curDevel

This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Karmic

$curDevelLong

This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Karmic Koala

$curDevelLower

Same as $curDevel, but lower-case.

$curDevelNum

This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 9.10

Commands

Command Arguments Detailed information
addeditor <name> Adds the user with the name <name> to the list of editors.
editors Takes no arguments Lists all the users who are in the list of editors.
ignore <hostmask|nick> [<expires>] [<channel>] Ignores commands/requests from <hostmask> or <nick>. If <expires> is given the ignore will expire after that amount of time in seconds. If <channel> is given, the ignore will only apply in that channel. <channel> defaults to the channel the command is given in, use /msg to apply ignores globally.
ignorelist <hostmask|nick> [<channel>] Lists all ignores set by ignore. If <channel> is given this will only list ignores set in that channel. <channel> defaults to the channel the command is given in, use /msg to list global ignores.
moderators Takes no arguments Lists all the users who can add users to the list of editors.
removeeditor <name> Removes the user with the name <name> from the list of editors.
sync Takes no arguments Downloads a copy of the database from the remote server. Set the server with the configuration variable supybot.plugins.Encyclopedia.remotedb.
unignore <hostmask|nick> [<channel>] Remove an ignore previously set by ignore. If <channel> was given in the original ignore command it must be given here too. <channel> defaults to the channel the command is given in, use /msg to remove an ignore globally.