@notify registers a listener inside the viewer. Each time a restriction is added or removed (by any object), and when certain avatar events happen, the viewer says a short report on the given channel. A filter word limits the reports to those that contain it.
@notify:<channel>[;<filter>]=<add|rem>
=n/=y work the same as =add/=rem. Each distinct notify:<channel>;<filter> string is stored as a separate restriction of the calling object, so an object can hold several listeners.
;-separated token after the channel is used; further tokens are ignored. The filter is lower-cased along with the rest of the command.Reports are sent with a leading /, which keeps the avatar from accidentally emitting a @ command:
| Event | Report |
|---|---|
| A restriction is added | /<behaviour>[:<option>]=n |
A restriction is removed (=y/=rem) | /<behaviour>[:<option>]=y |
@clear / @clear=<filter> | /clear or /clear:<filter> (no =), followed by one /…=y per removed restriction |
| Clothing worn / removed | /worn legally <layer>, /unworn legally <layer> |
| Attachment attached | /attached legally <point>, /attached illegally <point>, /reattached legally <point> |
| Attachment detached | /detached legally <point>, /detached illegally <point> |
| Sitting | /sat object legally <uuid>, /unsat object legally|illegally <uuid>, /sat ground legally, /unsat ground legally|illegally |
| Inventory offer from an object | /accepted_in_rlv inv_offer <folder>, /accepted_in_inv inv_offer <folder>, /declined inv_offer <folder> |
Reports don't say which object caused the change.
remove() calls notify(…, "=y") before searching for the restriction, so @fly=y from an object that never sent @fly=n still produces /fly=y.@notify:2222;tp=add also fires for sittp, tplocal, and even notify:5555;tp itself.@notify is itself reported to the other notify listeners that are already registered. A listener never sees its own creation, because the report is sent before the new rule is inserted.@setenv_…=force, @setdebug_…=force, @sit:…=force and @tpto:…=force temporarily lift the issuing object's own matching restriction (setenv, setdebug, sittp, tploc, tplocal, unsit) and re-add it, which produces a /…=y then /…=n pair. Also, @setsphere_…=force is stored as a restriction and reported as =n.@clear).integer CH = 4711;
default
{
state_entry()
{
llListen(CH, "", llGetOwner(), "");
// Watch only lock/unlock activity on attachments
llOwnerSay("@notify:" + (string)CH + ";detach=add");
}
listen(integer c, string n, key id, string msg)
{
// e.g. "/detach=n", "/detach:spine=y", "/detached legally chest"
llOwnerSay("RLV event: " + msg);
}
}
RRInterface::notify (RRInterface.cpp:1648-1684) scans all stored restrictions for ones that begin with notify:, splits the remainder on ;, and sends "/" + action + suffix through answerOnChat if there is no filter or action.find(filter) != -1.add (1251, only when isAllowed, i.e. not a duplicate), remove (1380, unconditionally), clear (1507 and 1516), and the setsphere parameter cleanup (1456). Event reports come from llviewerjointattachment.cpp, llagentwearables.cpp, llvoavatar.cpp and llviewermessage.cpp, with an empty suffix.add exempts notify itself (1254), so the user's blacklist can never contain notify.notify as a non-blacklistable "miscellaneous" command."sat object legally " (with a trailing space) plus the UUID as the suffix. CoolVL calls notify("sat object legally", uuid) with no trailing space (llvoavatar.cpp:6634), so CoolVL's report probably reads /sat object legally<uuid> with no space. The same applies to the unsat object reports.answerOnChat truncates one character earlier (1022/253 instead of 1023/254).This command works differently from RLVa's @notify; see the comparison.