Andrew Godwin avatar Andrew Godwin committed 56b6960

Physics does more at once; people don't see themselves when promoted/demoted; can specify the URL in /help.

Comments (0)

Files changed (4)

     and send the changes back to the BlockStore.
     """
     
-    LAG_INTERVAL = 30 # How long between "ack we're lagging" messages
+    LAG_INTERVAL = 60 # How long between "ack we're lagging" messages
     
-    FLUID_LIMIT = 500
-    AIR_LIMIT = 600
+    FLUID_LIMIT = 700
+    AIR_LIMIT = 800
     SPONGE_LIMIT = 50
     GRASS_GROW_LIMIT = 10
     GRASS_DIE_LIMIT = 10

myne/plugins/help.py

                 else:
                     self.client.sendServerMessage("There's no help for that command.")
         else:
-            self.client.sendNormalMessage("Server info: "+COLOUR_PURPLE+"http://archives.aeracode.org")
+            self.client.sendNormalMessage("Server info: "+COLOUR_PURPLE+self.client.factory.info_url)
             self.client.sendServerMessage("For specific help, type /help command")
             self.client.sendServerMessage("For basic help, type /help basics")
             self.client.sendServerMessage("Use @username message for private messaging.")    
     
     def commandCmdlist(self, parts):
         "/cmdlist - Shows a list of all commands."
-        self.client.sendServerList(sorted(self.client.commands.keys()))
+        commands = []
+        for name, command in self.client.commands.items():
+            if getattr(command, "admin_only", False) and not self.client.isAdmin():
+                continue
+            if getattr(command, "op_only", False) and not self.client.isOp():
+                continue
+            if getattr(command, "writer_only", False) and not self.client.isWriter():
+                continue
+            commands.append(name)
+        self.client.sendServerList(sorted(commands))
     
         self.verify_names = self.config.getboolean("server", "verify_names")
         self.control_password = self.config.get("server", "control_password")
         self.physics_limit = self.config.getint("server", "physics_limit")
+        self.info_url = self.config.get("server", "info_url")
         
         # Parse IRC section
         if self.config.has_section("irc"):
         # Create a default world, if there isn't one.
         if not os.path.isdir("worlds/default"):
             logging.log(logging.INFO, "Generating default world...")
-            sx, sy, sz = 96, 160, 32
+            sx, sy, sz = 256, 64, 256
             grass_to = (sy // 2)
             world = World.create(
                 "worlds/default",
                 sx, sy, sz, # Size
                 sx//2,grass_to+2, sz//2, 0, # Spawn
-                [BLOCK_ROCK]*sy#([BLOCK_DIRT]*(grass_to-1) + [BLOCK_GRASS] + [BLOCK_AIR]*(sy-grass_to)) # Levels
+                ([BLOCK_DIRT]*(grass_to-1) + [BLOCK_GRASS] + [BLOCK_AIR]*(sy-grass_to)) # Levels
             )
             logging.log(logging.INFO, "Generated.")
         
                     elif task == TASK_PLAYERRESPAWN:
                         # We need to immediately respawn the player to update their nick.
                         for client in world.clients:
-                            id, username, x, y, z, h, p = data
-                            client.sendPlayerLeave(id)
-                            client.sendNewPlayer(id, username, x, y, z, h, p)
+                            if client != source_client:
+                                id, username, x, y, z, h, p = data
+                                client.sendPlayerLeave(id)
+                                client.sendNewPlayer(id, username, x, y, z, h, p)
                 except Exception, e:
                     logging.log(logging.ERROR, traceback.format_exc())
         except Empty:

server.conf.example

 description: Experimental Multi-World Server
 greeting: Welcome! Type /help for information about use of this server,\nor /random to be taken to a random world.\nMore information is at http://archives.aeracode.org/
 physics_limit: 4
+info_url: http://archives.aeracode.org/
 
 [plugins]
 core:
 messaging:
 hide:
 help:
-
+hill:
 
 #[email]
 #host = localhost
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.