From e78a754c692203cdffa33e0eeb42f79fb2b05deb Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Sun, 10 Oct 2010 17:42:26 -0400 Subject: [PATCH] Unix: Use converter to enforce "no spaces" for spell's argument. Closes: Sf#3064304 Signed-off-by: James Vega (cherry picked from commit ca56575eb51995b6a1f768db4afa846f536e1edb) --- 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 5428f3d54..874401853 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 @@ -139,9 +139,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, @@ -183,7 +180,7 @@ class Unix(callbacks.Plugin): else: resp = 'Something unexpected was seen in the [ai]spell output.' irc.reply(resp) - spell = thread(wrap(spell, ['something'])) + spell = thread(wrap(spell, ['somethingWithoutSpaces'])) def fortune(self, irc, msg, args): """takes no arguments