Unix: Use converter to enforce "no spaces" for spell's argument.

Closes: Sf#3064304
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2010-09-20 19:44:01 -04:00
parent 89df85c3b3
commit ca56575eb5

View File

@ -1,6 +1,6 @@
###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2008-2009, James Vega
# Copyright (c) 2008-2010, James Vega
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -137,9 +137,6 @@ class Unix(callbacks.Plugin):
if word and not word[0].isalpha():
irc.error('<word> must begin with an alphabet character.')
return
if ' ' in word:
irc.error('Spaces aren\'t allowed in the word.')
return
try:
inst = subprocess.Popen([spellCmd, '-a'], close_fds=True,
stdout=subprocess.PIPE,
@ -181,7 +178,7 @@ class Unix(callbacks.Plugin):
else:
resp = 'Something unexpected was seen in the [ai]spell output.'
irc.reply(resp)
spell = wrap(spell, ['something'])
spell = wrap(spell, ['somethingWithoutSpaces'])
def fortune(self, irc, msg, args):
"""takes no arguments