diff options
| author | Luke Bratch <luke@bratch.co.uk> | 2019-06-16 20:28:04 +0100 | 
|---|---|---|
| committer | Luke Bratch <luke@bratch.co.uk> | 2019-06-16 20:28:04 +0100 | 
| commit | a31e7b13b3cef0872be5922a568633d74dd408d2 (patch) | |
| tree | 0f63fd45f386451b7ee4a52543352181c1513825 | |
| parent | fa1b052f8bbd556e188aea52e7b29e352fd91d92 (diff) | |
Handle client PROTOCTL NAMESX by just passing on to the server.
| -rw-r--r-- | TODO | 2 | ||||
| -rw-r--r-- | message.c | 10 | 
2 files changed, 10 insertions, 2 deletions
| @@ -8,5 +8,3 @@ Add various auto replay options:  Might need to #include <limits.h> in blabouncer.c to make some operating systems and/or compilers happy.  Load all settings from configuration file at startup instead of referring to it for certain things (password/nick2/nick3). - -PROTOCTL NAMESX passed to other clients (perhaps add an in-code TODO to have it as an option as well as multi-prefix CAP). @@ -1151,6 +1151,16 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int      // If it wasn't a CTCP VERSION response, then let this fall through to the default unhandled action by not returning here    } +  // Client PROTOCTL received +  if (strncasecmp(tokens[0], "PROTOCTL", strlen(tokens[0])) == 0) { +    // If it's a PROTOCTL NAMESX, just pass to the server - TODO - Maybe deal with either PROTCTL NAMEX or multi-prefix CAP for mode prefixes? +    if (strncasecmp(tokens[1], "NAMESX", strlen(tokens[1])) == 0) { +      debugprint(DEBUG_FULL, "Client PROTOCTL NAMESX found!  Sending to server.\n", tokens[0], strlen(tokens[0])); +      sendtoserver(server_ssl, str, strlen(str), sourcefd, clients, settings); +      return 1; +    } +  } +    // Custom BLABOUNCER command received    // Case insensitive comparisons here since clients won't be recognising and uppercasing these commands    if (strncasecmp(tokens[0], "BLABOUNCER", strlen(tokens[0])) == 0) { | 
