#.mudpy.process.daemon: true
#.mudpy.process.pidfile: mudpy.pid
+.mudpy.timing.idle.disconnect.active: 6048000
+.mudpy.timing.idle.disconnect.default: 6000
+.mudpy.timing.idle.disconnect.entering_account_name: 600
+.mudpy.timing.idle.warn.active: 5040000
+.mudpy.timing.idle.warn.default: 5000
+.mudpy.timing.idle.warn.entering_account_name: 500
+.mudpy.timing.increment: 0.1
+.mudpy.timing.save: 600
+.mudpy.timing.status: 6000
+
internal:storage:
default_dir: "data"
#root_path: "."
search_path: [ "", "etc", "share", "data" ]
-
-internal:time:
- definition_d: 24h
- definition_h: 60mi
- definition_mi: 10r
- definition_mo: 28d
- definition_r: 6
- definition_w: 7d
- definition_y: 12mo
- frequency_log: 6000
- frequency_save: 600
- linkdead: { "default": 6000, "entering_account_name": 600, "active": 6048000 }
- idle: { "default": 5000, "entering_account_name": 500, "active": 5040000 }
- increment: 0.1
def check_idle(self):
"""Warn or disconnect idle users as appropriate."""
idletime = universe.get_time() - self.last_input
- linkdead_dict = universe.categories["internal"]["time"].get(
- "linkdead"
- )
+ linkdead_dict = universe.contents[
+ "mudpy.timing.idle.disconnect"].facets()
if self.state in linkdead_dict:
linkdead_state = self.state
else:
log(logline, 2)
self.state = "disconnecting"
self.menu_seen = False
- idle_dict = universe.categories["internal"]["time"].get("idle")
+ idle_dict = universe.contents["mudpy.timing.idle.warn"].facets()
if self.state in idle_dict:
idle_state = self.state
else:
if not universe.categories["internal"]["counters"].get("mark"):
log(str(len(universe.userlist)) + " connection(s)")
universe.categories["internal"]["counters"].set(
- "mark", universe.categories["internal"]["time"].get(
- "frequency_log"
- )
+ "mark", universe.contents["mudpy.timing"].get("status")
)
else:
universe.categories["internal"]["counters"].set(
if not universe.categories["internal"]["counters"].get("save"):
universe.save()
universe.categories["internal"]["counters"].set(
- "save", universe.categories["internal"]["time"].get(
- "frequency_save"
- )
+ "save", universe.contents["mudpy.timing"].get("save")
)
else:
universe.categories["internal"]["counters"].set(
)
# pause for a configurable amount of time (decimal seconds)
- time.sleep(universe.categories["internal"]
- ["time"].get("increment"))
+ time.sleep(universe.contents["mudpy.timing"].get("increment"))
# increase the elapsed increment counter
universe.categories["internal"]["counters"].set(
.mudpy.process.daemon: true
.mudpy.process.pidfile: var/mudpy.pid
+.mudpy.timing.idle.disconnect.active: 6048000
+.mudpy.timing.idle.disconnect.default: 6000
+.mudpy.timing.idle.disconnect.entering_account_name: 600
+.mudpy.timing.idle.warn.active: 5040000
+.mudpy.timing.idle.warn.default: 5000
+.mudpy.timing.idle.warn.entering_account_name: 500
+.mudpy.timing.increment: 0.1
+.mudpy.timing.save: 5
+.mudpy.timing.status: 25
+
internal:storage:
default_dir: "data"
#root_path: "."
search_path: [ "", "etc", "share", "data" ]
-
-internal:time:
- definition_d: 24h
- definition_h: 60mi
- definition_mi: 10r
- definition_mo: 28d
- definition_r: 6
- definition_w: 7d
- definition_y: 12mo
- frequency_log: 25
- frequency_save: 5
- linkdead: { "default": 6000, "entering_account_name": 600, "active": 6048000 }
- idle: { "default": 5000, "entering_account_name": 500, "active": 5040000 }
- increment: 0.1