ziellos2k 35 Posted October 16, 2012 Just wanted to say thanks for creating this, has made creating my OA Server tools alot easier. You should consider putting up a thread about the project on BI Forums too, I just barely found it through github :)You're free to do so yourself. ;) 1 Share this post Link to post Share on other sites
axemanuk 1 Posted October 29, 2012 Great work Sawyer, having one problem: Getting disconnected (Failed to login) when trying to login. Password is definitely admin(rcon) password, as set in the config. Am using Bliss server versions: 1.62.97771 and 1.7.2.6.Have tried in my own code and using the supplied BattleNET Client.exeAny help would be great, I am trying to create an automated system and send messages to the occupants in the server.. Share this post Link to post Share on other sites
ziellos2k 35 Posted October 29, 2012 ...Handling on github. :) Share this post Link to post Share on other sites
TheSilentWarrior 43 Posted November 17, 2012 Hello, I would like to let you know this works fine in Linux, MacOSX and Windows using mono.Anyone know how can I ban someone? Only way I managed to ban someone right now is by typing the command manually "ban "+player.playerNumber, but the message i put after it doesnt get displayed (or saved for that matter) Share this post Link to post Share on other sites
ziellos2k 35 Posted November 17, 2012 (edited) ban [player #] [time in minutes] [reason] Edited November 17, 2012 by Sawyer 1 Share this post Link to post Share on other sites
domistyle 221 Posted November 17, 2012 Player # is the number on the player list by the way, not the GUID or the Player ID.Took me some time to figure this out... 1 Share this post Link to post Share on other sites
TheSilentWarrior 43 Posted November 17, 2012 ban [player #] [time in minutes] [reason]Thanks. Share this post Link to post Share on other sites
ziellos2k 35 Posted November 17, 2012 You're welcome :) Share this post Link to post Share on other sites
hohlraum 9 Posted November 22, 2012 (edited) Has anyone used this lib to create a simple command line tool for issuing a single command and exiting? Something you'd call with something like:tool.exe -p aasdf -i 123.123.123.123:2302 -c 'say -1 blah blah'ortool.exe -p aasdf -i 123.123.123.123:2302 -c 'players'which would just dump the list of players to stdout and exit? Edited November 22, 2012 by Hohlraum Share this post Link to post Share on other sites
domistyle 221 Posted November 22, 2012 (edited) Has anyone used this lib to create a simple command line tool for issuing a single command and exiting? Something you'd call with something like:tool.exe -p aasdf -i 123.123.123.123:2302 -c 'say -1 blah blah'ortool.exe -p aasdf -i 123.123.123.123:2302 -c 'players'which would just dump the list of players to stdout and exit?I will probably include something like this in the next version of DaRT.Output will be to a file for now which you can specifiy in the parameters.Of course, GUI won't start if startup parameters are specified. Edited November 22, 2012 by DomiStyle Share this post Link to post Share on other sites
ziellos2k 35 Posted November 23, 2012 Has anyone used this lib to create a simple command line tool for issuing a single command and exiting? Something you'd call with something like:tool.exe -p aasdf -i 123.123.123.123:2302 -c 'say -1 blah blah'ortool.exe -p aasdf -i 123.123.123.123:2302 -c 'players'which would just dump the list of players to stdout and exit?I actually did this while I was running my server on linux. I used it to notify users about restarts in a simple bash script. Unfortunately the lib itself doesn't know whether a message has been send and received so you would need to check in your own app the output by the server.send(msg);while(!serverout.Contains(msg)) { sleep(2000); send(msg);}// exitor something like that. :) Share this post Link to post Share on other sites
Wotuu 11 Posted November 27, 2012 Hi,I've been using your project for some time now in my little programming projects, thanks a lot for the effort put into it! I doubt it's an issue on your end, but when the server is busy, it doesn't seem to catch all logs. How do I know this, chat doesn't seem to get through at all. Gotcha Antihack is having the same issue, but I'm not sure if they use your library for their data. I'm starting to think it's a Battleye issue, but perhaps you've experienced this before.I'm in the process of making a command line interface for use inside the server (request server info, request time till restart, maybe vote kick, etc.), but it's pretty worthless if the chat commands don't get through.Thanks once again for your effort! Share this post Link to post Share on other sites
ziellos2k 35 Posted November 28, 2012 (edited) Are you talking about the server not sending player login messages to the connected RCon client (BattlEye -> BattleNET)? If so, this is indeed not a problem with BattleNET but with BattlEye. When the server is under (heavy) load it will start dropping packets (which UDP doesn't handle unfortunately) while probably showing a yellow or red chain in game.Data being sent by BattleNET towards the game server (BattleNET -> BattlEye) will probably be dropped as well when it's under (heavy) load. I'm planning to look at this soonish but for now please refer to my previous post. :)EDIT: You can track progress on the latter issue @ https://github.com/ziellos2k/BattleNET/issues/9 :) Edited November 28, 2012 by ziellos2k Share this post Link to post Share on other sites
Wotuu 11 Posted November 28, 2012 Thanks for the reply,Yesterday evening chat messages sometimes had a delay of 50 minutes before being received by Gotcha (and my program using your library). I'm not talking about login messages, but actual *chat* messages. When the server gets to about ~10 players, it seems to drop all kinds of packages, not just chat messages. But the funny thing is that the chat does seem to get through, sometimes with a very long delay. Share this post Link to post Share on other sites
ziellos2k 35 Posted November 28, 2012 Hmm that's odd. Can you try and see what happens when you're using the official RCon client? -> http://battleye.com/downloads/BERCon.exe Share this post Link to post Share on other sites
Sutoko (DayZ) 2 Posted November 28, 2012 (edited) Hey I'm using your API to develop a small RCon tool, built-in to my database manager.I'm struggling with fetching the player list.I can execute the commands etc.But it's taking the message received from the server and transferring it into a variable.It'd be great if someone could point me in the right direction with this.EDIT: Managed to get the text into a string, now I need to convert this into something a DataGrid will show :| Edited November 28, 2012 by Sutoko Share this post Link to post Share on other sites
Wotuu 11 Posted November 29, 2012 Hmm that's odd. Can you try and see what happens when you're using the official RCon client? -> http://battleye.com/...oads/BERCon.exeI found what was causing the massive delay, it had to do with me logging every setVariable and setVariableVar function. It probably caused a massive overflow of data (and long log files), which in turn caused the delay. Switching those two spammers off solved the issue, chat messages are received near instant now! Share this post Link to post Share on other sites
ziellos2k 35 Posted November 29, 2012 (edited) EDIT: Managed to get the text into a string, now I need to convert this into something a DataGrid will show :|Use regular expressions -> http://www.dotnetperls.com/regexI found what was causing the massive delay, it had to do with me logging every setVariable and setVariableVar function. It probably caused a massive overflow of data (and long log files), which in turn caused the delay. Switching those two spammers off solved the issue, chat messages are received near instant now!Glad you got it fixed. :) Edited November 29, 2012 by ziellos2k Share this post Link to post Share on other sites
Wotuu 11 Posted November 29, 2012 (edited) Hey I'm using your API to develop a small RCon tool, built-in to my database manager.I'm struggling with fetching the player list.I can execute the commands etc.But it's taking the message received from the server and transferring it into a variable.It'd be great if someone could point me in the right direction with this.EDIT: Managed to get the text into a string, now I need to convert this into something a DataGrid will show :|Hi,This is how I solved that (it's rather ugly and I hate regex's, so here goes:)In your "HandleMessage" event function:String timeMessage = DateTime.Now.ToString("hh:mm:ss") + " - " + args.Message.Trim();int tryParse = 0;// If this is the message for playersif (Int32.TryParse(split[2], out tryParse)) {bMessage = new SurvivorMessage(timeMessage);}The BattleyeMessage and SurvivorMessage classes looks like this:public class BattleyeMessage {public String rawMessage { get; set; }public String time { get; set; }public BattleyeMessage(String raw) {String[] split = raw.Split(' ');this.time = split[0];this.rawMessage = raw;}}public class SurvivorMessage : BattleyeMessage {public int number { get; set; }public String ip { get; set; }public String port { get; set; }public int ping { get; set; }public String guid { get; set; }public String username { get; set; }public SurvivorMessage(String raw): base(raw) {String[] split = raw.Split(new char[1]{' '}, StringSplitOptions.RemoveEmptyEntries);this.number = Int32.Parse(split[2]);this.ip = split[3].Split(':')[0];this.port = split[3].Split(':')[1];this.ping = Int32.Parse(split[4]);this.guid = split[5];// Some usernames contain spaces .. bastardsfor (int i = 6; i < split.Length; i++) {this.username += split[i] + " ";}// Remove trailing spacethis.username = this.username.Trim();}}This should probably give you an idea of how you should solve this problem. Edited November 29, 2012 by Wotuu Share this post Link to post Share on other sites
ziellos2k 35 Posted November 29, 2012 I'd say, go with regex. It takes a some time to get used to but it's quite useful. You'd probably be able to do all that in the above post with pretty much a single line of code. :) Share this post Link to post Share on other sites
hohlraum 9 Posted November 29, 2012 It's no coincidence that pretty much all modern programming languages come with regex support built in. Pretty much the "go to" for any kind of text parsing/processing. Share this post Link to post Share on other sites
domistyle 221 Posted November 29, 2012 It's not necessary at all to use regex for such a simple task.A much simpler solution is to create a StringReader and split each line like this:String[] items = line.Split(new char[] { ' ' }, 5, StringSplitOptions.RemoveEmptyEntries);You can then grab each item by increasing the index, for example:String name = items[4];Of course, both solutions are possible. Share this post Link to post Share on other sites
ziellos2k 35 Posted November 29, 2012 Small update. Might break your current implementation due to the removal of the interface crap. Simply replace IBattleNET with BattlEyeClient. :) Share this post Link to post Share on other sites
Wotuu 11 Posted November 30, 2012 Yeah I know Regex's are probably a better solution, but I couldn't be arsed :]. Share this post Link to post Share on other sites
Vipeax 318 Posted November 30, 2012 Small update. Might break your current implementation due to the removal of the interface crap. Simply replace IBattleNET with BattlEyeClient. :)Grr. :( ;) Share this post Link to post Share on other sites