mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
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:
parent
89df85c3b3
commit
ca56575eb5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user