Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CmdFEdit(default_cmds.MuxCommand):
- """
- Syntax: fedit <object>
- Loads an object description into your MUSH-compatible client's command
- line for fast, easy editing. This should work with pretty much any MUSH
- client, but some require that you create a trigger (TinyFugue, BeipMU,
- MUSHclient, for example).
- """
- key = "fedit"
- aliases = "fugueedit"
- lock = "cmd:all()"
- help_category = "General"
- def func(self):
- if not self.lhs:
- self.caller.msg("Syntax: %s <object>" % self.cmdname)
- return
- what = self.caller.search(self.lhs)
- # Just quit if we didn't find anything. The search will handle the error message.
- if what:
- # Make sure that the caller has permission to modify the object.
- if not what.access(self.caller, "edit"):
- self.caller.msg("You don't have permission to modify the description of that object.")
- else:
- if not what.attributes.has("desc"):
- self.caller.msg("There is no description set on that object.")
- else:
- desc = what.db.desc or '' # just in case
- self.caller.msg("FugueEdit > @desc #%d=%s" % (what.id, desc), options={"raw" : True})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement