def cmd_lockdown(ch, cmd, arg): '''Usage: lockdown [allowed groups | off] Locks the game for anyone not a member of one of the user groups specified. No argument will list all the user groups locked out of the mud. The off argument will remove all lockdowns.''' if arg == '': lockdown = mudsys.sys_getval("lockdown") if lockdown == '': ch.send("Lockdown is currently off.") else: ch.send("Lockdown is currently to members not of: " + lockdown) ch.send("To turn off lockdown, use {clockdown off{n") elif arg.lower() == "off": ch.send("Lockdown disabled.") mudsys.sys_setval("lockdown", "") # make sure we're not locking ourself out elif not ch.isInGroup(arg): ch.send("You cannot lock yourself out!") else: ch.send("MUD locked down to everyone not in groups: " + arg) mudsys.sys_setval("lockdown", arg) # kick out everyone who we've just locked out for ch in mudchar.char_list(): if ch.is_pc and not ch.isInGroup(arg): ch.send("The mud has just been locked down to you.") mudsys.do_save(ch) mudsys.do_disconnect(ch) extract(ch)
def cmd_pulserate(ch, cmd, arg): '''Usage: pulserate <pulses> Changes the number of pulses the mud experiences each second. The mud makes one loop through the main game handler each pulse. ''' if arg == '': ch.send("The mud currently has " + mudsys.sys_getval("pulses_per_second") + "pulses per second.") else: pulserate = string.atoi(arg) if pulserate == 0 or 1000 % pulse != 0: ch.send("The number of pulses per second must divide 1000.") else: mudsys.sys_setval("pulses_per_second", str(pulserate)) ch.send("The mud's new pulse rate is %d pulses per second." % pulserate)
def cmd_pulserate(ch, cmd, arg): '''Usage: pulserate <pulses> Changes the number of pulses the mud experiences each second. The mud makes one loop through the main game handler each pulse. ''' if arg == '': ch.send("The mud currently has "+mudsys.sys_getval("pulses_per_second")+ "pulses per second.") else: pulserate = string.atoi(arg) if pulserate == 0 or 1000 % pulse != 0: ch.send("The number of pulses per second must divide 1000.") else: mudsys.sys_setval("pulses_per_second", str(pulserate)) ch.send("The mud's new pulse rate is %d pulses per second." % pulserate)