-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: segfault
action: commit
revision:
path_from:
revision_from: 3647474523c6112a84dbe7576d005a617dea9b5a:
path_to:
revision_to:

git.thebackupbox.net

segfault

git://git.thebackupbox.net/segfault

commit 3647474523c6112a84dbe7576d005a617dea9b5a
Author: Epoch Qwert <epoch@53flpnlls43fcguy.onion>
Date:   Mon Aug 25 01:20:25 2014 -0500

    forgot in last commit: changed up some of the line handler's parsing.
    added echo detection for odd IRC servers that send the message back to sender

diff --git a/segfault.c b/segfault.c

index 5a4446c4e88610e89bfe11e52c49f0b4e5f9236e..

index ..1d439f0976c980002e593e0989d0a640788069ea 100644

--- a/segfault.c
+++ b/segfault.c
@@ -1080,13 +1080,11 @@ void line_handler(int fd,char *line) {//this should be built into the libary?
   }
  }
  if(s && t && u) {
-  if(!strcmp(s,"PRIVMSG")) {
-   u++;
-   if(*t == '#')//channel.
-    message_handler(fd,t,user,u,0);
+  if(!strcmp(s,"PRIVMSG") && strcmp(user->nick,myuser->nick))
+   if(strcmp(user->nick,myuser->nick))
+    message_handler(fd,*t=='#'?t:user->nick,user,++u,0);
    else
-    message_handler(fd,user->nick,user,u,0);
-  }
+    if(debug) privmsg(fd,*t=='#'?t:user->nick,"This server has an echo");
  }
  if(s && user->nick && t) {
   if(!strcmp(s,"JOIN")) {

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 18:07:46 2024