mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-05-14 02:17:38 +02:00
Fix line lengths.
This commit is contained in:
parent
4e7a00d504
commit
e29a9c0aa0
@ -251,17 +251,19 @@ class Admin(callbacks.Plugin):
|
|||||||
### 2) Admin users are *not* superior to #channel.ops, and don't
|
### 2) Admin users are *not* superior to #channel.ops, and don't
|
||||||
### have God-like powers over channels.
|
### have God-like powers over channels.
|
||||||
### 3) We assume that Admin users are two things: non-malicious and
|
### 3) We assume that Admin users are two things: non-malicious and
|
||||||
### and greedy for power. So they'll try to elevate their privilege
|
### and greedy for power. So they'll try to elevate their
|
||||||
### to owner, but they won't try to crash the bot for no reason.
|
### privilege to owner, but they won't try to crash the bot for
|
||||||
|
### no reason.
|
||||||
|
|
||||||
# Thus, the owner capability can't be given in the bot. Admin users
|
# Thus, the owner capability can't be given in the bot. Admin
|
||||||
# can only give out capabilities they have themselves (which will
|
# users can only give out capabilities they have themselves (which
|
||||||
# depend on supybot.capabilities and its child default) but generally
|
# will depend on supybot.capabilities and its child default) but
|
||||||
# means they can't mess with channel capabilities.
|
# generally means they can't mess with channel capabilities.
|
||||||
if ircutils.strEqual(capability, 'owner'):
|
if ircutils.strEqual(capability, 'owner'):
|
||||||
irc.error('The "owner" capability can\'t be added in the bot. '
|
irc.error('The "owner" capability can\'t be added in the bot.'
|
||||||
'Use the supybot-adduser program (or edit the '
|
' Use the supybot-adduser program (or edit the '
|
||||||
'users.conf file yourself) to add an owner capability.')
|
'users.conf file yourself) to add an owner '
|
||||||
|
'capability.')
|
||||||
return
|
return
|
||||||
if ircdb.isAntiCapability(capability) or \
|
if ircdb.isAntiCapability(capability) or \
|
||||||
ircdb.checkCapability(msg.prefix, capability):
|
ircdb.checkCapability(msg.prefix, capability):
|
||||||
@ -296,12 +298,12 @@ class Admin(callbacks.Plugin):
|
|||||||
def add(self, irc, msg, args, hostmask, expires):
|
def add(self, irc, msg, args, hostmask, expires):
|
||||||
"""<hostmask|nick> [<expires>]
|
"""<hostmask|nick> [<expires>]
|
||||||
|
|
||||||
Ignores <hostmask> or, if a nick is given, ignores whatever hostmask
|
Ignores <hostmask> or, if a nick is given, ignores whatever
|
||||||
that nick is currently using. <expires> is a "seconds from now" value
|
hostmask that nick is currently using. <expires> is a "seconds
|
||||||
that determines when the ignore will expire; if, for instance, you wish
|
from now" value that determines when the ignore will expire; if,
|
||||||
for the ignore to expire in an hour, you could give an <expires> of
|
for instance, you wish for the ignore to expire in an hour, you
|
||||||
3600. If no <expires> is given, the ignore will never automatically
|
could give an <expires> of 3600. If no <expires> is given, the
|
||||||
expire.
|
ignore will never automatically expire.
|
||||||
"""
|
"""
|
||||||
ircdb.ignores.add(hostmask, expires)
|
ircdb.ignores.add(hostmask, expires)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
@ -310,8 +312,8 @@ class Admin(callbacks.Plugin):
|
|||||||
def remove(self, irc, msg, args, hostmask):
|
def remove(self, irc, msg, args, hostmask):
|
||||||
"""<hostmask|nick>
|
"""<hostmask|nick>
|
||||||
|
|
||||||
Ignores <hostmask> or, if a nick is given, ignores whatever hostmask
|
Ignores <hostmask> or, if a nick is given, ignores whatever
|
||||||
that nick is currently using.
|
hostmask that nick is currently using.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
ircdb.ignores.remove(hostmask)
|
ircdb.ignores.remove(hostmask)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user