mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-03 08:04:07 +01:00
Updated DocBook translation
This commit is contained in:
parent
6a4567df32
commit
8b150d33c3
@ -20,6 +20,11 @@
|
|||||||
<date>18 Feb 2004</date>
|
<date>18 Feb 2004</date>
|
||||||
<revremark>Initial Docbook translation</revremark>
|
<revremark>Initial Docbook translation</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>0.2</revnumber>
|
||||||
|
<date>04 Sep 2004</date>
|
||||||
|
<revremark>Update Docbook translation</revremark>
|
||||||
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
</articleinfo>
|
</articleinfo>
|
||||||
<sect1>
|
<sect1>
|
||||||
@ -68,49 +73,49 @@
|
|||||||
“anticapability” for that command. An anticapability is
|
“anticapability” for that command. An anticapability is
|
||||||
a capability that, instead of saying “what a user can
|
a capability that, instead of saying “what a user can
|
||||||
do”, says what a user <emphasis>cannot</emphasis> do. It's
|
do”, says what a user <emphasis>cannot</emphasis> do. It's
|
||||||
formed rather simply by adding a dash (“-”) to the
|
formed rather simply by adding a dash (“-”) to the
|
||||||
beginning of a capability; <botcommand>rot13</botcommand> is a
|
beginning of a capability; <botcommand>rot13</botcommand> is a
|
||||||
capability, and <botcommand>-rot13</botcommand> is an
|
capability, and <botcommand>-rot13</botcommand> is an
|
||||||
anticapability. Anyway, when a user issues the bot a command,
|
anticapability. Anyway, when a user issues the bot a command,
|
||||||
perhaps <botcommand>calc</botcommand> or
|
perhaps <botcommand>calc</botcommand> or
|
||||||
<botcommand>help</botcommand>, the bot first checks to make sure
|
<botcommand>help</botcommand>, the bot first checks to make sure
|
||||||
the user doesn't have the <capability>-calc</capability> or the
|
the user doesn't have the <capability>-calc</capability> or the
|
||||||
<capability>-help</capability> capabilities before even
|
<capability>-help</capability> capabilities before even
|
||||||
considering responding to the user. So commands can be turned on
|
considering responding to the user. So commands can be turned on
|
||||||
or off on a <emphasis>per user</emphasis> basis, offering
|
or off on a <emphasis>per user</emphasis> basis, offering
|
||||||
finegrained control not often (if at all!) seen in other bots.
|
finegrained control not often (if at all!) seen in other bots.
|
||||||
</para>
|
</para>
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Channel capabilities</title>
|
<title>Channel capabilities</title>
|
||||||
<para>
|
<para>
|
||||||
But that's not all! The capabilities system also supports
|
But that's not all! The capabilities system also supports
|
||||||
<emphasis>Channel</emphasis> capabilities, which are
|
<emphasis>Channel</emphasis> capabilities, which are
|
||||||
capabilities that only apply to a specific channel; they're of
|
capabilities that only apply to a specific channel; they're of
|
||||||
the form <capability>#channel.capability</capability>.
|
the form <capability>#channel,capability</capability>.
|
||||||
Whenever a user issues a command to the bot in a channel, the
|
Whenever a user issues a command to the bot in a channel, the
|
||||||
command dispatcher also checks to make sure the user doesn't
|
command dispatcher also checks to make sure the user doesn't
|
||||||
have the anticapability for that command <emphasis>in that
|
have the anticapability for that command <emphasis>in that
|
||||||
channel</emphasis> and if the user does, the bot won't respond
|
channel</emphasis> and if the user does, the bot won't respond
|
||||||
to the user in the channel. Thus now, in addition to having
|
to the user in the channel. Thus now, in addition to having
|
||||||
the ability to turn individual commands on or off for an
|
the ability to turn individual commands on or off for an
|
||||||
individual user, we can now turn commands on or off for an
|
individual user, we can now turn commands on or off for an
|
||||||
individual user on an individual channel!
|
individual user on an individual channel!
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
So when a user <nick>foo</nick> sends a command
|
So when a user <nick>foo</nick> sends a command
|
||||||
<botcommand>bar</botcommand> to the bot on channel
|
<botcommand>bar</botcommand> to the bot on channel
|
||||||
<channel>#baz</channel>, first the bot checks to see if the
|
<channel>#baz</channel>, first the bot checks to see if the
|
||||||
user has the anticapability for the command by itself,
|
user has the anticapability for the command by itself,
|
||||||
<capability>-bar</capability>. If so, it returns right then
|
<capability>-bar</capability>. If so, it returns right then
|
||||||
and there, compltely ignoring the fact that the user issued
|
and there, compltely ignoring the fact that the user issued
|
||||||
that command to it. If the user doesn't have that
|
that command to it. If the user doesn't have that
|
||||||
anticapability, then the bot checks to see if the user issued
|
anticapability, then the bot checks to see if the user issued
|
||||||
the command over a channel, and if so, checks to see if the
|
the command over a channel, and if so, checks to see if the
|
||||||
user has the antichannelcapability for that command,
|
user has the antichannelcapability for that command,
|
||||||
<capability>#baz.-bar</capability>. If so, again, he returns
|
<capability>#baz,-bar</capability>. If so, again, he returns
|
||||||
right then and there and doesn't even think about responding
|
right then and there and doesn't even think about responding
|
||||||
to the bot. If neither of these anticapabilities are present,
|
to the bot. If neither of these anticapabilities are present,
|
||||||
then the bot just responds to the user like normal.
|
then the bot just responds to the user like normal.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
@ -119,7 +124,7 @@
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>A programmer's perspective</title>
|
<title>A programmer's perspective</title>
|
||||||
<para>
|
<para>
|
||||||
From a programmatical perspective, capabilties are easy to use
|
From a programming perspective, capabilties are easy to use
|
||||||
and flexible. Any command can check if a user has any
|
and flexible. Any command can check if a user has any
|
||||||
capability, even ones not thought of when the bot was
|
capability, even ones not thought of when the bot was
|
||||||
originally written. Commands/Callbacks can add their own
|
originally written. Commands/Callbacks can add their own
|
||||||
@ -140,6 +145,7 @@
|
|||||||
bot to follow for users that haven't yet registered in his
|
bot to follow for users that haven't yet registered in his
|
||||||
user database.
|
user database.
|
||||||
</para>
|
</para>
|
||||||
|
</sect2>
|
||||||
<para>
|
<para>
|
||||||
It's really a revolution!
|
It's really a revolution!
|
||||||
</para>
|
</para>
|
||||||
@ -148,11 +154,11 @@
|
|||||||
<title>Hard-coded supybot capabilities</title>
|
<title>Hard-coded supybot capabilities</title>
|
||||||
<para>
|
<para>
|
||||||
There are several default capabilities the bot uses. The most
|
There are several default capabilities the bot uses. The most
|
||||||
important of these is the <capability>owner</capability>
|
important of these is the <capability>owner</capability>
|
||||||
capability. This capability allows the person having it to use
|
capability. This capability allows the person having it to use
|
||||||
<emphasis>any</emphasis> command. It's best to keep this
|
<emphasis>any</emphasis> command. It's best to keep this
|
||||||
capability reserved to people who actually have access to the
|
capability reserved to people who actually have access to the
|
||||||
shell the bot is running on.
|
shell the bot is running on.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There is also the <capability>admin</capability> capability for
|
There is also the <capability>admin</capability> capability for
|
||||||
@ -164,41 +170,50 @@
|
|||||||
people with the next capability.
|
people with the next capability.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
People who are to administer channels with the bot should have the
|
People who are to administer channels with the bot should have the
|
||||||
<capability>#channel.op</capability> capability -- whatever
|
<capability>#channel,op</capability> capability – whatever
|
||||||
channel they are to administrate, they should have that channel
|
channel they are to administrate, they should have that channel
|
||||||
capability for <capability>op</capability>. For example, since I
|
capability for <capability>op</capability>. For example, since I
|
||||||
want <nick>inkedmn</nick> to be an administrator in
|
want <nick>inkedmn</nick> to be an administrator in
|
||||||
<channel>#supybot</channel>, I'll give him the
|
<channel>#supybot</channel>, I'll give him the
|
||||||
<capability>#supybot.op</capability> capability. This is in
|
<capability>#supybot,op</capability> capability. This is in
|
||||||
addition to his <capability>admin</capability> capability, since
|
addition to his <capability>admin</capability> capability, since
|
||||||
the <capability>admin</capability> capability doesn't give the
|
the <capability>admin</capability> capability doesn't give the
|
||||||
person having it control over channels.
|
person having it control over channels.
|
||||||
<capability>#channel.op</capability> is used for such things as
|
<capability>#channel.op</capability> is used for such things as
|
||||||
giving/receiving ops, kickbanning people, lobotomizing the bot,
|
giving/receiving ops, kickbanning people, lobotomizing the bot,
|
||||||
ignoring users in the channel, and managing the channel
|
ignoring users in the channel, and managing the channel
|
||||||
capabilities. The <capability>#channel.op</capability> capability
|
capabilities. The <capability>#channel,op</capability> capability
|
||||||
is also basically the equivalent of the owner capability for
|
is also basically the equivalent of the owner capability for
|
||||||
capabilities involving <channel>#channel</channel> –
|
capabilities involving <channel>#channel</channel> –
|
||||||
basically anyone with the <capability>#channel.op</capability>
|
basically anyone with the <capability>#channel,op</capability>
|
||||||
capability is considered to have all positive capabilities and no
|
capability is considered to have all positive capabilities and no
|
||||||
negative capabilities for <channel>#channel</channel>.
|
negative capabilities for <channel>#channel</channel>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
One other globally important capability exists:
|
One other globally important capability exists:
|
||||||
<capability>trusted</capability>. This is a command that
|
<capability>trusted</capability>. This is a command that
|
||||||
basically says “This user can be trusted not to try and
|
basically says “This user can be trusted not to try and
|
||||||
crash the bot.” It allows users to call commands like
|
crash the bot.” It allows users to call commands like
|
||||||
<botcommand>Math.icalc</botcommand>, which potentially could cause the
|
<botcommand>Math.icalc</botcommand>, which potentially could cause the
|
||||||
bot to begin a calculation that could potentially never return (a
|
bot to begin a calculation that could potentially never return (a
|
||||||
calculation like 10**10**10**10). Another command that requires
|
calculation like 10**10**10**10). Another command that requires
|
||||||
the trusted capability is <botcommand>Utilties.re</botcommand>, which
|
the trusted capability is <botcommand>Utilties.re</botcommand>, which
|
||||||
(due to the regular expression implementation in Python (and any
|
(due to the regular expression implementation in Python (and any
|
||||||
other language that uses NFA regular expressions, like Perl or
|
other language that uses NFA regular expressions, like Perl or
|
||||||
Ruby or Lua or …) which can allow a regular expression to
|
Ruby or Lua or …) which can allow a regular expression to
|
||||||
take exponential time to process). Consider what would happen if
|
take exponential time to process). Consider what would happen if
|
||||||
the someone gave the bot the command <literal>re [strjoin "" s/./
|
the someone gave the bot the command <literal>re [strjoin "" s/./
|
||||||
[dict go] /] [dict go]</literal>.
|
[dict go] /] [dict go]</literal>.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1>
|
||||||
|
<title>Other capabilities</title>
|
||||||
|
<para>
|
||||||
|
Other plugins may require different capabilities; the
|
||||||
|
<plugin>Factoids</plugin> plugin requires
|
||||||
|
<capability>#channel,factoids</capability>, the <plugin>Topic</plugin>
|
||||||
|
plugin requires <capability>#channel,topic</capability>, etc.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
</article>
|
</article>
|
||||||
|
Loading…
Reference in New Issue
Block a user