The main part of the code is in WakeOnLanManager.cs. I just copied that file from the PowerScheduler plugin, and made some minor corrections pointed out here https://forum.team-mediaportal.com/submit-patches-mediaportal-tv-server-etc-325/powerscheduler-network-monitoring-share-traffic-60756/index3.html#post428128. Far from everything is used in this file, but I decided to not remove anything.
I think it would be better to remove the unused code. We can always fetch it back from the SVN if needed. Leftover code is pretty bad as it makes code to look more complex.