-- 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: 991dced81da59a793a5cf709205f7c097d9499ad:
path_to:
revision_to:

git.thebackupbox.net

segfault

git://git.thebackupbox.net/segfault

commit 991dced81da59a793a5cf709205f7c097d9499ad
Author: epochqwert <epoch@hacking.allowed.org>
Date:   Sun Jan 22 06:31:21 2017 +0000

    made some special handler aliases prefix with ; instead of nothing to help prevent accidental usage

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

index ebf3c743714f5a938fb39aaa746b11ac57528d28..

index ..084a97fc1f489753b0375bccc27fcd0eed9b943c 100644

--- a/segfault.c
+++ b/segfault.c
@@ -1088,8 +1088,8 @@ void message_handler(int fd,char *from,struct user *user,char *msg,int redones)
  if(!oldcommand) exit(72);
  command=oldcommand;
  if(*command == '\x01') {
-  command[strlen(command)-1]=0;
-  command++;
+  command[strlen(command)-1]=0;//remove the end \x01
+  *command=';';
  }
  if(!strncmp(command,"s/",2)) {
   command[1]=' ';
@@ -1202,15 +1202,15 @@ void line_handler(int fd,char *line) {//this should be built into the libary?
   }
  }
  if(a[0] && user->nick && a[1]) {
+  strcpy(tmp,";");
+  strcat(tmp,a[0]);
   if((ht_getnode(&alias,a[0])) != NULL) {
-   strcpy(tmp,a[0]);
    for(i=0;a[i];i++) {
     strcat(tmp," ");
     strcat(tmp,a[i]);
    }
    message_handler(fd,"#cmd",user,tmp,1);
   }
-
   if(!strcmp(a[0],"JOIN")) {
    irc_mode(fd,a[1],"+o",user->nick);
   }

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

-- Response ended

-- Page fetched on Sun Jun 2 16:55:30 2024