Fixed parsing in option command and inputfunction to properly handle options set in both ways.

This commit is contained in:
Griatch 2016-04-06 17:02:28 +02:00
parent 043be6dba4
commit a1c89d615e
2 changed files with 30 additions and 12 deletions

View file

@ -463,8 +463,11 @@ class CmdOption(MuxPlayerCommand):
name = self.lhs.upper()
val = self.rhs.strip()
do_sync = False
if val and name in validators:
do_sync = update(name, val, validators[name])
else:
self.session.msg("|rNo option named '|w%s|r'." % name)
if do_sync:
self.session.sessionhandler.session_portal_sync(self.session)