From c68e7a07ae670e776da6e1feae911a4c8d334ee0 Mon Sep 17 00:00:00 2001 From: Nicholas Matlaga Date: Wed, 20 Sep 2017 12:54:13 -0400 Subject: [PATCH] limit split to first character --- evennia/commands/default/building.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index 78209f9b61..d0839df349 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -916,6 +916,7 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS): self.caller.msg(string) return + # If we get a typeclass, we need to get just the exitname exitshort = self.lhs.split(":")[0] if exitshort not in self.directions: @@ -929,8 +930,12 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS): exitname, backshort = self.directions[exitshort] backname = self.directions[backshort][0] + # if we recieved a typeclass for the exit, add it to the alias(short name) if ":" in self.lhs: - exit_typeclass = ":" + self.lhs.split(":")[-1] + # limit to only the first : character + exit_typeclass = ":" + self.lhs.split(":", 1)[-1] + # exitshort and backshort are the last part of the exit strings, + # so we add our typeclass argument after exitshort += exit_typeclass backshort += exit_typeclass