summaryrefslogtreecommitdiff
path: root/client_network.c
diff options
context:
space:
mode:
Diffstat (limited to 'client_network.c')
-rw-r--r--client_network.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/client_network.c b/client_network.c
index bdca265..844be8f 100644
--- a/client_network.c
+++ b/client_network.c
@@ -47,7 +47,7 @@ struct table client_network_commands = {0};
struct string client_nick = {0};
uint8_t client_connected;
-int add_local_client(struct string uid, struct string nick_arg, struct string vhost_arg, struct string ident_arg, struct string realname_arg, time_t timestamp) {
+int add_local_client(struct string uid, struct string nick_arg, struct string vhost_arg, struct string ident_arg, struct string realname_arg, time_t timestamp, char fake_cert) {
if (has_table_index(user_list, uid))
return 1;
@@ -158,11 +158,14 @@ 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(uid);
- SEND(STRING(" ssl_cert :vTrse "));
- SEND(client_cert);
SEND(STRING("\n"));
+ if (fake_cert) {
+ SEND(STRING(":1HC METADATA "));
+ SEND(uid);
+ SEND(STRING(" ssl_cert :vTrse "));
+ SEND(client_cert);
+ SEND(STRING("\n"));
+ }
return 0;
@@ -229,7 +232,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("1HC000001"), client_nick, client_hostmask, argv[0], argv[3], time(NULL), 1) != 0)
return 1;
SENDCLIENT(STRING(":"));