           }
 
           if (inData == "get_IRL") {
-            send(i, "IR Learner Disabled"); // TODO: Implement capture (once IRremoteESP8266 supports it)
+            send(i, "IR Learner Enabled");
+            clientToSendReceivedCodeTo = i;
+            // send(i, "sendir,1:1,4,38400,1,69,347,173,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,65,22,65,22,65,22,65,22,65,22,65,22,65,22,65,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,65,22,65,22,65,22,65,22,65,22,65,22,65,22,65,22,1527,347,87,22,3692");
           }
 
           if (inData == "stop_IRL") {
-            send(i, "IR Learner Disabled"); // TODO: Implement capture (once IRremoteESP8266 supports it)
+            send(i, "IR Learner Disabled");
           }
 
           if (inData == "getversion,0")

#include "user_interface.h"
}

void setup() {

  irsend.begin();
  mySwitch.enableTransmit(3); // Pin 3 is RXD; 433 MHz

  ////////////

  sendDiscoveryBeacon();
}

String stringDecode;

int clientToSendReceivedCodeTo = MAX_SRV_CLIENTS;

void dump(decode_results *results) {
  int count = results->rawlen;
  unsigned long freq = 38400;        // FIXME DON'T HARDCODE _________________________________________
  stringDecode = "sendir,1:0,0,";
  stringDecode += freq;
  stringDecode += (",1,1,");
  for (int i = 1; i < count; i++) {
    if (i & 1) {
      stringDecode += results->rawbuf[i] * USECPERTICK * freq / 1000000 - 1, DEC;
    } else
    {
      stringDecode += (unsigned long) results->rawbuf[i] * USECPERTICK * freq / 1000000 - 1, DEC;
    }
    stringDecode += ",";
  }

  Serial.println(stringDecode);

  if (clientToSendReceivedCodeTo != MAX_SRV_CLIENTS) {
    send(clientToSendReceivedCodeTo, stringDecode);
    clientToSendReceivedCodeTo = MAX_SRV_CLIENTS;
  }

}

String inData;
String lircInData;

void loop() {

  settings.handle();

  if (irrecv.decode(&results))
  {
    dump(&results);
    irrecv.resume(); // Receive the next value
  }

  // Periodically send UDP Discovery Beacon
  unsigned long currentMillis = millis();
