mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Update to use newer commands.wrap
This commit is contained in:
parent
bec6b54cbc
commit
275bdfc1b9
@ -42,7 +42,7 @@ import supybot.conf as conf
|
|||||||
import supybot.ircdb as ircdb
|
import supybot.ircdb as ircdb
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.plugins as plugins
|
import supybot.plugins as plugins
|
||||||
from supybot.commands import wrap
|
from supybot.commands import additional, wrap
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
@ -171,7 +171,7 @@ class News(callbacks.Privmsg):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
irc.errorInvalid('news item id', id,
|
irc.errorInvalid('news item id', id,
|
||||||
'<id> must be a positive integer.')
|
'<id> must be a positive integer.')
|
||||||
news = wrap(news, ['channeldb', ('int?', None)])
|
news = wrap(news, ['channeldb', additional('int')])
|
||||||
|
|
||||||
def remove(self, irc, msg, args, channel, id):
|
def remove(self, irc, msg, args, channel, id):
|
||||||
"""[<channel>] <id>
|
"""[<channel>] <id>
|
||||||
@ -237,7 +237,7 @@ class News(callbacks.Privmsg):
|
|||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
except dbi.NoRecordError:
|
except dbi.NoRecordError:
|
||||||
irc.reply('No old news for %s.' % channel)
|
irc.reply('No old news for %s.' % channel)
|
||||||
old = wrap(old, ['channeldb', ('int?', None)])
|
old = wrap(old, ['channeldb', additional('int')])
|
||||||
|
|
||||||
|
|
||||||
Class = News
|
Class = News
|
||||||
|
Loading…
Reference in New Issue
Block a user