Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions plugins/NickAuth/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ def _check_auth(self, irc, msg, user):

@internationalizeDocstring
def add(self, irc, msg, args, network, user, nick):
"""[<network>] [<bot username>] <account>
"""[<network>] <bot username> <account>

Add <account> to the list of network services accounts owned by
<bot username> on <network>. <bot username> is only required if you
are not already logged in to Limnoria.
<bot username> on <network>.
<network> defaults to the current network.
"""
network = network.network or irc.network
Expand All @@ -89,7 +88,7 @@ def add(self, irc, msg, args, network, user, nick):
'on this network.'), Raise=True)
irc.replySuccess()
add = wrap(add, [optional('networkIrc'),
optional('otherUser'),
'otherUser',
'nick'])

@internationalizeDocstring
Expand Down
10 changes: 4 additions & 6 deletions plugins/NickAuth/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,13 @@ def testBotJoin(self):
def testList(self):
self.assertNotError('register foobar 123')
self.assertRegexp('nick list', 'You have no recognized services accounts')
self.assertNotError('nick add foo')
self.assertNotError('nick add foobar foo')
self.assertRegexp('nick list', 'foo')
self.assertNotError('nick add %s bar' % self.nick)
self.assertNotError('nick add %s foobar bar' % self.irc.network)
self.assertRegexp('nick list', 'foo and bar')
self.assertNotError('nick add %s %s baz' % (self.irc.network, self.nick))
self.assertRegexp('nick list', 'foo, bar, and baz')
self.assertRegexp('nick list %s' % self.irc.network, 'foo, bar, and baz')
self.assertRegexp('nick list %s' % self.irc.network, 'foo and bar')
self.assertRegexp('nick list %s foobar' % self.irc.network,
'foo, bar, and baz')
'foo and bar')


# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: