Difference between revisions of "Help Bot"

From Rizon Wiki
Jump to navigation Jump to search
m (Ohnoitsjamie moved page Help Bot to Nuke User:Peorth)
(Replaced content with "Nuke User:Peorth")
Line 1: Line 1:
<h3> <span class="mw-headline" id="Using"> Using </span></h3>
Nuke [[User:Peorth]]
<p>The Encyclopedia plugin is used to store, retrieve and edit factoids; short pieces of information triggered by a specific term.<br>
In order to add/edit/forget factoids, a user must have the <i>editfactoids</i> capability; to add editors, a user must have the <i>addeditors</i> capability.
</p>
<h4> <span class="mw-headline" id="Retrieving_a_factoid"> Retrieving a factoid </span></h4>
<pre>&lt;Nando&gt;&nbsp;!factoid
&lt;Help_Bot&gt; Hi! I'm #Help's infobot
</pre>
<h4> <span class="mw-headline" id="Adding_a_factoid"> Adding a factoid </span></h4>
<pre>&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; Sorry, I don't know anything about foo
&lt;Nando&gt;&nbsp;!foo is bar
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; foo is bar
</pre>
<p>If the format "&lt;term&gt; is &lt;factoid&gt;" is not suitable, you can use the <i>&lt;reply&gt;</i> keyword:
</p>
<pre>&lt;Nando&gt;&nbsp;!bar is &lt;reply&gt; baz
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!bar
&lt;Help_Bot&gt; baz
</pre>
<h4> <span class="mw-headline" id="Editing_factoids"> Editing factoids </span></h4>
<p>Editing existing factoids is done with the <i>no</i> keyword:
</p>
<pre>&lt;Nando&gt;&nbsp;!foo is &lt;reply&gt; bar
&lt;Help_Bot&gt; But foo already means something else.
&lt;Nando&gt;&nbsp;!no foo is &lt;reply&gt; bar
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; bar
</pre>
<p>Factoids can also be edited with the <i>&lt;sed&gt;</i> keyword, this works similarly to the <i>sed</i> command-line tool:
</p>
<pre>&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; bar
&lt;Nando&gt;&nbsp;!foo is &lt;sed&gt; /$/./
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; bar.
</pre>
<h4> <span class="mw-headline" id="Aliasing_one_factoid_to_another"> Aliasing one factoid to another </span></h4>
<p>You can alias a factoid to another with the <i>&lt;alias&gt;</i> keyword, this is useful when you want more than one term to refer to the same information:
</p>
<pre>&lt;Nando&gt;&nbsp;!foobar
&lt;Help_Bot&gt; Sorry, I know nothing about foobar
&lt;Nando&gt;&nbsp;!foobar is &lt;alias&gt; foo
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!foobar
&lt;Help_Bot&gt; baz
&lt;Nando&gt;&nbsp;!no foo is &lt;reply&gt; FOO!
&lt;Help_Bot&gt; I'll remember that Nando
&lt;Nando&gt;&nbsp;!foobar
&lt;Help_Bot&gt; FOO!
</pre>
<p>When editing a factoid, always edit what the alias points to, so in the example above you edit "foo", not "foobar".
</p>
<h4> <span class="mw-headline" id="Forgetting_factoids"> Forgetting factoids </span></h4>
<p>If you want to remove a factoid you use the <i>forget</i> keyword:
</p>
<pre>&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; FOO!
&lt;Nando&gt;&nbsp;!forget foo
&lt;Help_Bot&gt; I'll forget that Nando
&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; Sorry, I don't know anything about foo
</pre>
<p>The factoid is <b>not</b> deleted, just marked as forgotten. This means that attempting to add a new factoid with the same name will not work:
</p>
<pre>&lt;Nando&gt;&nbsp;!foo
&lt;Help_Bot&gt; Sorry, I don't know anything about foo
&lt;Nando&gt;&nbsp;!foo is &lt;reply&gt; bar
&lt;Help_Bot&gt; But foo already means something else!
</pre>
<p>You must first <i>unforget</i> a factoid to edit it:
</p>
<pre>&lt;Nando&gt;&nbsp;!unforget foo
&lt;Help_Bot&gt; I suddenly remember foo again, Nando
&lt;Nando&gt;&nbsp;!no foo is &lt;reply&gt; bar
&lt;Help_Bot&gt; I'll remember that Nando
</pre>
<h4> <span class="mw-headline" id="Looking_for_Factoids"> Looking for Factoids </span></h4>
<p>If you are looking for a specific factoid but cannot remember which one, you can search the factoid database by factoid name or fact:
</p>
<pre>!search &lt;string&gt;
</pre>
<h4> <span class="mw-headline" id="Factoid_modifiers"> Factoid modifiers </span></h4>
<h5> <span class="mw-headline" id="Getting_factoid_information"> Getting factoid information </span></h5>
<p>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.
</p><p>You can see this information by added the '-' modifier before the factoid name:
</p>
<pre>&lt;User&gt;&nbsp;!-bot
&lt;Bot&gt; bot is &lt;alias&gt; ubotu - added by SomeNick on 2006-06-18 00:41:01 - last edited by AnotherNick on 2010-09-02 10:30:22
&lt;User&gt;&nbsp;!-ubotu
&lt;Bot&gt; 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
</pre>
<h5> <span class="mw-headline" id="Getting_raw_factoids"> Getting raw factoids </span></h5>
<p>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>.
</p><p>You can see the raw factoid by adding the '+' modifier before the factoid name:
</p>
<pre>&lt;User&gt;&nbsp;!+ubotu
&lt;Bot&gt; &lt;reply&gt; 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
&lt;User&gt;&nbsp;!+lts
&lt;Bot&gt; &lt;reply&gt; 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&nbsp;!$curLTS ($curLTSLong $curLTSNum)
</pre>
<h4> <span class="mw-headline" id="Variables"> Variables </span></h4>
<p>Ubottu also understands some variables and will substitute them when the factoid is called.
</p>
<pre>&lt;User&gt;&nbsp;!lts is &lt;reply&gt; 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&nbsp;!$curLTS ($curLTSLong $curLTSNum)
&lt;Bot&gt; I'll remember that, User
&lt;User&gt;&nbsp;!lts
&lt;Bot&gt; 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&nbsp;!Hardy (Hardy Herron 8.04)
</pre>
<h5> <span class="mw-headline" id=".24nick"> $nick </span></h5>
<p>This variable will be replaced with the nick-name of the bot. E.g: ubottu
</p>
<h5> <span class="mw-headline" id=".24who"> $who </span></h5>
<p>This variable will be repalced with the nick-name of the person who called the factoid. E.g: Nando
</p>
<h5> <span class="mw-headline" id=".24chan"> $chan </span></h5>
<p>This variable will be replaced with the current channel the factoid is called in. E.g: #ubuntu
</p>
<h5> <span class="mw-headline" id=".24curStable"> $curStable </span></h5>
<p>This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Jaunty
</p>
<h5> <span class="mw-headline" id=".24curStableLong"> $curStableLong </span></h5>
<p>This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Jaunty Jackalope
</p>
<h5> <span class="mw-headline" id=".24curStableLower"> $curStableLower </span></h5>
<p>Same as $curStable, but lower-case.
</p>
<h5> <span class="mw-headline" id=".24curStableNum"> $curStableNum </span></h5>
<p>This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 9.04
</p>
<h5> <span class="mw-headline" id=".24curLTS"> $curLTS </span></h5>
<p>This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Hardy
</p>
<h5> <span class="mw-headline" id=".24curLTSLong"> $curLTSLong </span></h5>
<p>This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Hardy Heron
</p>
<h5> <span class="mw-headline" id=".24curLTSLower"> $curLTSLower </span></h5>
<p>Same as $curLTS, but lower-case.
</p>
<h5> <span class="mw-headline" id=".24curLTSNum"> $curLTSNum </span></h5>
<p>This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 8.04
</p>
<h5> <span class="mw-headline" id=".24curDevel"> $curDevel </span></h5>
<p>This variable will be replaced with the name of the current stable version of Ubuntu. E.g: Karmic
</p>
<h5> <span class="mw-headline" id=".24curDevelLong"> $curDevelLong </span></h5>
<p>This variable will be replaced with the long name of current stable version of Ubuntu. E.g: Karmic Koala
</p>
<h5> <span class="mw-headline" id=".24curDevelLower"> $curDevelLower </span></h5>
<p>Same as $curDevel, but lower-case.
</p>
<h5> <span class="mw-headline" id=".24curDevelNum"> $curDevelNum </span></h5>
<p>This variable will be replaced with the version number of the current stable version of Ubuntu. E.g: 9.10
</p>
<h3> <span class="mw-headline" id="Commands_2"> Commands </span></h3>
<table style="width: 100%;" border="1">
<tr>
<th> Command
</th>
<th> Arguments
</th>
<th> Detailed information
</th></tr>
<tr>
<td> addeditor
</td>
<td> <code>&lt;name&gt;</code>
</td>
<td> Adds the user with the name <code>&lt;name&gt;</code> to the list of editors.
</td></tr>
<tr>
<td> editors
</td>
<td> <code>Takes no arguments</code>
</td>
<td> Lists all the users who are in the list of editors.
</td></tr>
<tr>
<td> ignore
</td>
<td> <code>&lt;hostmask|nick&gt; [&lt;expires&gt;] [&lt;channel&gt;]</code>
</td>
<td> Ignores commands/requests from <code>&lt;hostmask&gt;</code> or <code>&lt;nick&gt;</code>. If <code>&lt;expires&gt;</code> is given the ignore will expire after that amount of time in seconds. If <code>&lt;channel&gt;</code> is given, the ignore will only apply in that channel. <code>&lt;channel&gt;</code> defaults to the channel the command is given in, use /msg to apply ignores globally.
</td></tr>
<tr>
<td> ignorelist
</td>
<td> <code>&lt;hostmask|nick&gt; [&lt;channel&gt;]</code>
</td>
<td> Lists all ignores set by <i>ignore</i>. If <code>&lt;channel&gt;</code> is given this will only list ignores set in that channel. <code>&lt;channel&gt;</code> defaults to the channel the command is given in, use /msg to list global ignores.
</td></tr>
<tr>
<td> moderators
</td>
<td> <code>Takes no arguments</code>
</td>
<td> Lists all the users who can add users to the list of editors.
</td></tr>
<tr>
<td> removeeditor
</td>
<td> <code>&lt;name&gt;</code>
</td>
<td> Removes the user with the name <code>&lt;name&gt;</code> from the list of editors.
</td></tr>
<tr>
<td> sync
</td>
<td> <code>Takes no arguments</code>
</td>
<td> Downloads a copy of the database from the remote server. Set the server with the configuration variable <i>supybot.plugins.Encyclopedia.remotedb</i>.
</td></tr>
<tr>
<td> unignore
</td>
<td> <code>&lt;hostmask|nick&gt; [&lt;channel&gt;]</code>
</td>
<td> Remove an ignore previously set by <i>ignore</i>. If <code>&lt;channel&gt;</code> was given in the original <i>ignore</i> command it must be given here too. <code>&lt;channel&gt;</code> defaults to the channel the command is given in, use /msg to remove an ignore globally.
</td></tr></table>

Revision as of 18:51, 11 October 2016