mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +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>
(cherry picked from commit ca56575eb5
)
This commit is contained in:
parent
4d84798fb8
commit
e78a754c69
@ -1,6 +1,6 @@
|
|||||||
###
|
###
|
||||||
# Copyright (c) 2002-2005, Jeremiah Fincher
|
# Copyright (c) 2002-2005, Jeremiah Fincher
|
||||||
# Copyright (c) 2008-2009, James Vega
|
# Copyright (c) 2008-2010, James Vega
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# 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():
|
if word and not word[0].isalpha():
|
||||||
irc.error('<word> must begin with an alphabet character.')
|
irc.error('<word> must begin with an alphabet character.')
|
||||||
return
|
return
|
||||||
if ' ' in word:
|
|
||||||
irc.error('Spaces aren\'t allowed in the word.')
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
inst = subprocess.Popen([spellCmd, '-a'], close_fds=True,
|
inst = subprocess.Popen([spellCmd, '-a'], close_fds=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
@ -183,7 +180,7 @@ class Unix(callbacks.Plugin):
|
|||||||
else:
|
else:
|
||||||
resp = 'Something unexpected was seen in the [ai]spell output.'
|
resp = 'Something unexpected was seen in the [ai]spell output.'
|
||||||
irc.reply(resp)
|
irc.reply(resp)
|
||||||
spell = thread(wrap(spell, ['something']))
|
spell = thread(wrap(spell, ['somethingWithoutSpaces']))
|
||||||
|
|
||||||
def fortune(self, irc, msg, args):
|
def fortune(self, irc, msg, args):
|
||||||
"""takes no arguments
|
"""takes no arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user