diff --git a/plugins/URL.py b/plugins/URL.py index 320e63dc8..2473f1c42 100644 --- a/plugins/URL.py +++ b/plugins/URL.py @@ -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): diff --git a/src/configurable.py b/src/configurable.py index 83ca63617..d71593732 100644 --- a/src/configurable.py +++ b/src/configurable.py @@ -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