mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Topic.reorder: Fixed some bugs found via jemfinch's new tests
This commit is contained in:
parent
88581d99e4
commit
05238bfcc6
@ -150,6 +150,9 @@ class Topic(callbacks.Privmsg, configurable.Mixin):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error(msg, 'The positions must be valid integers.')
|
irc.error(msg, 'The positions must be valid integers.')
|
||||||
return
|
return
|
||||||
|
if utils.sorted(order) != range(num):
|
||||||
|
irc.error(msg, 'All topic numbers must be specified uniquely')
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
newtopics = [topics[i] for i in order]
|
newtopics = [topics[i] for i in order]
|
||||||
newtopic = self._joinTopic(newtopics, channel)
|
newtopic = self._joinTopic(newtopics, channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user