[Turn on line numbering]arg @args; var line, who, how, name, dirty; (> .perms(sender(), 'system) <); if (dict_contains(backup, 'started)) { .log("BACKUP CONFLICT"); line = "BACKUP CONFLICT at " + $time.format("%I:%M:%S %p"); line += ", Current backup started at " + $time.format("%I:%M:%S %p", backup['started]); $channel_ui._broadcast('System, line); return; } dirty = .dirty(); [(who ?= sender()), (how ?= 'request)] = args; if (!valid(who)) who = sender(); backup = backup.add('next, time() + backup['interval]); backup = backup.add('last, time()); if (how == 'interval && !dirty) return; catch any { name = who.namef('ref); .log("BACKUP (" + name + ") "); line = "Backup started at " + $time.format("%I:%M:%S %p") + " by " + name; $channel_ui._broadcast('System, line); } // double pause will hopefully let people know about it before it happens pause(); pause(); backup = backup.add('started, time()); (> backup() <);
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit