From 0a4de3b7f0159fc44f87996e1d25678e3b456878 Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 9 Aug 2023 23:15:35 -0400 Subject: de-hardcode hax.irc.andrewyu.org, place example in config.h --- client_network.c | 57 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 20 deletions(-) (limited to 'client_network.c') diff --git a/client_network.c b/client_network.c index 08b9aea..3ddad6e 100644 --- a/client_network.c +++ b/client_network.c @@ -228,28 +228,41 @@ int client_user_handler(uint64_t argc, struct string *argv) { if (add_local_client(STRING("1HC000001"), client_nick, client_hostmask, argv[0], argv[3], time(NULL)) != 0) return 1; - SENDCLIENT(STRING(":hax.irc.andrewyu.org 001 ")); + SENDCLIENT(STRING(":")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 001 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" :Welcome to the Rexnet IRC Network\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 002 ")); + SENDCLIENT(STRING(" :Welcome to the Rexnet IRC Network\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 002 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" :Your host is hax.irc.andrewyu.org, running a totally not sus IRCd\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 003 ")); + SENDCLIENT(STRING(" :Your host is ")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(", running a totally not sus IRCd\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 003 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" :This server was created 02:51:36 Apr 03 2023\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 004 ")); + SENDCLIENT(STRING(" :This server was created 02:51:36 Apr 03 2023\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 004 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" irc.andrewyu.org InspIRCd-3 BDGHILNORSTWcdghikorswxz ABCDEFGHIJKLMNOPQRSTXYZabcdefghijklmnopqrstuvwz :BEFHIJLXYZabdefghjkloqvw\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 005 ")); + SENDCLIENT(STRING(" ")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" InspIRCd-3 BDGHILNORSTWcdghikorswxz ABCDEFGHIJKLMNOPQRSTXYZabcdefghijklmnopqrstuvwz :BEFHIJLXYZabdefghjkloqvw\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 005 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" ACCEPT=100 AWAYLEN=200 BOT=B CALLERID=g CASEMAPPING=ascii CHANLIMIT=#:20 CHANMODES=IXZbegw,k,BEFHJLdfjl,ACDGKMNOPQRSTcimnprstuz CHANNELLEN=60 CHANTYPES=# ELIST=CMNTU ESILENCE=CcdiNnPpTtx EXCEPTS=e :are supported by this server\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 005 ")); + SENDCLIENT(STRING(" ACCEPT=100 AWAYLEN=200 BOT=B CALLERID=g CASEMAPPING=ascii CHANLIMIT=#:20 CHANMODES=IXZbegw,k,BEFHJLdfjl,ACDGKMNOPQRSTcimnprstuz CHANNELLEN=60 CHANTYPES=# ELIST=CMNTU ESILENCE=CcdiNnPpTtx EXCEPTS=e :are supported by this server\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 005 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" EXTBAN=,ACNOQRSTUacjmnprswz HOSTLEN=64 INVEX=I KEYLEN=32 KICKLEN=300 LINELEN=512 MAXLIST=I:1000,X:1000,b:1000,e:1000,g:1000,w:1000 MAXTARGETS=20 MODES=20 MONITOR=30 NAMELEN=130 NAMESX NETWORK=LibreIRC :are supported by this server\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 005 ")); + SENDCLIENT(STRING(" EXTBAN=,ACNOQRSTUacjmnprswz HOSTLEN=64 INVEX=I KEYLEN=32 KICKLEN=300 LINELEN=512 MAXLIST=I:1000,X:1000,b:1000,e:1000,g:1000,w:1000 MAXTARGETS=20 MODES=20 MONITOR=30 NAMELEN=130 NAMESX NETWORK=LibreIRC :are supported by this server\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 005 ")); SENDCLIENT(client_nick); - SENDCLIENT(STRING(" NICKLEN=30 OVERRIDE=O PREFIX=(Yqaohv)!~&@%+ REMOVE SAFELIST SECURELIST=60 SILENCE=100 STATUSMSG=!~&@%+ TOPICLEN=330 UHNAMES USERIP USERLEN=10 USERMODES=,,s,BDGHILNORSTWcdghikorwxz :are supported by this server\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 005 ")); + SENDCLIENT(STRING(" NICKLEN=30 OVERRIDE=O PREFIX=(Yqaohv)!~&@%+ REMOVE SAFELIST SECURELIST=60 SILENCE=100 STATUSMSG=!~&@%+ TOPICLEN=330 UHNAMES USERIP USERLEN=10 USERMODES=,,s,BDGHILNORSTWcdghikorwxz :are supported by this server\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 005 ")); SENDCLIENT(client_nick); SENDCLIENT(STRING(" WATCH=32 WHOX :are supported by this server\r\n")); @@ -322,8 +335,9 @@ int client_join_handler(uint64_t argc, struct string *argv) { SENDCLIENT(STRING(" ")); SENDCLIENT(user); } else { - SENDCLIENT(STRING("\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 353 ")); + SENDCLIENT(STRING("\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 353 ")); SENDCLIENT(client_nick); SENDCLIENT(STRING(" = ")); SENDCLIENT(channels); @@ -331,8 +345,9 @@ int client_join_handler(uint64_t argc, struct string *argv) { SENDCLIENT(user); } } - SENDCLIENT(STRING("\r\n")); - SENDCLIENT(STRING(":hax.irc.andrewyu.org 366 ")); + SENDCLIENT(STRING("\r\n:")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" 366 ")); SENDCLIENT(client_nick); SENDCLIENT(STRING(" ")); SENDCLIENT(channels); @@ -459,7 +474,9 @@ int client_ping_handler(uint64_t argc, struct string *argv) { if (argc < 1) return 1; - SENDCLIENT(STRING(":hax.irc.andrewyu.org PONG :")); + SENDCLIENT(STRING(":")); + SENDCLIENT(server_name); + SENDCLIENT(STRING(" PONG :")); SENDCLIENT(argv[0]); SENDCLIENT(STRING("\r\n")); -- cgit v1.2.3