summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blabouncer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 1fa1d60..80d6940 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -48,7 +48,6 @@
#define IRCNICK "blabounce" // TODO: change this to a config option!
#define IRCUSER "blabounce" // TODO: change this to a config option!
#define IRCREALNAME "Mr Bla Bouncer" // TODO: change this to a config option!
-#define IRCUSERHOST "tghost.co.uk" // TODO: change this to a config option!
struct channel {
char name[MAXCHANLENGTH];
@@ -683,7 +682,10 @@ int processircmessage(int *serversockfd, int *clientsockfd, char *str, int sourc
// Rebuild to full PRIVMSG string and relay to all other clients
char outgoingmsg[MAXDATASIZE]; // String to send to client
- snprintf(outgoingmsg, MAXDATASIZE, ":%s!%s@%s %s", IRCNICK, IRCUSER, IRCUSERHOST, str);
+ if (!snprintf(outgoingmsg, MAXDATASIZE, ":%s %s", ircdstrings->nickuserhost, str)) {
+ fprintf(stderr, "Error while preparing PRIVMSG relay from another bouncer client.\n");
+ exit(1);
+ }
// Send to all except source client
sendtoallclients(clientsockfd, fdmax, arr_clients, outgoingmsg, sourcefd);