From 838c0f80643c1418cb975cc88233fb77b94395e7 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Thu, 23 Jun 2022 11:58:27 -0500 Subject: [PATCH] Adding r.ip function --- RavenCommand.csharp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/RavenCommand.csharp b/RavenCommand.csharp index 6cbaac1..cb40fa4 100644 --- a/RavenCommand.csharp +++ b/RavenCommand.csharp @@ -126,17 +126,9 @@ namespace AniNIX.TheRaven { } connection.Write(send); return; - case "r.heartbeat": - try { - String[] byLine = ExecuteCommand.Run("heartbeat-client").Split('\n'); - for (int i = 0; i < byLine.Length; i++) { - send.PrivMsg(byLine[i],incoming.user); - connection.Write(send); - } - } catch (Exception e) { - e.ToString(); - send.PrivMsg("Can't get heartbeat",incoming.user); - } + case "r.ip": + send.PrivMsg(ExecuteCommand.Run("curl -s 10.0.1.1:80 | grep \"WAN IP\" | cut -f 7 -d \">\" | cut -f 1 -d \"<\""),(incoming.target.Equals(theRaven.Nick))?incoming.user:incoming.target); + connection.Write(send); return; case "r.searches": send.PrivMsg(theRaven.searchesIndex,(incoming.target.Equals(theRaven.Nick))?incoming.user:incoming.target);