The online racing simulator
Release: LFSLapper V7.0.9.6
Hello Lapperusers,

Probably my last update, going back to scripting again. Sourcecode is available.

A new version is available which contains few discord functions for modify BOT created Messages and Embeds
Its also possible to move a textfile from orginal location to a another by entering the correct paths.

Scawen introduced a new InsimPacket to Ban IPAddresses. Not sure, if it only counts for 0.7F servers and beyond.

These Banned IP adresses won't be displayed on your hosting page @ www.lfs.net/hosting.
The list of banned IP's will be active when you restart your insim. But to get the list of banned IP's. You need to set them and request the list again after insim restart.
To unban a IP, delete the IP Address from the list before sending it.

Here is a summary of changes.

---------------------------------------------------------------+
|Changes from 7.0.9.5 to 7.0.9.6
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: Discord Function: EditDiscordMessage();

NOTE: Only messages created by BOTS can be edited!!!

$Message = "";
$ChannelID = "";
$MessageID = "";
Editdiscordmessage($ChannelID,$MessageID,$Message);

2: Discord Function: EditDiscordEmbed();

NOTE: Only EmbedMessages created by BOTS can be edited!!!

$ChannelID = ""; #ChannelID of the server, where you discordbot is connected to.
$MessageID = ""; #MessageID of embed that need to be changed
$Title = ""; #Title of Embed
$Desc = ""; #Description of Embed
$Color = "0xFF0000";

#%nf% to create a new field "Field1 %nf% Field2 %nf% Field3
$FieldTitle = "";
$FieldValue = "";
$FieldInline = "True"; #True of False

#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "";

#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "";

#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "https://www.lfsworld.net/isonline.bass-driver";
EditDiscordEmbed($ChannelID,$MessageID,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);

3: File Function MoveFile();
#Move your textfile to a new location.
$OriginalPath = "";
$DestinationPath = "";
MoveFile($OriginalPath,$DestinationPath);


4: New Function: SetIPBans();
#Unban a IP by removing the IP from the list and execute SetIPBans() again. It will overwrite the current list.

SetIPBans("127.0.0.1,192.169.232.222");

5: New Function: GetIPBans();
#Chance is to execute the function twice to get info.

$List = GetIPBans();

privmsg("IPBanCount:". $List["NrOfIPbans"]);
FOR($ip=0;$ip<$List["NrOfIPbans"];$ip=$ip+1)
privmsg("Banned IP:". $List[$ip,"IPAddress"]);
ENDFOR


=================================================
Update:
=================================================

1: Updated many libraries.

=================================================
Fix:
=================================================
1: SendDiscordEmbed() didn't execute when fieldtitle or fieldvalues values are empty.

Attached files
LFSLapper V7.0.9.6.zip - 7.8 MB - 166 views
Thanks for this update and all the work you did for Lapper.
Hopefully someone will take over, so that this wonderful program will keep receiving updates and bugfixes.

FGED GREDG RDFGDR GSFDG