The online racing simulator
Avoid receiving MCI and/or NLP
Hi!
Maybe it was written but after 6 hours with PHP code of plugin it's hard to see anything. How can I avoid receiving MCI and/or NLP packets. Sometimes we don't need both but only one and sometimes we don't need any of this packets. So?

I thought to set pps = 0 but it will probably show error about Division by 0. I don't have server to test it now.
I guess that passing "0" instead of "ISF_MCI" or "ISF_NLP" in IS_ISI packet should tell LFS not to send any of those packets.
Is PRISM is line:
Quote :
$ISP->Flags = (isset($this->Flags) && $this->Flags > 0) ? $this->Flags : ISF_MSO_COLS | ISF_MCI;

I think dla it shouldn't have the last flag | ISF_MCI. Then it will be possible to enable mci in .ini files.
Quote from misiek08 :Is PRISM is line:

I think dla it shouldn't have the last flag | ISF_MCI. Then it will be possible to enable mci in .ini files.

Ok, in the next version I'll just check that the Flags are set, not if they are greater then 0, and I'll remove MCI's from the list of default packets.

So change that line you posted to this:

$ISP->Flags = (isset($this->Flags)) ? $this->Flags : ISF_MSO_COLS;

Quote from Dygear :Ok, in the next version I'll just check that the Flags are set, not if they are greater then 0, and I'll remove MCI's from the list of default packets.

So change that line you posted to this:

$ISP->Flags = (isset($this->Flags)) ? $this->Flags : ISF_MSO_COLS;


ok if you do this what would i have to do to make my cruise work again? being that you are turning off one of the key packets for cruise. :P
If I didn't miss anything you should add in hosts.ini:
Quote :
flags = 40

Because 8 + 32 = 40 from this definitions:
Quote :#define ISF_RES_0 1 // bit 0 : spare
#define ISF_RES_1 2 // bit 1 : spare
#define ISF_LOCAL 4 // bit 2 : guest or single player
#define ISF_MSO_COLS 8 // bit 3 : keep colours in MSO text
#define ISF_NLP 16 // bit 4 : receive NLP packets
#define ISF_MCI 32 // bit 5 : receive MCI packets

I'm waiting for changing the $ISP->Flags definition in next PRISM version because console with 4239489238492348 packets it's hard to read and if someone is going to do LFS Mail based on PRISM then for 1000 hosts it could be terrible to have enabled MCI packets. It could be big traffic...
Quote from misiek08 :If I didn't miss anything you should add in hosts.ini:

Because 8 + 32 = 40 from this definitions:

I'm waiting for changing the $ISP->Flags definition in next PRISM version because console with 4239489238492348 packets it's hard to read

It would be just 8, as I'm removing MCI from the default setup. I don't think any plugins require it within the base system. (That does remind me that I should ensure that if a plugin does require a packet, it show throw a warning letting the user know it needs that packet for the servers it's connected too.)

Quote from misiek08 :and if someone is going to do LFS Mail based on PRISM then for 1000 hosts it could be terrible to have enabled MCI packets. It could be big traffic...

That would be impressive!
@Dygear. I was responding to @T3charmy question about: how to receive MCI packets again in new version of PRISM.

Can u make an subversion because I wonna have synced folder with newest, official version. Make it 0.3.3.1 pls.
Quote from misiek08 :Can u make an subversion because I wonna have synced folder with newest, official version. Make it 0.3.3.1 pls.

I don't do patch levels, the next version is going to be 0.3.4, but you'll be fine just chaging that line and waiting for me to get to it with the next update. (Keeping in mind that I am doing a TON of hospital rotations right now to get Paramedic school out of the way.)
Quote from misiek08 :if someone is going to do LFS Mail based on PRISM then for 1000 hosts it could be terrible to have enabled MCI packets. It could be big traffic...

i am actually making something like this... it would sync between team website and LFS chat VIA Prism...

but i would also make it so it syncs like an actual email type system VIA Prism & Team forums PM system... so it would appear as a Email type thing inside LFS... the forums would still look like forums PM ... unless i went and made a separate page which uses the same exact idea as the one included in PHPBB (only one that i plan to make it for) itself and just made it look more like Email... either way... will be intresting :P
@Dygear - if I understood PRISM code good I can write in hosts.ini flags=8 and it will overwrite your code. So this is way to avoid MCI packets. Sry for creating problem but defining MCI receive flag at default is good only for part of PRISM users.
Quote from misiek08 :@Dygear - if I understood PRISM code good I can write in hosts.ini flags=8 and it will overwrite your code. So this is way to avoid MCI packets. Sry for creating problem but defining MCI receive flag at default is good only for part of PRISM users.

Yes, the settings file will of course be honored.
The settings file isn't honored. Look at it please. You have only 1 line with Flags. There is no place where you get it from settings file and set into InsimConnection class.
Quote from misiek08 :The settings file isn't honored. Look at it please. You have only 1 line with Flags. There is no place where you get it from settings file and set into InsimConnection class.

Please submit the bug to github, and I'll take care of it in the next update.
This has been fixed with 0.3.4.
Thanks. You can delete topic.
No, I'm going to keep them as a sort of change log. But glad to see it was resolved.

FGED GREDG RDFGDR GSFDG