DigiTechs wrote:
lallaway12 wrote:
Anybody on?
i'm on - and so is ohaider - we were just testing some chatbombs (mine's the spamming kind, his is the disconnecting kind) -- It was his idea, so don't blame me
I was talking to you (with FilterKeys on *facepalm*) and you were BOTS!
Offline
If you can't delete rooms, then just leave them. In about a month, I'm sure Chat.PY 3.0 will be out and we'll probably start fresh.
For the latency idea, create a variable called "Latency" then add the 'reset timer' block under the broadcast in the main script, then in the new_message script, at the bottom of it, add 'set Latency to (timer)'.
Latency is mostly a client side thing, but I'll add it to the Chat.PY 3.0 client. It would be interesting to know how long it took to send the last message.
Offline
zippynk wrote:
Server is down.
Up now.
Offline
Sorry if I broke anything. I was testing a new feature on my MeshServe application, and things went badly wrong...
Edit: Is it meant to be constantly sending the byte 0, or is that a bug in my code?
Last edited by TheSuccessor (2012-08-15 14:42:59)
Offline
TheSuccessor wrote:
Sorry if I broke anything. I was testing a new feature on my MeshServe application, and things went badly wrong...
Edit: Is it meant to be constantly sending the byte 0, or is that a bug in my code?
Could you explain, and possibly post your code?
Offline
Magnie wrote:
Could you explain, and possibly post your code?
I'm currently working on this mesh server, and an upcoming feature is (probably) going to be using the server to connect to another mesh server, such that mine is effectively used as either a proxy, or a method of grouping multiple clients as one.
I was testing the feature with your server, and mine broke. Hopefully yours didn't crash, I think mine just got overwhelmed sending data to scratch. In this instance I was using it as a proxy between your project and your server. It's probably a problem with my code, and you needn't bother solving it - I was using your server to test it only because it's almost always up, publicly available and is running on a different computer to mine.
Anyway, here's the code:
Client.java:
package org.domclark.meshserve; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class Client implements Runnable { private static int exceptionBreak = 12; private Server server; private Socket sock; private InputStream in; private OutputStream out; private boolean muted; private boolean running; private Thread listener; public Client(Server server, Socket sock){ this.server = server; this.sock = sock; this.muted = false; try { in = sock.getInputStream(); out = sock.getOutputStream(); } catch (IOException e) { e.printStackTrace(); } } public void listen(){ running = true; listener = new Thread(this, "Client listener for " + ip() + ":" + port()); listener.start(); } public void write(String s){ byte[] string = s.getBytes(); int size = string.length; byte[] sizefield = new byte[]{ (byte) ((size >> 24) & 0xff), (byte) ((size >> 16) & 0xff), (byte) ((size >> 8) & 0xff), (byte) (size & 0xff) }; try { out.write(sizefield); out.write(string); } catch (IOException e) { e.printStackTrace(); } } public void close(){ running = false; try { out.close(); sock.close(); if(listener.isAlive() && Thread.currentThread() != listener) listener.join(); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } public void run(){ int exceptions = 0; byte[] sizefield = new byte[4]; byte[] buf = new byte[128]; while(running){ try { in.read(sizefield, 0, 4); int size = (sizefield[0] & 0xff) << 24 | (sizefield[1] & 0xff) << 16 | (sizefield[2] & 0xff) << 8 | (sizefield[3] & 0xff); if(buf.length < size) buf = new byte[size]; in.read(buf, 0, size); server.input(this, new String(buf, 0, size)); exceptions = 0; } catch (IOException e) { if(e.getMessage().equals("Connection reset")){ server.removeConnection(this); return; } if(running && exceptions == 0) e.printStackTrace(); if(++exceptions >= exceptionBreak) running = false; } } } public String ip(){ return sock.getInetAddress().getHostAddress(); } public int port(){ return sock.getPort(); } public void setMuted(boolean muted){ this.muted = muted; } public boolean isMuted(){ return muted; } protected void finalize(){ running = false; try { out.close(); sock.close(); } catch (IOException e) { e.printStackTrace(); } } }
Server.java:
... try { Socket s = new Socket("scratch.playfultest.tk", MESH_PORT); host = new Client(this, s); host.listen(); gui.clientUpdated(true); } catch (UnknownHostException e) { gui.log("Failed to connect"); e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } ...
(MESH_PORT is 42001, obviously. The exceptionBreak and similar in the client just causes the server to give up after 12 consecutive exceptions on the input stream.)
Offline
zippynk wrote:
Also, what's the room called "danger"?
DigiTechs wrote:
we were just testing some chatbombs
Need I say more?
Offline
Everyone wants to go on!
I hope
Last edited by ohaiderstudios (2012-08-22 19:13:03)
Offline
Is there link to the CHAT here? I can't find it...or maybe I;m just stupid.
Offline
mythbusteranimator wrote:
Is there link to the CHAT here? I can't find it...or maybe I;m just stupid.
First download this project
Then, do either of the following:
1) Join mesh to scratch.playfultest.tk
2) Enable remote sensor connections (by right-clicking the sensor value block) and click here
Alternate Methods:
1) Windows Application (EXE)
2) Online Version (not very reliable)
DISCLAIMER: I tried to paraphrase Magnie's post, to not copy it exactly, but I may have failed in some places. So there might be some direct quotes that I don't know of.
Offline
What is a chatbomb?
Offline
playzooki wrote:
What is a chatbomb?
Sending a ton of messages in a small amount of time.
Offline
Magnie wrote:
playzooki wrote:
What is a chatbomb?
Sending a ton of messages in a small amount of time.
Cool I made one, tested it in danger AND IT WORKS. it posted 2352 messages in 71 seconds.(33.12676056338028 per sec)
BTW Its lonely.
Last edited by playzooki (2012-08-24 15:59:42)
Offline
Magnie wrote:
playzooki wrote:
What is a chatbomb?
Sending a ton of messages in a small amount of time.
Or disconnecting everyone in the room.
Offline
ohaiderstudios wrote:
Magnie wrote:
playzooki wrote:
What is a chatbomb?
Sending a ton of messages in a small amount of time.
Or disconnecting everyone in the room.
How do you do that?
Offline
playzooki wrote:
ohaiderstudios wrote:
Magnie wrote:
Sending a ton of messages in a small amount of time.
Or disconnecting everyone in the room.
How do you do that?
It's a mod-only command. (And mods using it for a chatbomb is usually considered mod power abuse. I think.)
Last edited by zippynk (2012-08-24 18:49:09)
Offline
zippynk wrote:
playzooki wrote:
ohaiderstudios wrote:
Or disconnecting everyone in the room.How do you do that?
It's a mod-only command. (And mods using it for a chatbomb is usually considered mod power abuse. I think.)
Without full consent from all connected parties, yes
Offline
I have created... THE DANGER SERVER!!!
It's a Chat.PY server for testing chatbombs.
danger.thegt.org
Offline
Is anyone else having problems connecting to scratch.playfultest.tk?
Offline
ohaiderstudios wrote:
Is anyone else having problems connecting to scratch.playfultest.tk?
Yeah, the server must be down.
Offline