This commit is contained in:
Jeremy Fincher 2003-12-09 21:36:33 +00:00
parent ae44a337be
commit 3978be5cdf
2 changed files with 5 additions and 2 deletions

View File

@ -464,7 +464,7 @@ class Channel(callbacks.Privmsg):
""" """
channel = privmsgs.getChannel(msg, args) channel = privmsgs.getChannel(msg, args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
L = c.capabilities[:] L = list(c.capabilities)
L.sort() L.sort()
irc.reply(msg, '[%s]' % ', '.join(L)) irc.reply(msg, '[%s]' % ', '.join(L))

View File

@ -54,13 +54,16 @@ class ChannelTestCase(ChannelPluginTestCase, PluginDocumentation):
## self.assertNotError('channel removecapability foo op') ## self.assertNotError('channel removecapability foo op')
## self.assertResponse('user capabilities foo', '[]') ## self.assertResponse('user capabilities foo', '[]')
def testCapabilities(self):
self.assertNotError('channel capabilities')
def testUnban(self): def testUnban(self):
self.assertError('unban foo!bar@baz') self.assertError('unban foo!bar@baz')
self.irc.feedMsg(ircmsgs.op(self.channel, self.nick)) self.irc.feedMsg(ircmsgs.op(self.channel, self.nick))
m = self.getMsg('unban foo!bar@baz') m = self.getMsg('unban foo!bar@baz')
self.assertEqual(m.command, 'MODE') self.assertEqual(m.command, 'MODE')
self.assertEqual(m.args, (self.channel, '-b', 'foo!bar@baz')) self.assertEqual(m.args, (self.channel, '-b', 'foo!bar@baz'))
self.assertNotError(' ') self.assertNoResponse(' ', 2)
def testErrorsWithoutOps(self): def testErrorsWithoutOps(self):
for s in 'op deop halfop dehalfop voice devoice kick'.split(): for s in 'op deop halfop dehalfop voice devoice kick'.split():