Add slightly better handling of de-pluralization

This commit is contained in:
James Vega 2003-10-16 02:42:47 +00:00
parent ddfd7e10e1
commit a428c6fc91

View File

@ -223,7 +223,11 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
fd.close() fd.close()
try: try:
(num, desc) = self._sfTitle.search(s).groups() (num, desc) = self._sfTitle.search(s).groups()
linktype = self._linkType.search(s).group(1)[:-1] linktype = self._linkType.search(s).group(1)
if linktype.endswith('es'):
linktype = linktype[:-2]
else:
linktype = linktype[:-1]
irc.reply(msg, '%s #%s: %s' % (linktype, num, desc)) irc.reply(msg, '%s #%s: %s' % (linktype, num, desc))
except AttributeError, e: except AttributeError, e:
irc.queueMsg(callbacks.reply(msg, irc.queueMsg(callbacks.reply(msg,