The online racing simulator
MTC restriction? (InSim)
(17 posts, started )
MTC restriction? (InSim)
I'm sending 20 messages one after another through Insim and after about 10 the server blocks the connection and won't let the app connect again.

Is there a restriction on the amount of messages you can send in a certain amount of time?
I would not think that InSim would implement a spam protection mechanism, seeing as you have to have the admin password to connect to it. I'll do some testing now. . .
I'm using filur's lurLFSd if that helps.
Really?!? He released it?

Alright, I'm going to use this plugin for testing then, with Patch V ... of the dedicated server ...


<?php 
php
    
/*#updinfo
        version    0.0.0.1
        saveto    plugins
    */

    
$this->register('spam');
    
$this->attach('spam'NULL'NPL''spamTime');

    class 
spam {
        function 
__construct($parent) {
            
$this->parent $parent;
            
$this->splits = array();
        }
        function 
spamTime() {
            for (
$i 0$i 20$i++) {
                
$this->parent->send('MTC'0NULLNULLNULL"!!!Spam!!!");
            }
        }
    }
?>

The code I'm using seems to work fine ... Sent 20 messages, but I only see 16, think that's due to the buffer. Should be ok ...
It's not been released yet, I got a copy from filur though.
Quote from Leifde :It's not been released yet, I got a copy from filur though.

Alright . Anyway, as you can see the code works fine.
Could you post the code your using?
I'll PM it to you, I'd rather not post it here for all to see.

EDIT: I've just tried your code and it seems to be the server, not Insim or my code. I'll ask 500servers about it then
#9 - filur
Quote from Dygear :Really?!? He released it?

:Kick_Can_ :juggle:

I actually worked on some insim code today! ... in Ruby
It sends 11 messages to the server then gets locked out. I'll contact 500servers tomorrow.

EDIT: Do you think this could have anything to do with the server being 11 slots?
Quote from filur ::Kick_Can_ :juggle:

I actually worked on some insim code today! ... in Ruby

SAY IT AIN'T SO!

Quote from Leifde :It sends 11 messages to the server then gets locked out. I'll contact 500servers tomorrow.

EDIT: Do you think this could have anything to do with the server being 11 slots?

I might ... I would have to see some code to have an idea what is going on.
Code attached. Password in PM Dygear.
Attached files
dannything.rar - 2.8 KB - 119 views
Forced to go to a party, and now I'm extremely sleepy, so I'll look at this in the morning.
I was also working on some InSim stuff (starting tool for running starts), and was trying to use MTC packets as well, but couldn't get it to work at all... Didnt work in MPR, multiplayer server or single player.


public void sendMTC (String mes, int uId)
{
byte[] temp = new byte[68];
Arrays.fill(temp, (byte)0);

temp[0] = (byte)'M';
temp[1] = (byte)'T';
temp[2] = (byte)'C';
temp[3] = (byte)0;

temp[4] = (byte)0;
temp[5] = (byte)uId;

for (int i=0; i < Math.min (mes.length(), 64); i++)
temp[i+8] = (byte)mes.charAt(i);

temp[67] = (byte)0;

for (int i=0; i < temp.length; i++)
System.out.print ((char)temp[i]);

System.out.println ("\n" + uId);

IO_OUT.sendPacket.setData(temp);
IO_OUT.send();
}

It's Java code and pretty nasty, but it works in a very similar way for MST packets. The MTC messages are supposed to pop up in the chat area, correct?
MTC packets are like an admin typing /msg <insert message> but with the message only appearing for a certain player. I think that makes sense.

MST packets are like an admin typing /msg <insert message> where the message appears for everyone.

I don't know about constructing the packet for MTC, I'm using an API so I've never done any of the actual connecting and sending. I would guess that there's something wrong with your code. I'll try finding what the packet should look like.

EDIT: @Dygear - ok, no problem, I'm not really bothered when it gets fixed.

EDIT2:
MTC ☺ ^7Welcome to the server!

That is sent to Insim for MTC packets, try comparing it to what your app sends Frank.
Looks very similar, even the smiley is the same.
There's probably some MTC stuffs in JInSim

MTC restriction? (InSim)
(17 posts, started )
FGED GREDG RDFGDR GSFDG