From ca56575eb51995b6a1f768db4afa846f536e1edb Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 20 Sep 2010 19:44:01 -0400 Subject: [PATCH] Unix: Use converter to enforce "no spaces" for spell's argument. Closes: Sf#3064304 Signed-off-by: James Vega --- plugins/Unix/plugin.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index d4da8e070..4e05fe12d 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -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(' 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