Home

llListen

llListen is a Linden Scripting Language (LSL) function that creates a listener within a script to capture chat messages on a specific channel, with optional filtering by speaker and content. It returns a listen handle that can later be used to remove or control the listener.

The function signature is int llListen(integer channel, string name, key id, string what). The channel parameter

When a message matches all active filters, the script’s listen event is invoked: listen(integer channel, string

Usage and management: llListen returns a handle (an integer) that identifies the listener. The listener can

selects
which
chat
channel
to
listen
to.
The
channel
value
is
an
integer
within
the
valid
LSL
range,
commonly
used
values
include
ordinary
chat
channels
and
special
system
channels.
The
name
parameter
filters
messages
by
the
speaker’s
display
name;
if
name
is
an
empty
string,
messages
from
any
speaker
are
considered.
The
id
parameter
filters
by
the
speaker’s
agent
key;
if
id
is
NULL_KEY,
messages
from
any
speaker
are
considered.
The
what
parameter
filters
by
message
content;
if
what
is
an
empty
string,
messages
are
not
filtered
by
content,
otherwise
only
messages
containing
what
will
trigger.
name,
key
id,
string
msg).
The
channel,
speaker
name,
speaker
id,
and
the
message
text
are
provided
to
the
event
handler.
be
removed
with
llListenRemove(handle).
Listeners
are
subject
to
script
and
engine
limits,
so
multiple
listeners
should
be
used
judiciously.
See
also
llListenControl
for
enabling
or
disabling
a
listener
and
the
listen
event
signature.