"""Escapes replacement macros in text."""
return text.replace("$(", "$_(")
-def check_time(frequency):
- """Check for a factor of the current increment count."""
- if type(frequency) is str:
- frequency = universe.categories["internal"]["time"].getint(frequency)
- if not "counters" in universe.categories["internal"]:
- Element("internal:counters", universe)
- return not universe.categories["internal"]["counters"].getint("elapsed") % frequency
-
def on_pulse():
"""The things which should happen on each pulse, aside from reloads."""
# update the log every now and then
if not universe.categories["internal"]["counters"].getint("mark"):
- universe.save()
+ log(str(len(universe.userlist)) + " connection(s)")
universe.categories["internal"]["counters"].set("mark", universe.categories["internal"]["time"].getint("frequency_log"))
else: universe.categories["internal"]["counters"].set("mark", universe.categories["internal"]["counters"].getint("mark") - 1)