private void GetReceived(object sender, HttpServer.HttpServerGetEvent e) { if (e.Path.StartsWith("/ffxivlauncher/")) { var otp = e.Path.Substring(15); OnOtpReceived?.Invoke(otp); } }
private void GetReceived(object sender, HttpServer.HttpServerGetEvent e) { if (e.Path.StartsWith("/ffxivlauncher/")) { var otp = e.Path.Substring(15); if (otp.Length < 6) { MessageBox.Show("Received malformed OTP code, please check macro.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } OnOtpReceived?.Invoke(otp); } }
private void GetReceived(object sender, HttpServer.HttpServerGetEvent e) { if (e.Path.StartsWith("/ffxivlauncher/")) { var otp = e.Path.Substring(15); if (otp.Length < 6) { Log.Error("Malformed otp: {0}", otp); MessageBox.Show("Received malformed OTP code, please check macro.\n\nInput:" + (string.IsNullOrEmpty(otp) ? "<empty string>" : otp), "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } OnOtpReceived?.Invoke(otp); } }