Skip to content
This repository
Browse code

fixed docs

  • Loading branch information...
commit 3f40f77cb604e9f4a970e354108e8983e67344a5 1 parent 96b0b8a
Raynos (Jake Verbaten) authored

Showing 3 changed files with 12 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 1 browser/ui/index.js
  2. +5 0 help.json
  3. +3 1 logic.js
5 browser/ui/index.js
@@ -13,7 +13,10 @@ module.exports = UI
13 13 function UI(doc) {
14 14 var world = World(doc)
15 15 var source = "// I am a wizard \n// self.say(self.id())" +
16   - "\n// self.say(Object.keys(self))"
  16 + "\n// self.say(Object.keys(self))" +
  17 + "\n// self.hear(function (message) {" +
  18 + "\n// self.say(message)" +
  19 + "\n// })"
17 20
18 21 var player = {
19 22 id: "wizard:" + NAME.name
5 help.json
@@ -51,4 +51,9 @@
51 51 , "will need to be near them and your"
52 52 , "callback gets called with message and"
53 53 , "id"
  54 + , ""
  55 + , "If you want to be an echo player try"
  56 + , "self.hear(function (message) {"
  57 + , " self.say(message)"
  58 + , "})"
54 59 ]
4 logic.js
@@ -168,7 +168,9 @@ function api (row) {
168 168
169 169 hear: createListener('say', function (f) {
170 170 return function (message, id) {
171   - if(self.whatDist(id).length < 1000) f(message, id)
  171 + if(self.whatDist(id).length < 1000 && id !== self.id()) {
  172 + f(message, id)
  173 + }
172 174 }
173 175 }),
174 176

0 comments on commit 3f40f77

Please sign in to comment.
Something went wrong with that request. Please try again.