summaryrefslogtreecommitdiff
path: root/client_network.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client_network.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/client_network.c b/client_network.c
index bdca265..a347888 100644
--- a/client_network.c
+++ b/client_network.c
@@ -62,7 +62,7 @@ int add_local_client(struct string uid, struct string nick_arg, struct string vh
if (!server.data)
goto add_local_client_fail_server;
- memcpy(server.data, "1HC", 3);
+ memcpy(server.data, SID, 3);
struct string hostname = {
.data = malloc(vhost_arg.len),
@@ -158,7 +158,7 @@ int add_local_client(struct string uid, struct string nick_arg, struct string vh
SEND(uid);
SEND(STRING(" OPERTYPE "));
SEND(opertype);
- SEND(STRING("\n:1HC METADATA "));
+ SEND(STRING("\n:"SID" METADATA "));
SEND(uid);
SEND(STRING(" ssl_cert :vTrse "));
SEND(client_cert);
@@ -210,7 +210,7 @@ int client_nick_handler(uint64_t argc, struct string *argv) {
client_nick.len = argv[0].len;
if (client_connected) {
- SEND(STRING(":1HC000001 NICK "));
+ SEND(STRING(":"SID"000001 NICK "));
SEND(client_nick);
SEND(STRING(" "));
char current_time[22];
@@ -229,7 +229,7 @@ int client_user_handler(uint64_t argc, struct string *argv) {
if (client_nick.len == 0)
return 1;
- if (add_local_client(STRING("1HC000001"), client_nick, client_hostmask, argv[0], argv[3], time(NULL)) != 0)
+ if (add_local_client(STRING(SID"000001"), client_nick, client_hostmask, argv[0], argv[3], time(NULL)) != 0)
return 1;
SENDCLIENT(STRING(":"));
@@ -357,13 +357,13 @@ int client_join_handler(uint64_t argc, struct string *argv) {
SENDCLIENT(channels);
SENDCLIENT(STRING(" :End of /NAMES list.\r\n"));
- SEND(STRING(":1HC FJOIN "));
+ SEND(STRING(":"SID" FJOIN "));
SEND(channels);
SEND(STRING(" "));
SEND(NULSTR(current_time_nulstr));
- SEND(STRING(" + :,1HC000001\n"));
+ SEND(STRING(" + :,"SID"000001\n"));
- set_table_index(&(channel_info->user_list), STRING("1HC000001"), get_table_index(user_list, STRING("1HC000001"))); // TODO: Actually add local users to user_list
+ set_table_index(&(channel_info->user_list), STRING(SID"000001"), get_table_index(user_list, STRING(SID"000001"))); // TODO: Actually add local users to user_list
channels.len = oldlen;
@@ -381,7 +381,7 @@ int client_privmsg_handler(uint64_t argc, struct string *argv) {
if (argc < 2)
return 1;
- SEND(STRING(":1HC000001 PRIVMSG "));
+ SEND(STRING(":"SID"000001 PRIVMSG "));
SEND(argv[0]);
SEND(STRING(" :"));
SEND(argv[1]);
@@ -443,9 +443,9 @@ int client_privmsg_handler(uint64_t argc, struct string *argv) {
STRING("'\n"),
};
- privmsg(STRING("1HC000000"), log_channel, sizeof(message)/sizeof(*message), message);
+ privmsg(STRING(SID"000000"), log_channel, sizeof(message)/sizeof(*message), message);
- return cmd->func(STRING("1HC000001"), argv[1], argv[0], command_argc, command_argv);
+ return cmd->func(STRING(SID"000001"), argv[1], argv[0], command_argc, command_argv);
} else {
// TODO: complain about remote access
WRITES(1, STRING("Not executing local-only command from a remote source!\n"));
@@ -453,7 +453,7 @@ int client_privmsg_handler(uint64_t argc, struct string *argv) {
}
} else {
if (argv[0].data[0] == '#') {
- SEND(STRING(":1HC000000 NOTICE "));
+ SEND(STRING(":"SID"000000 NOTICE "));
SEND(argv[0]);
SEND(STRING(" :Unknown command: " "\x03" "04"));
SEND(command_argv[0]);
@@ -492,7 +492,7 @@ int client_mode_handler(uint64_t argc, struct string *argv) {
if (argc < 2)
return 0; // Mode querying not supported yet
- SEND(STRING(":1HC000001 MODE "));
+ SEND(STRING(":"SID"000001 MODE "));
for (uint64_t i = 0; i < argc - 1; i++) {
SEND(argv[i]);
SEND(STRING(" "));