Jump to content
ziellos2k

BattleNET - C# library and client for the BattlEye protocol

Recommended Posts

No feedback is good feedback? :lol:

Hey wondering if you could help,

I'm developing my own rcon tool using vb.net and i have the everything working apart from i get no response form loadbans command. using your .dll



If Not IsNothing(B) Then
B.SendCommand(BattlEyeCommand.LoadBans)
End If

but am getting nothing back. or with Bans, i take it the bans list loads in this handler? "Private Sub BattlEyeMessageReceived(args As BattlEyeMessageEventArgs) Handles B.BattlEyeMessageReceived"

please help..

Share this post


Link to post
Share on other sites

Hey wondering if you could help,

I'm developing my own rcon tool using vb.net and i have the everything working apart from i get no response form loadbans command. using your .dll



If Not IsNothing(B) Then
B.SendCommand(BattlEyeCommand.LoadBans)
End If

but am getting nothing back. or with Bans, i take it the bans list loads in this handler? "Private Sub BattlEyeMessageReceived(args As BattlEyeMessageEventArgs) Handles B.BattlEyeMessageReceived"

please help..

loadBans doesn't do anything but reloading the bans.txt files. You're looking for the bans command (BattlEyeCommand.Bans).

Share this post


Link to post
Share on other sites

loadBans doesn't do anything but reloading the bans.txt files. You're looking for the bans command (BattlEyeCommand.Bans).

Yea i have also tried



If Not IsNothing(B)Then
B.SendCommand(BattlEyeCommand.Bans)
End If

nothing happens.. Or do i need to load A bans list then use bans?

Also am i correct in thinking i will get something returned in the "message" delegate.

Sorry this is my first time with rcon, btw i do like how you coded the .dll Very nice and efficient, i keep looking at the source for how it works. Its some really nice work :)

Thanks in advance for any help.

Edited by Assassin_UK1

Share this post


Link to post
Share on other sites

From what I tested it seems like a too big ban list can crash the server once you request it via RCon.

Not sure if a problem with BattleNET, DaRT or RCon in general.

Tested with my banlist: http://forum.swisscraft.eu/DaRT/Bans/bans.txt?dart=2&banz=yes&dwarden=yes&community=yes

Not sure if it's caused by the length or only happens for me but I will check again.

Beside that the new version is running fine and is making it alot easier to check if BattleNET is connected instead of just waiting 1 second.

Share this post


Link to post
Share on other sites

Yea i have also tried



If Not IsNothing(B)Then
B.SendCommand(BattlEyeCommand.Bans)
End If

nothing happens.. Or do i need to load A bans list then use bans?

Also am i correct in thinking i will get something returned in the "message" delegate.

Sorry this is my first time with rcon, btw i do like how you coded the .dll Very nice and efficient, i keep looking at the source for how it works. Its some really nice work :)

Thanks in advance for any help.

I have no experience with visual basic but if you look through the client supplied with the library it should be clear what needs to be done. Especially look at lines 66 and 120-128.

From what I tested it seems like a too big ban list can crash the server once you request it via RCon.

Not sure if a problem with BattleNET, DaRT or RCon in general.

Tested with my banlist: http://forum.swisscr...s&community=yes

Not sure if it's caused by the length or only happens for me but I will check again.

Beside that the new version is running fine and is making it alot easier to check if BattleNET is connected instead of just waiting 1 second.

If the actual game server crashes then it's either a problem with BattlEye or the server (or possibly with the bans.txt file). I've been requesting ban lists containing more then 3000 bans and that worked fine (if my memory serves me right :)).

Share this post


Link to post
Share on other sites

I have no experience with visual basic but if you look through the client supplied with the library it should be clear what needs to be done. Especially look at lines 66 and 120-128.

If the actual game server crashes then it's either a problem with BattlEye or the server (or possibly with the bans.txt file). I've been requesting ban lists containing more then 3000 bans and that worked fine (if my memory serves me right :)).

c# and vb.net are the exact same except syntax difference. , you can just wack any c# code into an online converter and see the vb equivalent and vice versa. Thank you for you help tho i will study it and have a proper look. Thanks again in advance :D

Share this post


Link to post
Share on other sites

If the actual game server crashes then it's either a problem with BattlEye or the server (or possibly with the bans.txt file). I've been requesting ban lists containing more then 3000 bans and that worked fine (if my memory serves me right :)).

I will try to find out what exactly is crashing the server soon.

I had a few users who had the same problem already, I couldn't figure out what is causing it though.

Share this post


Link to post
Share on other sites

I will try to find out what exactly is crashing the server soon.

I had a few users who had the same problem already, I couldn't figure out what is causing it though.

Good luck, always nice to know the why and fix :D

Share this post


