TinTin++ Mud Client Manual
Port
space
Syntax: #port {command} {argument}
space
The #port command is used to create peer to peer connections to other mud clients, including your own, typically for the purpose of updating status windows. If you want someone to connect from another machine you have to exchange ip addresses and port numbers. You can connect to a port using the #session command.
space
#port {init} {name} {port} {file}
space
#port init launches your port. The file argument is optional. The command creates a new session with the given name, which accepts incoming socket connections for the given port.
space
#port {call} {address} {port}
space
Creates a low level remote socket connection.
space
#port {color} {color names}
space
Set the color of port messages, must be a valid color name or color code.
space
#port {dnd}
space
Toggles Do Not Disturb mode, declining new socket connections.
space
#port {group} {name} {group}
space
Assign a socket group. Useless currently, but might become useful in a future update.
space
#port {ignore} {name}
space
Ignore a socket connection.
space
#port {info}
space
Displays some very basic information about the port.
space
#port {name} {name}
space
Change the name of a socket connection.
space
#port {prefix} {text}
space
Change the prefix of port messages.
space
#port {send} {name|all} {text}
space
Send text to socket connection.
space
#port {uninit}
space
Unitialize the port session.
space
#port {who}
space
Show all socket connections.
space
#port {zap}
space
Close a socket connection.
space
Example:
#event {PORT CONNECTION}
{
    #if {"%1" != "127.0.0.1"}
    {
        #port send {%0} {<118>Sorry, only accepting connections from local host.<088>};
        #port zap {%0}
    }
}
space
This example sets up an event to only allow IPs that connect from local host.
space
Example:
#nop Launch tt++ in a new terminal and execute:

#port init commwindow 4052
#port prefix {}

#nop In your mud session running in a different terminal execute:

#gts #ses comms localhost 4052
#act {~%* chats '%*'} {#comms #send {%0}}
#showme <128>Bubba chats 'Testing if this works'
space
This example sets up a comms window to display chats. When you create a new session it becomes the active session, by using #gts (startup session) the active session returns to the original session after the command is executed.
space
If the above explanation doesn't make sense the following might: You have a session named 'mud' which executes #gts {argument}. As #gts is an unknown command tintin checks if 'gts' is a session name, as this is the case it temporarily actives gts and executes the argument, after the argument is executed tintin re-actives the calling session, in this case the session named 'mud'.
space
See also: All, Run, Session, Session Name, Snoop, SSL and Zap.
space