mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Small style fixes.
This commit is contained in:
parent
33bb2e7347
commit
63cb4b9e6e
@ -30,8 +30,8 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Provides an interface to the wonders of UrbanDictionary.com
|
Provides an interface to the wonders of UrbanDictionary.com. This may include
|
||||||
'Not appropriate for all audiences'
|
some offensive definitions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
@ -62,15 +62,16 @@ conf.registerPlugin('UrbanDict')
|
|||||||
class UrbanDict(callbacks.Privmsg):
|
class UrbanDict(callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
callBefore = ['URL']
|
callBefore = ['URL']
|
||||||
|
|
||||||
def callCommand(self, method, irc, msg, *L, **kwargs):
|
def callCommand(self, method, irc, msg, *L, **kwargs):
|
||||||
try:
|
try:
|
||||||
super(UrbanDict, self).callCommand(method, irc, msg, *L, **kwargs)
|
super(UrbanDict, self).callCommand(method, irc, msg, *L, **kwargs)
|
||||||
except webutils.WebError, e:
|
except webutils.WebError, e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
|
|
||||||
_wordRE = re.compile('<title>UrbanDictionary.com/(?P<word>.*?)</title>')
|
_wordRE = re.compile(r'<title>UrbanDictionary.com/(?P<word>.*?)</title>')
|
||||||
_defUsageRE = re.compile('<blockquote><p>(?P<definition>.*?)</p><p><i>(?P<usage>.*?)</i></p>', re.MULTILINE | re.DOTALL)
|
_defUsageRE = re.compile(r'<blockquote><p>(?P<definition>.*?)</p>'
|
||||||
|
r'<p><i>(?P<usage>.*?)</i></p>',
|
||||||
|
re.MULTILINE | re.DOTALL)
|
||||||
def ud(self, irc, msg, args):
|
def ud(self, irc, msg, args):
|
||||||
"""[<phrase>]
|
"""[<phrase>]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user