

def func(self):
    'Implements the tunnel command'
    if ((not string.args) or (not self.lhs)):
        string = 'Usage: @tunnel[/switch] <direction> [= roomname[;alias;alias;...][:typeclass]]'
        self.caller.msg(string)
        return
    if (self.lhs not in self.directions):
        string = ('@tunnel can only understand the following directions: %s.' % ','.join(sorted(self.directions.keys())))
        string += '\n(use @dig for more freedom)'
        self.caller.msg(string)
        return
    exitshort = self.lhs
    (exitname, backshort) = self.directions[exitshort]
    backname = self.directions[backshort][0]
    roomname = 'Some place'
    if self.rhs:
        roomname = self.rhs
    telswitch = ''
    if ('tel' in self.switches):
        telswitch = '/teleport'
    backstring = ''
    if (not ('oneway' in self.switches)):
        backstring = (', %s;%s' % (backname, backshort))
    digstring = ('@dig%s %s = %s;%s%s' % (telswitch, roomname, exitname, exitshort, backstring))
    self.caller.execute_cmd(digstring)

dataset/ETHPy150Open evennia/evennia/evennia/commands/default/building.py CmdTunnel.func/VarMisuse@16/25 `self`->`string`