def func(self): "Implements command" if not self.args: self.caller.msg("Usage: @wall <message>") return message = '%s shouts "%s"' % (self.caller.name, self.args) self.msg("Announcing to all connected players ...") SESSIONS.announce_all(message)
def func(self): "Implements command" if not self.args: self.caller.msg("Usage: @wall <message>") return message = "%s shouts \"%s\"" % (self.caller.name, self.args) self.msg("Announcing to all connected players ...") SESSIONS.announce_all(message)
def func(self): """ Reload the system. """ reason = "" if self.args: reason = "(Reason: %s) " % self.args.rstrip(".") SESSIONS.announce_all(" Server restarting %s..." % reason) SESSIONS.server.shutdown(mode='reload')
def func(self): "Define function" try: session = self.caller.sessions[0] except Exception: return self.caller.msg('Shutting down server ...') announcement = "\nServer is being SHUT DOWN!\n" if self.args: announcement += "%s\n" % self.args logger.log_infomsg('Server shutdown by %s.' % self.caller.name) SESSIONS.announce_all(announcement) SESSIONS.portal_shutdown() SESSIONS.server.shutdown(mode='shutdown')
def func(self): "Define function" try: # Only allow shutdown if caller has session self.caller.sessions[0] except Exception: return self.msg('Shutting down server ...') announcement = "\nServer is being SHUT DOWN!\n" if self.args: announcement += "%s\n" % self.args logger.log_infomsg('Server shutdown by %s.' % self.caller.name) SESSIONS.announce_all(announcement) SESSIONS.portal_shutdown() SESSIONS.server.shutdown(mode='shutdown')
def func(self): "Define function" try: # Only allow shutdown if caller has session self.caller.sessions[0] except Exception: return self.msg("Shutting down server ...") announcement = "\nServer is being SHUT DOWN!\n" if self.args: announcement += "%s\n" % self.args logger.log_infomsg("Server shutdown by %s." % self.caller.name) SESSIONS.announce_all(announcement) SESSIONS.portal_shutdown() SESSIONS.server.shutdown(mode="shutdown")
def func(self): """ Reload the system. """ SESSIONS.announce_all(" Server resetting/restarting ...") SESSIONS.server.shutdown(mode='reset')