marceldev89 / battlenet Goto Github PK
View Code? Open in Web Editor NEWBattlEye Protocol Library and Client
License: GNU Lesser General Public License v3.0
BattlEye Protocol Library and Client
License: GNU Lesser General Public License v3.0
sample:
string kick_params = "9 You are not in whitelist";
SendCommandPacket(EBattlEyeCommand.Kick, kick_params);
and nothing happend
but old version of dll work propertly.
as title suggests π
Hello, iam unable to start the Dart after one of my saved servers was turned off :(
I dont know if it is connected to it somehow or not. I have reinstalled app multipletimes, but still not working... Please help me :(
---------- Info ----------
DaRT v2.2
Time of crash: 11/20/2023 3:43:17 AM
Total used memory: 22 MB / 8069 MB
Threads: 12
---------- Error ----------
Configuration system failed to initialize
---------- StackTrace ----------
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at DaRT.Properties.Settings.get_UpgradeConfig()
at DaRT.GUImain..ctor(String version)
at DaRT.Program.Main(String[] args)
Or at least that's what people have been telling me in the past. If this is still true, I'll fix it. :)
As title suggests π
Hello,
First off thanks for building this library. I've been putting it to extensive work in an application I've written to help manage our Overpoch server.
In my application, BattleNET occasionally loses connection with the server, but then regains connection a few seconds later. Do you have any ideas that could help point me in the right direction as to why this is happening? I'm sure it's some kind of issue with my implementation, but I wanted to check here just to make sure it's not a known bug and to get some ideas.
Thanks!
The issue lies in the fact that the function itself raises the OnDisconnect() event, and the event is raised when the main loop dies as well (DoWork() function).
Simple solution would be to remove the OnDisconnect() event from the BattlEyeClient.Disconnect() function, and let the DoWork() function handle the event.
Hello,
I tried tracing down a problem in DaRT that causes russian symbols to not get shown.
I tried to see where the problem is and I believe it is in BattleNET.
Since it works fine in BERCon I would say RCon is not the problem too, as well as the textbox I am writing to which is already UTF-8.
Could you take a look?
Hello,
I got a few reports that some people are unable to connect.
Since I didn't make any change to the code that could affect this I would believe BattleNET is causing it.
Do you have any idea why this could happen?
Here is one of those reports: http://dayzmod.com/forum/index.php?/topic/68933-dart-a-lightweight-dayz-rcon-tool-v05-11092012/page__st__240#entry852464
Was thinking about a bad internet connection but maybe you know what to do.
It seems that with the new update BattleNET will throw ConnectionFailed if the server goes down while BattleNET is connected.
It should be ConnectionLost or SocketException though.
This may lead to misleading error messages since ConnectionFailed should only be thrown when BattleNET is trying to connect.
Using the latest version of BattleNET, tested with DaRT.
Its possible to send more than 1 say?
I've found that BattlEyeClient will occasionally throw an unhandled ObjectDisposedException in the Receive method, caused by accessing socket.Available when the socket has been disconnected.
I think this happens when the timeoutServer value causes Disconnect to be called, which closes the socket and the receive thread then continues and calls socket.Available. I fixed it by adding another check of Socket.Connected:
if (socket.Connected && packetQueue.Count > 0 && socket.Available == 0)
As stated, the ban event is missing from the enum EBattlEyeCommand. I can't find a use for the "#exec ban" command that is present, and calling the command didn't ban a user. Adding the new commands like so;
[Description("ban")] Ban,
[Description("addBan")] AddBan,
and calling it as specified here http://forums.bistudio.com/showthread.php?96228-BattlEye-GUID-banning worked fine.
Suggested to add above commands to the EBattlEyeCommand enum to simplify the process of banning someone (or fixing it if it's regarded as broken now).
Could we possibly get DNS support in the next version? It's really simple to add something like:
System.Net.IPAddress targetHost = System.Net.Dns.GetHostAddresses(ipOrHostString)[0];
This returns the first address for the given host OR address, so if you give it an IP it'll return the same IP, which obviously means you don't have to figure out if the input is a hostname or an IP.
I realise this can be done just as easily by implementation but it seems to me to be a feature that the library would benefit from.
Okay so I'm not sure if this is an error on my behalf or a bug within the BattleNET library, but here goes.
If I request bans then request players, sometimes it will return a half completed ban list and then the players all as one message. Sometimes it will just return the player list then spam a load of empty \r\n after it like it's trying to load the ban list. This is very annoying as it causes an error when trying to parse the data.
Atm I'm using a 'hacky' fix which is creating a new BE Client and requesting the bans on that, not proud of it but I'm stuck for options atm... I have also tried checking if the queue is > 0 but that didn't seem to help either.
I hope you still support this project, and if not at least get back to me...
Thanks, Mike.
solved... problem caused by own typo..
How to make BattlEyeConnectEvent return string or bool?
Hi,
If i run the tool on windows XP i get:
Connecting to XYZ:2302
Connected!
Logging in...
Disconnected! (Socket Exception)
If i use bercon.exe works fine, so there isnt any problem reaching the host XYZ, any light ? :) thanks !
say -1 is sent twice :(
I'm issuing the 'players' command to then parse the returned player list. The issue is that when doing so, there seems to be a 50/50 chance of the session being disconnected with the error "Disconnected! (Socket Exception)".
Any possibility of dumping the output to a file? maybe command.txt in the working directory? pretty please? :) even stdout would be awesome.
Hi:
Is there a way to get a User's IP when this users logs in or something? Or it should be ok if I call the function BattlEyeClient.SendCommand(BattlEyeCommand.Players)? But if I do the last, how would I get the text? With a StreamReader?
Lots of thanks for your tool,
UngarMax.
Any clue if this is compataible with Windows Phone 7.1/8.0 in C# ?
Greetz
Would it be possible to include support for a proxy?
Since I am online alot behind a proxy alot I can't do anything because BattleNET won't connect.
Best would be if BattleNET would accept a IWebProxy so you could just assign a proxy like this: b.Proxy = proxy;
SocketException: Not enough buffer space is available
System.Net.Sockets.Socket.SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
System.Net.Sockets.Socket.set_ReceiveBufferSize (Int32 value)
BattleNET.BattlEyeClient.Connect () (at Assets/Plugins/BattleNET/BattlEyeClient.cs:68)
If line 68 :
socket.ReceiveBufferSize = Int32.MaxValue;
Is commented out, this stops happening.
I get this on Unity editor, in MacOSX, I am not sure where this problem comes from however.
Is there any reason why this value is assigned by you and not default?
PS: I have had this in the past and I just commented out the line, while forgetting to report it, so I am reporting it now :)
GetMissionsRequest doese not realized
RconClient networkClient = new RconClient("192.168.1.1", 2344, "pswd");
bool requestSuccess = networkClient.Fetch(
command: new GetMissionsRequest(),
timeout: 5000,
result: out string missions);
InvalidOperationException
Hello,
it appears that BattleNET is having problems when using Thread.Sleep for a longer amount of time (for example 30 seconds).
And with problems I mean it disconnects and reconnects.
I tried using Thread.Sleep() in another thread but it appears that it still affects BattleNET for whatever reason.
Sleeping for 10 seconds appears to be fine but 30 seconds makes BattleNET drop the connection and reconnect.
Here is a little example program which will cause BattleNET to disconnect every time it waits for 30 seconds. It is running in a different thread.
static void Main(string[] args)
{
BattlEyeClient b;
BattlEyeLoginCredentials loginCredentials = new BattlEyeLoginCredentials(IPAddress.Parse("127.0.0.1"), 2302, "password");
b = new BattlEyeClient(loginCredentials);
b.ReconnectOnPacketLoss = true;
b.Connect();
Program p = new Program();
Thread thread = new Thread(new ThreadStart(p.DisconnectThread));
thread.IsBackground = true;
thread.Start();
while (true)
Thread.Sleep(1000);
}
public void DisconnectThread()
{
while (true)
{
Console.WriteLine("Waiting 30 seconds...");
Console.WriteLine("BattleNET will reconnect after about 25 seconds.");
Console.WriteLine("Check server console for connect messages.");
Thread.Sleep(30000);
}
}
Hey,
thanks for the great library, I love using it. But there is one issue that causes me trouble, it is not possible to handle extended ascii chars with the library, so for example a character like "ΓΏ" is shown as "?". So a player who uses those characters in his nickname can't be handled with our admin tool as his nickname is shown as "????". So from what I get sending and receive the package should be handled a little bit different for situations like that.
Thank You
Hello, I am having a little problem with BattleNET which annoys me since some time.
If you connect to a host that does not exist it will return a Invalid host error.
But if the host is valid but on the port no RCon is running it won't return any error and just connect, without executing any of the command of course.
This will lead in DaRT not being able to throw any error message.
I added some checks to see if the entered IP is a valid IP and the port a valid port but this only helps to check if the host is valid.
Would be nice if there is a way for you to fix this since alot of people are getting confused when DaRT still connects even if they didn't enter their RCon password properly.
Hi, am having problems logging in, I am assuming Battle Eye is required on the server. Am running a Bliss dayZ server and can login to console from chat when in game.
I have found that trying to access admin through the lobby throws me from the server, battle eye complains of a script violation and boots me, not sure if related.
Versions are: Arma: 1.62.97771 and dayZ:1.7.2.6.
I have tried with my own code and the, supplied, BattleNET Client, same issue. Would love to get this working as I am working on an automated system and would like to broadcast messages to my server.
thanks.
Looks like current .net core/.net (not .net framework) has issues loading the encoding used for this lib.
This occurs in the SendLoginPacket method with a try catch this gives an error of No data is available for encoding 1252
People can fix this by adding this at the start of your program.
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
When logging in using the client.exe or through code I am getting the above error. Logs in using the same password fine in game.
May have started around the 1.7.5.1, and subsequent arma, updates..
Probably should start commenting this entire thing.. I'm losing track of what's what...
Hello! I need whitelist-program for my dayz-server, that may be based on your library.. I can pay you for this job. Do you intrested it ? (icq 127510311)
There appears to be a problem when requesting big ban lists via BattleNET.
An example would be the community ban list: http://code.google.com/p/dayz-community-banlist/source/browse/bans/bans.txt
You either get no response at all or just cut off lists causing problems when parsing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.