diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | blabouncer.c | 13 |
2 files changed, 12 insertions, 5 deletions
@@ -22,3 +22,7 @@ Test CTCP. Reconnect server if we get disconnected for some reason. Only do CAP multi-prefix negotiation with client if server approved it in the first place. + +Change default certfile and keyfile to be basedir/ instead of $HOME. + +Connecting to Miau has some sort of corruption and doesn't get channels. diff --git a/blabouncer.c b/blabouncer.c index 32ba454..8f2e975 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -1440,12 +1440,14 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli sendtoserver(server_ssl, namesreq, strlen(namesreq), 0, clients, settings); } - // Send our mode to the client - if (!snprintf(outgoingmsg, MAXDATASIZE, ":%s MODE %s %s", ircdstrings->ircnick, ircdstrings->ircnick, ircdstrings->mode)) { - fprintf(stderr, "Error while preparing USER just connected, MODE response!\n"); - exit(1); + // Send our mode to the client (if we have one) + if (strlen(ircdstrings->mode) > 0) { + if (!snprintf(outgoingmsg, MAXDATASIZE, ":%s MODE %s %s", ircdstrings->ircnick, ircdstrings->ircnick, ircdstrings->mode)) { + fprintf(stderr, "Error while preparing USER just connected, MODE response!\n"); + exit(1); + } + sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); } - sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); // Set the client as registered clients[arrindex(clients, sourcefd)].registered = 1; @@ -1858,6 +1860,7 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { ircdstrings.ircnick[0] = '\0'; ircdstrings.ircusername[0] = '\0'; ircdstrings.currentmsg[0] = '\0'; + ircdstrings.mode[0] = '\0'; // Populate nick and username from our configuration file for now, real IRCd may change them later (TODO - Is this true of username?) strcpy(ircdstrings.ircnick, settings->ircnick); |