You can also access the chat features via some Perl functions of the chat plugin. Here is a list of these functions:
chat::call(host
, [port
])
Tries connection to host
, on
port port
(or 4050, if not specified), using
the MudMaster protocol.
chat::zcall(host
, [port
])
Tries connection to host
, on
port port
(or 4050, if not specified), using
the zChat protocol.
chat::accept([port
])
Starts listening for chat connections on the given port (or 4050 if not specified).
chat::noaccept()
Stops listening for chat connections.
chat::setname(nickname
)
Sets the nickname used in chat sessions.
chat::setcolor(code
)
Sets the color used in chat sessions.
code
is a color code as recognized by the colorize
function
chat::chat(name
, text
)
Sends text
to
name
.
chat::emote(name
, text
)
Sends text
as an emote to
name
.
chat::chatall(text
)
Sends text
to all chat
connections.
chat::emoteall(text
)
Sends text
as an emote to all
chat connections.
chat::group(name
, group
)
Makes the chat connection with
name
a member of the group
group
.
chat::chatgroup(group
, text
)
Sends text
to all connections
that are members of the group
group
.
chat::emotegroup(group
, text
)
Sends text
as an emote to all
connections that are members of the group
group
.
chat::ping(name
)
Pings the other peer. If the connection is alive, they will reply to this request. Additionally, the time for the reply to be received is displayed.
chat::sendfile(name
, [file
])
Attemps to send a file to the peer. If you do not specify the file, a dialog will be displayed for you to select the file to send. The file will be offered. If they accept, the file transfer will start.
chat::stopfile(name
)
Stops the file transfer currently in progress.
chat::snoop(name
)
Asks name
if you can snoop
them, that is, see everything they see in their MUD session. If they
accept, everything they see will be sent to you and
displayed.
chat::setallowsnoop(name
, value
)
Sets whether name
can snoop you,
that is, wheter they can see everything you see in your MUD session,
according to value
. By default snooping is
disabled.
chat::info(name
)
Shows some information about the chat session.
chat::setstripansi(name
, value
)
Sets whether to trip ANSI color codes in messages
received from name
, according to
value
. If they are, colors sent by the peer
will not be displayed, and that even incoming messages will be
displayed in your chat color.
chat::hangup(name
)
Stops the chat session with
name
. You will need to connect again to
continue talking.