3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

bots: remove obsolete "Admin-only" tags from command help

This commit is contained in:
James Lu 2017-08-02 22:10:04 +08:00
parent 76b8932eeb
commit d42eb82b62

View File

@ -10,7 +10,7 @@ from pylinkirc.coremods import permissions
def spawnclient(irc, source, args): def spawnclient(irc, source, args):
"""<nick> <ident> <host> """<nick> <ident> <host>
Admin-only. Spawns the specified client on the PyLink server. Spawns the specified client on the PyLink server.
Note: this doesn't check the validity of any fields you give it!""" Note: this doesn't check the validity of any fields you give it!"""
permissions.checkPermissions(irc, source, ['bots.spawnclient']) permissions.checkPermissions(irc, source, ['bots.spawnclient'])
try: try:
@ -25,7 +25,7 @@ def spawnclient(irc, source, args):
def quit(irc, source, args): def quit(irc, source, args):
"""<target> [<reason>] """<target> [<reason>]
Admin-only. Quits the PyLink client with nick <target>, if one exists.""" Quits the PyLink client with nick <target>, if one exists."""
permissions.checkPermissions(irc, source, ['bots.quit']) permissions.checkPermissions(irc, source, ['bots.quit'])
try: try:
@ -53,7 +53,7 @@ def quit(irc, source, args):
def joinclient(irc, source, args): def joinclient(irc, source, args):
"""[<target>] <channel1>[,<channel2>,<channel3>,...] """[<target>] <channel1>[,<channel2>,<channel3>,...]
Admin-only. Joins <target>, the nick of a PyLink client, to a comma-separated list of channels. Joins <target>, the nick of a PyLink client, to a comma-separated list of channels.
If <target> is not given, it defaults to the main PyLink client. If <target> is not given, it defaults to the main PyLink client.
For the channel arguments, prefixes can also be specified to join the given client with For the channel arguments, prefixes can also be specified to join the given client with
@ -115,7 +115,7 @@ utils.add_cmd(joinclient, name='join')
def nick(irc, source, args): def nick(irc, source, args):
"""[<target>] <newnick> """[<target>] <newnick>
Admin-only. Changes the nick of <target>, a PyLink client, to <newnick>. If <target> is not given, it defaults to the main PyLink client.""" Changes the nick of <target>, a PyLink client, to <newnick>. If <target> is not given, it defaults to the main PyLink client."""
permissions.checkPermissions(irc, source, ['bots.nick']) permissions.checkPermissions(irc, source, ['bots.nick'])
@ -151,7 +151,7 @@ def nick(irc, source, args):
def part(irc, source, args): def part(irc, source, args):
"""[<target>] <channel1>,[<channel2>],... [<reason>] """[<target>] <channel1>,[<channel2>],... [<reason>]
Admin-only. Parts <target>, the nick of a PyLink client, from a comma-separated list of channels. If <target> is not given, it defaults to the main PyLink client.""" Parts <target>, the nick of a PyLink client, from a comma-separated list of channels. If <target> is not given, it defaults to the main PyLink client."""
permissions.checkPermissions(irc, source, ['bots.part']) permissions.checkPermissions(irc, source, ['bots.part'])
try: try:
@ -197,7 +197,7 @@ def part(irc, source, args):
def msg(irc, source, args): def msg(irc, source, args):
"""[<source>] <target> <text> """[<source>] <target> <text>
Admin-only. Sends message <text> from <source>, where <source> is the nick of a PyLink client. If <source> is not given, it defaults to the main PyLink client.""" Sends message <text> from <source>, where <source> is the nick of a PyLink client. If <source> is not given, it defaults to the main PyLink client."""
permissions.checkPermissions(irc, source, ['bots.msg']) permissions.checkPermissions(irc, source, ['bots.msg'])
# Because we want the source nick to be optional, this argument parsing gets a bit tricky. # Because we want the source nick to be optional, this argument parsing gets a bit tricky.