mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Fixed some bugz0rs.
This commit is contained in:
parent
a58e5b97d9
commit
8b6733ee5d
@ -217,7 +217,7 @@ class URL(callbacks.PrivmsgCommandAndRegexp,
|
||||
s = 'Title: %s' % utils.htmlToText(m.group(1).strip())
|
||||
if self.configurables.get('titlesnarferincludesurl', channel):
|
||||
s += ' (<%s>)' % url
|
||||
irc.reply(msg, 'Title: %s' % s, prefixName=False)
|
||||
irc.reply(msg, s, prefixName=False)
|
||||
titleSnarfer = privmsgs.urlSnarfer(titleSnarfer)
|
||||
|
||||
def _updateTinyDb(self, url, tinyurl, channel):
|
||||
|
@ -124,7 +124,7 @@ def StrType(s):
|
||||
def NoSpacesStrType(s):
|
||||
try:
|
||||
s = StrType(s)
|
||||
if len(s.split(), 1) > 1:
|
||||
if len(s.split(None, 1)) > 1:
|
||||
raise Error
|
||||
return s
|
||||
except Error:
|
||||
@ -154,16 +154,18 @@ def IntType(s):
|
||||
try:
|
||||
return int(s)
|
||||
except ValueError:
|
||||
raise Error, 'Value must be an int.'
|
||||
raise Error, 'Value must be an integer.'
|
||||
|
||||
def PositiveIntType(s):
|
||||
try:
|
||||
i = IntType(s)
|
||||
if i <= 0:
|
||||
if i > 0:
|
||||
return i
|
||||
else:
|
||||
raise Error
|
||||
return i
|
||||
except Error:
|
||||
raise Error, 'Value must be a positive, non-zero integer.'
|
||||
raise Error, 'Value must be a positive integer.'
|
||||
|
||||
|
||||
class Mixin(object):
|
||||
"""A mixin class to provide a "config" command that can be consistent
|
||||
|
Loading…
Reference in New Issue
Block a user