This project is read-only.

RconClient not reporting back events?

Feb 28, 2014 at 2:51 PM
Ohoy there!

I've been trying to use RconEventArgs for fetching information, but it seems like it's not being reported at all.

I've defined the event like this:
Client.RconEvent += new EventHandler<RconEventArgs>(OnEvent);

And the function:
public void OnEvent(object sender, RconEventArgs e)
Console.WriteLine("Event: {0}", e.EventName);
Mar 4, 2014 at 6:12 PM
Edited Mar 4, 2014 at 6:19 PM
It's working fine for me. I'm using the example on the documentation page.

Edit: I think I know what is your problem. Before receiving events you must tell the server to send back events to you. You need to send a request with "admin.eventsEnabled", "1".

Hope it works for you.
Mar 6, 2014 at 1:37 AM
Edited Mar 6, 2014 at 1:37 AM
Hey sparven! Sorry about the delay. I've been away from my email for a few days, which is where I have the RSS feed for this project.

It would seem this is a bug with the library. As sparcopt said, the admin.eventsEnabled command needs to be sent. The library is supposed to do this for you, but I totally forgot to write that in :D

So, the workaround is to indeed send it yourself. When I put the fix in (preoccupied atm), sending that command shouldn't break anything, so at least it's not a major problem.

Thanks for the bug report!
Mar 14, 2014 at 9:56 PM
Hi there Timiz0r!

Weeeeell I can't say I'm any better ^^

Oh, this explains a lot! I was about to go mad for not finding what I was doing wrong. So cheers for sharing a solution and future plans! :D

keep up the good work!