CEIP.update Member

Syntax

object.update();

Returns

Remarks

See Also

Source Code

function ceip_update()
{
var self = this;
function updateAndLogTypes(types)
{
if (self.enabled && (self.types != types.join(",")))
{
self.types = types.join(",");
self.logEvent({type: "logger", event: "types", list: self.types});
}
};
// Find out which CEIP logging types are enabled.
var types = new Array();
var prefs = client.prefManager.listPrefs("ceip.log.");
for (var i = 0; i < prefs.length; i++)
{
if ((typeof client.prefs[prefs[i]] == "boolean") && client.prefs[prefs[i]])
types.push(prefs[i].substr(9));
}
var enabled = (types.sort().length > 0);
// If we're logging currently, and the types have changed, log that change.
updateAndLogTypes(types);
// Start or stop the logging if the overall enabled state has changed.
if (!this.enabled && enabled)
this.startLog();
else if (this.enabled && !enabled)
this.stopLog();
// If we're now logging, and the types have changed, log that change.
// Note that this is done twice to ensure we always have the types logged.
updateAndLogTypes(types);
}