mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Removed the 'chan' from commands.
This commit is contained in:
parent
8580b6a44e
commit
717fcab297
@ -206,7 +206,7 @@ class Channel(callbacks.Privmsg):
|
|||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
unpermban = privmsgs.checkChannelCapability(unpermban, 'op')
|
unpermban = privmsgs.checkChannelCapability(unpermban, 'op')
|
||||||
|
|
||||||
def chanignore(self, irc, msg, args, channel):
|
def ignore(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <nick|hostmask>
|
"""[<channel>] <nick|hostmask>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -226,9 +226,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
c.addIgnore(banmask)
|
c.addIgnore(banmask)
|
||||||
ircdb.channels.setChannel(channel, c)
|
ircdb.channels.setChannel(channel, c)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
chanignore = privmsgs.checkChannelCapability(chanignore, 'op')
|
ignore = privmsgs.checkChannelCapability(ignore, 'op')
|
||||||
|
|
||||||
def unchanignore(self, irc, msg, args, channel):
|
def unignore(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <hostmask>
|
"""[<channel>] <hostmask>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -240,9 +240,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
c.removeIgnore(banmask)
|
c.removeIgnore(banmask)
|
||||||
ircdb.channels.setChannel(channel, c)
|
ircdb.channels.setChannel(channel, c)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
unchanignore = privmsgs.checkChannelCapability(unchanignore, 'op')
|
unignore = privmsgs.checkChannelCapability(unignore, 'op')
|
||||||
|
|
||||||
def chanignores(self, irc, msg, args, channel):
|
def ignores(self, irc, msg, args, channel):
|
||||||
"""[<channel>]
|
"""[<channel>]
|
||||||
|
|
||||||
Lists the hostmasks that the bot is ignoring on the given channel.
|
Lists the hostmasks that the bot is ignoring on the given channel.
|
||||||
@ -257,10 +257,10 @@ class Channel(callbacks.Privmsg):
|
|||||||
'in %r' % channel)
|
'in %r' % channel)
|
||||||
return
|
return
|
||||||
irc.reply(msg, utils.commaAndify(map(repr,c.ignores)))
|
irc.reply(msg, utils.commaAndify(map(repr,c.ignores)))
|
||||||
chanignores = privmsgs.checkChannelCapability(chanignores, 'op')
|
ignores = privmsgs.checkChannelCapability(ignores, 'op')
|
||||||
|
|
||||||
|
|
||||||
def addchancapability(self, irc, msg, args, channel):
|
def addcapability(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <name|hostmask> <capability>
|
"""[<channel>] <name|hostmask> <capability>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -278,9 +278,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNoUser)
|
||||||
addchancapability = privmsgs.checkChannelCapability(addchancapability,'op')
|
addcapability = privmsgs.checkChannelCapability(addcapability,'op')
|
||||||
|
|
||||||
def removechancapability(self, irc, msg, args, channel):
|
def removecapability(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <name|hostmask> <capability>
|
"""[<channel>] <name|hostmask> <capability>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -299,10 +299,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNoUser)
|
||||||
removechancapability = \
|
removecapability = privmsgs.checkChannelCapability(removecapability, 'op')
|
||||||
privmsgs.checkChannelCapability(removechancapability, 'op')
|
|
||||||
|
|
||||||
def setdefaultchancapability(self, irc, msg, args, channel):
|
def setdefaultcapability(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <default response to unknown capabilities> <True|False>
|
"""[<channel>] <default response to unknown capabilities> <True|False>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -323,10 +322,10 @@ class Channel(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
ircdb.channels.setChannel(channel, c)
|
ircdb.channels.setChannel(channel, c)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
setdefaultchancapability = \
|
setdefaultcapability = \
|
||||||
privmsgs.checkChannelCapability(setdefaultchancapability, 'op')
|
privmsgs.checkChannelCapability(setdefaultcapability, 'op')
|
||||||
|
|
||||||
def setchancapability(self, irc, msg, args, channel):
|
def setcapability(self, irc, msg, args, channel):
|
||||||
"""[<channel>] <capability>
|
"""[<channel>] <capability>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -339,10 +338,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
c.addCapability(capability)
|
c.addCapability(capability)
|
||||||
ircdb.channels.setChannel(channel, c)
|
ircdb.channels.setChannel(channel, c)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
setchancapability = privmsgs.checkChannelCapability(setchancapability,
|
setcapability = privmsgs.checkChannelCapability(setcapability, 'op')
|
||||||
'op')
|
|
||||||
|
|
||||||
def unsetchancapability(self, irc, msg, args, channel):
|
def unsetcapability(self, irc, msg, args, channel):
|
||||||
"""[<chanel>] <capability>
|
"""[<chanel>] <capability>
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
@ -356,10 +354,9 @@ class Channel(callbacks.Privmsg):
|
|||||||
c.removeCapability(capability)
|
c.removeCapability(capability)
|
||||||
ircdb.channels.setChannel(channel, c)
|
ircdb.channels.setChannel(channel, c)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
unsetchancapability = privmsgs.checkChannelCapability(unsetchancapability,
|
unsetcapability = privmsgs.checkChannelCapability(unsetcapability, 'op')
|
||||||
'op')
|
|
||||||
|
|
||||||
def chancapabilities(self, irc, msg, args):
|
def capabilities(self, irc, msg, args):
|
||||||
"""[<channel>]
|
"""[<channel>]
|
||||||
|
|
||||||
The <channel> argument is only necessary if the message isn't being
|
The <channel> argument is only necessary if the message isn't being
|
||||||
|
@ -75,10 +75,10 @@ class ChannelTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.assertNotError('unpermban foo!bar@baz')
|
self.assertNotError('unpermban foo!bar@baz')
|
||||||
self.assertError('permban not!a.hostmask')
|
self.assertError('permban not!a.hostmask')
|
||||||
|
|
||||||
def testChanignore(self):
|
def testIgnore(self):
|
||||||
self.assertNotError('chanignore foo!bar@baz')
|
self.assertNotError('Channel ignore foo!bar@baz')
|
||||||
self.assertResponse('chanignores', "'foo!bar@baz'")
|
self.assertResponse('Channel ignores', "'foo!bar@baz'")
|
||||||
self.assertNotError('unchanignore foo!bar@baz')
|
self.assertNotError('Channel unignore foo!bar@baz')
|
||||||
self.assertError('permban not!a.hostmask')
|
self.assertError('permban not!a.hostmask')
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user