Link to post
Share on other sites

c# and vb.net are the exact same except syntax difference. , you can just wack any c# code into an online converter and see the vb equivalent and vice versa. Thank you for you help tho i will study it and have a proper look. Thanks again in advance :D

Remembered this on the first page of this thread. Should fix your problem I think. The event names aren't the same but at least it will help you understand. :)

EDIT: The link is a response to this.

Edited by ziellos2k

Share this post


Link to post
Share on other sites

Remembered this on the first page of this thread. Should fix your problem I think. The event names aren't the same but at least it will help you understand. :)

EDIT: The link is a response to this.

Thats not the problem i already have the delegates using AddHandlers. And already recieveing the messages etc. just not sure if bans was returning anything or not.

I have not had a chance to get back and recode what i have already due to the other half being in hospital atm :/ (looking after my lil girl is killing my dev time)

Also i noticed in Dart your using String.concate....

A tip use a Stringbuilder, string conacte uses too much memory compared to the string builder, a string builder dose not have to allocate a new memory address in ram every time you change the string it just expands it current, rather then a new memory address (keeping the old untill the new is made ) for a string.concate. Something i also learned a few days ago.

INSERT:

The performance impact of String.concat()

Each time you append something via '+' (String.concat()) a new String is created, the old stuff is copied, the new stuff is appended, and the old String is thrown away. The bigger the String gets the longer it takes - there is more to copy and more garbage is produced.

String.concat() is slow. Amazingly slow in fact. It's so bad that the guys over at FindBugs added a detector for String.concat inside loops to their static code analysis tool.

Link : http://kaioa.com/node/59

Edited by Assassin_UK1

Share this post


Link to post
Share on other sites

Thats not the problem i already have the delegates using AddHandlers. And already recieveing the messages etc. just not sure if bans was returning anything or not.

I have not had a chance to get back and recode what i have already due to the other half being in hospital atm :/ (looking after my lil girl is killing my dev time)

Also i noticed in Dart your using String.concate....

A tip use a Stringbuilder, string conacte uses too much memory compared to the string builder, a string builder dose not have to allocate a new memory address in ram every time you change the string it just expands it current, rather then a new memory address (keeping the old untill the new is made ) for a string.concate. Something i also learned a few days ago.

INSERT:

The performance impact of String.concat()

Each time you append something via '+' (String.concat()) a new String is created, the old stuff is copied, the new stuff is appended, and the old String is thrown away. The bigger the String gets the longer it takes - there is more to copy and more garbage is produced.

String.concat() is slow. Amazingly slow in fact. It's so bad that the guys over at FindBugs added a detector for String.concat inside loops to their static code analysis tool.

Link : http://kaioa.com/node/59

I use String.Format().

Share this post


Link to post
Share on other sites

I use String.Format().

Yea i use that for simple small strings etc, but when it come to anything like multipart data then a stringbuilder is just easier on the eye to separate the values out.

Share this post


Link to post
Share on other sites

Was about to suggest Int32.MaxValue too. ;)

Not sure if it will fix all the problems but some of them.

Well it does fix the 'sometimes failing ban list', didn't test with the crashing one though.

Share this post


Link to post
Share on other sites

+1 on the server crashing issue after the Int32 fix, must be a BE issue. Our server has a 7000+ strong list and will crash when i request the bans.

Great API there BE.

Share this post


Link to post
Share on other sites

+1 on the server crashing issue after the Int32 fix, must be a BE issue. Our server has a 7000+ strong list and will crash when i request the bans.

Great API there BE.

BE is already aware of, they will fix it soon.

Share this post


Link to post
Share on other sites

Hey, been a while since I last been here, quite busy developing stuff for Gotcha. Didn't get to work with your library for some time. But here I am with a new issue (oh dear). I just downloaded the new library to integrate it (the 14 January one), but every time the "players" command is executed, it gets executed twice it seems. In any event, I am receiving the player list twice.

This was working just fine before I integrated the new library, so I'm pretty sure the issue is not on our side. Can you replicate this and or fix it? Much appreciated :]

Share this post


Link to post
Share on other sites

You can try setting the sleep to 1000 instead of 500 in BattlEyeClient.cs line 337. Other than that, no idea. I remember someone else having the same problem in the past but I thought it was fixed. Haven't gotten any reports of it with 1.2.1 though so I don't know. It's been a while since I've touched BattleNET's code. ^^

Share this post


Link to post
Share on other sites

I'm afraid that that didn't work, still getting the list twice. All other commands seem to be getting through just fine. I'll add some logging myself and see where it goes wrong.

Share this post


Link to post
Share on other sites

Nevermind, it did work! I accidently set it to 100 instead of 1000. Thank you very much for the quick reply :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×