aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-06-24 15:03:06 -0400
committerTest_User <hax@andrewyu.org>2024-06-24 15:03:06 -0400
commit99449f390c045b25ac1ddb1fa406b7a371523182 (patch)
tree6c68d8bdcc33daaf55d56b46ddea7f8d7c24d008
parentd095efe06273ec29bdc07c2cc522d6fe5a793550 (diff)
downloadhaxircd-99449f390c045b25ac1ddb1fa406b7a371523182.tar.gz
haxircd-99449f390c045b25ac1ddb1fa406b7a371523182.zip
More services stuff
-rw-r--r--.gitignore1
-rw-r--r--general_network.c46
-rw-r--r--general_network.h4
-rw-r--r--protocols.c41
-rw-r--r--protocols.h6
-rw-r--r--protocols/inspircd2.c40
-rw-r--r--protocols/inspircd2.h3
-rw-r--r--pseudoclients.c44
-rw-r--r--pseudoclients.h8
-rw-r--r--pseudoclients/haxserv.c13
-rw-r--r--pseudoclients/haxserv.h2
-rw-r--r--pseudoclients/services.c11
-rw-r--r--pseudoclients/services.h2
13 files changed, 204 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index f99f15f..1ae34af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ HaxIRCd
core
.makeopts
output
+pseudoclients/services.db
diff --git a/general_network.c b/general_network.c
index f6c264a..70ebe60 100644
--- a/general_network.c
+++ b/general_network.c
@@ -333,6 +333,8 @@ int add_user(struct string from, struct string attached_to, struct string uid, s
new_info->account_name = (struct string){.data = malloc(0), .len = 0};
new_info->oper_type = (struct string){.data = malloc(0), .len = 0};
+ new_info->cert = (struct string){.data = malloc(0), .len = 0};
+ new_info->cert_ready = 0;
#ifdef USE_SERVER
if (protocols_handle_new_user(from, new_info) != 0)
@@ -435,6 +437,7 @@ void remove_user(struct string from, struct user_info *user, struct string reaso
free(user->address.data);
free(user->oper_type.data);
free(user->account_name.data);
+ free(user->cert.data);
free(user);
}
@@ -503,6 +506,31 @@ int set_account(struct string from, struct user_info *user, struct string accoun
return 0;
}
+int set_cert(struct string from, struct user_info *user, struct string cert, struct string source) {
+ if (STRING_EQ(user->cert, cert) && user->cert_ready != 0)
+ return 0;
+
+ struct string tmp;
+ if (str_clone(&tmp, cert) != 0)
+ return 1;
+
+#ifdef USE_SERVER
+ if (protocols_handle_set_cert(from, user, cert, source) != 0) {
+ free(tmp.data);
+ return 1;
+ }
+
+ protocols_propagate_set_cert(from, user, cert, source);
+#endif
+
+ user->cert_ready = 1;
+
+ free(user->cert.data);
+ user->cert = tmp;
+
+ return 0;
+}
+
int set_channel(struct string from, struct string name, size_t timestamp, size_t user_count, struct user_info **users) {
char is_new_channel;
struct channel_info *channel = get_table_index(channel_list, name);
@@ -709,23 +737,7 @@ int privmsg(struct string from, struct string sender, struct string target, stru
#endif
#ifdef USE_PSEUDOCLIENTS
- if ((user && user->is_pseudoclient && user->pseudoclient == HAXSERV_PSEUDOCLIENT) || (!user && !server)) {
- char send;
- if (!user && !server) {
- send = 0;
- for (size_t i = 0; i < channel->user_list.len; i++) {
- struct user_info *user = channel->user_list.array[i].ptr;
- if (user->is_pseudoclient && user->pseudoclient == HAXSERV_PSEUDOCLIENT && !STRING_EQ(sender, user->uid)) {
- send = 1;
- break;
- }
- }
- } else {
- send = 1;
- }
- if (send)
- pseudoclients[HAXSERV_PSEUDOCLIENT].handle_privmsg(from, sender, target, msg);
- }
+ pseudoclients_handle_privmsg(from, sender, target, msg);
#endif
return 0;
diff --git a/general_network.h b/general_network.h
index eccfe8e..c08bf18 100644
--- a/general_network.h
+++ b/general_network.h
@@ -93,6 +93,9 @@ struct user_info {
struct string oper_type;
struct string account_name;
+ struct string cert;
+ char cert_ready;
+
struct string server;
struct table channel_list;
@@ -135,6 +138,7 @@ int kill_user(struct string from, struct string source, struct user_info *user,
int oper_user(struct string from, struct user_info *user, struct string type, struct string source);
int set_account(struct string from, struct user_info *user, struct string account, struct string source);
+int set_cert(struct string from, struct user_info *user, struct string cert, struct string source);
int set_channel(struct string from, struct string name, size_t timestamp, size_t user_count, struct user_info **users);
int join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
diff --git a/protocols.c b/protocols.c
index d27386a..d4a82db 100644
--- a/protocols.c
+++ b/protocols.c
@@ -57,6 +57,7 @@ struct protocol protocols[NUM_PROTOCOLS] = {
.propagate_oper_user = inspircd2_protocol_propagate_oper_user,
.propagate_set_account = inspircd2_protocol_propagate_set_account,
+ .propagate_set_cert = inspircd2_protocol_propagate_set_cert,
.propagate_set_channel = inspircd2_protocol_propagate_set_channel,
.propagate_join_channel = inspircd2_protocol_propagate_join_channel,
@@ -76,6 +77,7 @@ struct protocol protocols[NUM_PROTOCOLS] = {
.handle_oper_user = inspircd2_protocol_handle_oper_user,
.handle_set_account = inspircd2_protocol_handle_set_account,
+ .handle_set_cert = inspircd2_protocol_handle_set_cert,
.handle_set_channel = inspircd2_protocol_handle_set_channel,
.handle_join_channel = inspircd2_protocol_handle_join_channel,
@@ -89,6 +91,7 @@ struct protocol protocols[NUM_PROTOCOLS] = {
.fail_oper_user = inspircd2_protocol_fail_oper_user,
.fail_set_account = inspircd2_protocol_fail_set_account,
+ .fail_set_cert = inspircd2_protocol_fail_set_cert,
.fail_set_channel = inspircd2_protocol_fail_set_channel,
.fail_join_channel = inspircd2_protocol_fail_join_channel,
@@ -260,6 +263,14 @@ void protocols_propagate_set_account(struct string from, struct user_info *info,
}
}
+void protocols_propagate_set_cert(struct string from, struct user_info *info, struct string cert, struct string source) {
+ for (size_t i = 0; i < NUM_PROTOCOLS; i++) {
+ if (!active_protocols[i])
+ continue;
+ protocols[i].propagate_set_cert(from, info, cert, source);
+ }
+}
+
void protocols_propagate_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users) {
for (size_t i = 0; i < NUM_PROTOCOLS; i++) {
if (!active_protocols[i])
@@ -442,6 +453,28 @@ int protocols_handle_set_account(struct string from, struct user_info *info, str
return 1;
}
+int protocols_handle_set_cert(struct string from, struct user_info *info, struct string cert, struct string source) {
+ size_t i;
+ for (i = 0; i < NUM_PROTOCOLS; i++) {
+ if (!active_protocols[i])
+ continue;
+ if (protocols[i].handle_set_cert(from, info, cert, source) != 0)
+ goto protocols_handle_set_cert_fail;
+ }
+
+ return 0;
+
+ protocols_handle_set_cert_fail:
+ while (i > 0) {
+ i--;
+ if (!active_protocols[i])
+ continue;
+ protocols[i].fail_set_cert(from, info, cert, source);
+ }
+
+ return 1;
+}
+
int protocols_handle_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users) {
size_t i;
for (i = 0; i < NUM_PROTOCOLS; i++) {
@@ -542,6 +575,14 @@ void protocols_fail_set_account(struct string from, struct user_info *info, stru
}
}
+void protocols_fail_set_cert(struct string from, struct user_info *info, struct string cert, struct string source) {
+ for (size_t i = 0; i < NUM_PROTOCOLS; i++) {
+ if (!active_protocols[i])
+ continue;
+ protocols[i].fail_set_cert(from, info, cert, source);
+ }
+}
+
void protocols_fail_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users) {
for (size_t i = 0; i < NUM_PROTOCOLS; i++) {
if (!active_protocols[i])
diff --git a/protocols.h b/protocols.h
index e17db75..ca69aac 100644
--- a/protocols.h
+++ b/protocols.h
@@ -53,6 +53,7 @@ struct protocol {
void (*propagate_oper_user)(struct string from, struct user_info *info, struct string type, struct string reason);
void (*propagate_set_account)(struct string from, struct user_info *info, struct string account, struct string source);
+ void (*propagate_set_cert)(struct string from, struct user_info *info, struct string cert, struct string source);
void (*propagate_set_channel)(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void (*propagate_join_channel)(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users);
@@ -73,6 +74,7 @@ struct protocol {
int (*handle_oper_user)(struct string from, struct user_info *info, struct string type, struct string reason);
int (*handle_set_account)(struct string from, struct user_info *info, struct string account, struct string source);
+ int (*handle_set_cert)(struct string from, struct user_info *info, struct string cert, struct string source);
int (*handle_set_channel)(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
int (*handle_join_channel)(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
@@ -88,6 +90,7 @@ struct protocol {
void (*fail_oper_user)(struct string from, struct user_info *info, struct string type, struct string source);
void (*fail_set_account)(struct string from, struct user_info *info, struct string account, struct string source);
+ void (*fail_set_cert)(struct string from, struct user_info *info, struct string cert, struct string source);
void (*fail_set_channel)(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void (*fail_join_channel)(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
@@ -110,6 +113,7 @@ void protocols_propagate_kill_user(struct string from, struct string source, str
void protocols_propagate_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
void protocols_propagate_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+void protocols_propagate_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
void protocols_propagate_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void protocols_propagate_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
@@ -129,6 +133,7 @@ void protocols_handle_kill_user(struct string from, struct string source, struct
int protocols_handle_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
int protocols_handle_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+int protocols_handle_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
int protocols_handle_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
int protocols_handle_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
@@ -142,6 +147,7 @@ void protocols_fail_rename_user(struct string from, struct user_info *info, stru
void protocols_fail_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
void protocols_fail_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+void protocols_fail_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
void protocols_fail_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void protocols_fail_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
diff --git a/protocols/inspircd2.c b/protocols/inspircd2.c
index 17dc726..b19960e 100644
--- a/protocols/inspircd2.c
+++ b/protocols/inspircd2.c
@@ -697,6 +697,21 @@ void inspircd2_protocol_propagate_set_account(struct string from, struct user_in
inspircd2_protocol_propagate(from, STRING("\n"));
}
+// [:source] METADATA <user> ssl_cert <vtrsE (none) | vTrse <cert>>
+void inspircd2_protocol_propagate_set_cert(struct string from, struct user_info *user, struct string cert, struct string source) {
+ inspircd2_protocol_propagate(from, STRING(":"));
+ inspircd2_protocol_propagate(from, source);
+ inspircd2_protocol_propagate(from, STRING(" METADATA "));
+ inspircd2_protocol_propagate(from, user->uid);
+ if (cert.len != 0) {
+ inspircd2_protocol_propagate(from, STRING(" ssl_cert :vTrse "));
+ inspircd2_protocol_propagate(from, cert);
+ inspircd2_protocol_propagate(from, STRING("\n"));
+ } else {
+ inspircd2_protocol_propagate(from, STRING(" ssl_cert :vtrsE No certificate was found.\n"));
+ }
+}
+
// [:source] FJOIN <channel> <timestamp> <modes> [<mode args>] <userlist: modes,uid [...]>
void inspircd2_protocol_propagate_set_channel(struct string from, struct channel_info *channel, char is_new_server, size_t user_count, struct user_info **users) {
inspircd2_protocol_propagate(from, STRING(":"));
@@ -865,6 +880,10 @@ int inspircd2_protocol_handle_set_account(struct string from, struct user_info *
return 0;
}
+int inspircd2_protocol_handle_set_cert(struct string from, struct user_info *info, struct string cert, struct string source) {
+ return 0;
+}
+
int inspircd2_protocol_handle_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users) {
return 0;
}
@@ -901,6 +920,10 @@ void inspircd2_protocol_fail_set_account(struct string from, struct user_info *i
return;
}
+void inspircd2_protocol_fail_set_cert(struct string from, struct user_info *info, struct string cert, struct string source) {
+ return;
+}
+
void inspircd2_protocol_fail_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users) {
return;
}
@@ -1828,6 +1851,23 @@ int inspircd2_protocol_handle_metadata(struct string source, size_t argc, struct
if (STRING_EQ(argv[1], STRING("accountname"))) {
if (set_account(config->sid, info, argv[2], source) != 0)
return -1;
+ } else if (STRING_EQ(argv[1], STRING("ssl_cert"))) {
+ struct string no_cert = STRING("vtrsE ");
+ if (argv[2].len < no_cert.len)
+ return -1;
+ struct string start = {.data = argv[2].data, .len = no_cert.len};
+ if (STRING_EQ(start, no_cert)) {
+ if (set_cert(config->sid, info, STRING(""), source) != 0)
+ return -1;
+ } else if (STRING_EQ(start, STRING("vTrse "))) {
+ struct string cert = {.data = argv[2].data + no_cert.len, .len = argv[2].len - no_cert.len};
+ size_t len;
+ for (len = 0; len < cert.len && cert.data[len] != ' '; len++)
+ ;
+ cert.len = len;
+ if (set_cert(config->sid, info, cert, source) != 0)
+ return -1;
+ }
}
return 0;
diff --git a/protocols/inspircd2.h b/protocols/inspircd2.h
index b8e7cda..7c5bc99 100644
--- a/protocols/inspircd2.h
+++ b/protocols/inspircd2.h
@@ -55,6 +55,7 @@ void inspircd2_protocol_propagate_kill_user(struct string from, struct string so
void inspircd2_protocol_propagate_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
void inspircd2_protocol_propagate_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+void inspircd2_protocol_propagate_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
void inspircd2_protocol_propagate_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void inspircd2_protocol_propagate_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users);
@@ -74,6 +75,7 @@ void inspircd2_protocol_handle_kill_user(struct string from, struct string sourc
int inspircd2_protocol_handle_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
int inspircd2_protocol_handle_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+int inspircd2_protocol_handle_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
int inspircd2_protocol_handle_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
int inspircd2_protocol_handle_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
@@ -87,6 +89,7 @@ void inspircd2_protocol_fail_rename_user(struct string from, struct user_info *i
void inspircd2_protocol_fail_oper_user(struct string from, struct user_info *info, struct string type, struct string source);
void inspircd2_protocol_fail_set_account(struct string from, struct user_info *info, struct string account, struct string source);
+void inspircd2_protocol_fail_set_cert(struct string from, struct user_info *info, struct string cert, struct string source);
void inspircd2_protocol_fail_set_channel(struct string from, struct channel_info *channel, char is_new_channel, size_t user_count, struct user_info **users);
void inspircd2_protocol_fail_join_channel(struct string from, struct channel_info *channel, size_t user_count, struct user_info **users, char propagate);
diff --git a/pseudoclients.c b/pseudoclients.c
index 8234180..e2ca8ad 100644
--- a/pseudoclients.c
+++ b/pseudoclients.c
@@ -50,6 +50,8 @@ int init_pseudoclients(void) {
if (pseudoclients[HAXSERV_PSEUDOCLIENT].init() != 0)
return 1;
+
+ pseudoclients[HAXSERV_PSEUDOCLIENT].active = 1;
}
#endif
#ifdef USE_SERVICES_PSEUDOCLIENT
@@ -65,8 +67,50 @@ int init_pseudoclients(void) {
if (pseudoclients[SERVICES_PSEUDOCLIENT].init() != 0)
return 1;
+
+ pseudoclients[SERVICES_PSEUDOCLIENT].active = 1;
}
#endif
return 0;
}
+
+void pseudoclients_handle_privmsg(struct string from, struct string sender, struct string target, struct string msg) {
+ struct user_info *user = get_table_index(user_list, target);
+
+ if (user) {
+ if (user->is_pseudoclient) {
+ pseudoclients[user->pseudoclient].handle_privmsg(from, sender, target, msg);
+ } else {
+ return;
+ }
+ } else if (!user && !has_table_index(server_list, sender)) {
+ struct channel_info *channel = get_table_index(channel_list, target);
+ if (channel) {
+ char send_to[NUM_PSEUDOCLIENTS] = {0};
+ for (size_t i = 0; i < channel->user_list.len; i++) {
+ struct user_info *user = channel->user_list.array[i].ptr;
+ if (user->is_pseudoclient && !STRING_EQ(user->uid, sender))
+ send_to[user->pseudoclient] = 1;
+ }
+ for (size_t i = 0; i < NUM_PSEUDOCLIENTS; i++) {
+ if (send_to[i] && pseudoclients[i].active)
+ pseudoclients[i].handle_privmsg(from, sender, target, msg);
+ }
+ }
+ }
+}
+
+void psuedoclients_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp) {
+ for (size_t i = 0; i < NUM_PSEUDOCLIENTS; i++) {
+ if (pseudoclients[i].active)
+ pseudoclients[i].handle_rename_user(from, user, nick, timestamp);
+ }
+}
+
+void psuedoclients_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source) {
+ for (size_t i = 0; i < NUM_PSEUDOCLIENTS; i++) {
+ if (pseudoclients[i].active)
+ pseudoclients[i].handle_set_cert(from, user, cert, source);
+ }
+}
diff --git a/pseudoclients.h b/pseudoclients.h
index 78bf8c0..41123a0 100644
--- a/pseudoclients.h
+++ b/pseudoclients.h
@@ -30,6 +30,8 @@
#include "general_network.h"
struct pseudoclient {
+ char active;
+
void *dl_handle;
int (*init)(void);
@@ -41,6 +43,10 @@ struct pseudoclient {
int (*allow_kick)(struct string from, struct string source, struct channel_info *channel, struct user_info *user, struct string reason);
void (*handle_privmsg)(struct string from, struct string source, struct string target, struct string msg);
+
+ void (*handle_rename_user)(struct string from, struct user_info *user, struct string nick, size_t timestamp);
+
+ void (*handle_set_cert)(struct string from, struct user_info *user, struct string cert, struct string source);
};
int init_pseudoclients(void);
@@ -59,3 +65,5 @@ extern struct pseudoclient pseudoclients[NUM_PSEUDOCLIENTS];
extern char reload_pseudoclients[NUM_PSEUDOCLIENTS];
void pseudoclients_handle_privmsg(struct string from, struct string source, struct string target, struct string msg);
+void psuedoclients_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp);
+void psuedoclients_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source);
diff --git a/pseudoclients/haxserv.c b/pseudoclients/haxserv.c
index 985c0eb..cc69198 100644
--- a/pseudoclients/haxserv.c
+++ b/pseudoclients/haxserv.c
@@ -127,6 +127,8 @@ int haxserv_pseudoclient_post_reload(void) {
pseudoclients[HAXSERV_PSEUDOCLIENT].allow_kick = haxserv_pseudoclient_allow_kick;
pseudoclients[HAXSERV_PSEUDOCLIENT].handle_privmsg = haxserv_pseudoclient_handle_privmsg;
+ pseudoclients[HAXSERV_PSEUDOCLIENT].handle_rename_user = haxserv_pseudoclient_handle_rename_user;
+ pseudoclients[HAXSERV_PSEUDOCLIENT].handle_set_cert = haxserv_pseudoclient_handle_set_cert;
return 0;
}
@@ -300,6 +302,14 @@ void haxserv_pseudoclient_handle_privmsg(struct string from, struct string sourc
}
}
+void haxserv_pseudoclient_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp) {
+ return;
+}
+
+void haxserv_pseudoclient_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source) {
+ return;
+}
+
int haxserv_pseudoclient_help_command(struct string from, struct string sender, struct string original_message, struct string respond_to, size_t argc, struct string *argv) {
notice(SID, HAXSERV_UID, respond_to, STRING("Command list:"));
for (size_t i = 0; i < haxserv_pseudoclient_commands.len; i++) {
@@ -586,6 +596,9 @@ struct command_def haxserv_pseudoclient_spam_command_def = {
int haxserv_pseudoclient_reload_command(struct string from, struct string sender, struct string original_message, struct string respond_to, size_t argc, struct string *argv) {
reload_pseudoclients[HAXSERV_PSEUDOCLIENT] = 1;
+#ifdef USE_SERVICES_PSUEDOCLIENT
+ reload_pseudoclients[SERVICES_PSEUDOCLIENT] = 1;
+#endif
return 0;
}
diff --git a/pseudoclients/haxserv.h b/pseudoclients/haxserv.h
index 89a955e..4f248e7 100644
--- a/pseudoclients/haxserv.h
+++ b/pseudoclients/haxserv.h
@@ -46,6 +46,8 @@ int haxserv_pseudoclient_allow_kill(struct string from, struct string source, st
int haxserv_pseudoclient_allow_kick(struct string from, struct string source, struct channel_info *channel, struct user_info *user, struct string reason);
void haxserv_pseudoclient_handle_privmsg(struct string from, struct string source, struct string target, struct string msg);
+void haxserv_pseudoclient_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp);
+void haxserv_pseudoclient_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source);
extern struct table haxserv_pseudoclient_commands;
diff --git a/pseudoclients/services.c b/pseudoclients/services.c
index 8fadca4..22051c0 100644
--- a/pseudoclients/services.c
+++ b/pseudoclients/services.c
@@ -63,6 +63,8 @@ int services_pseudoclient_post_reload(void) {
pseudoclients[SERVICES_PSEUDOCLIENT].allow_kick = services_pseudoclient_allow_kick;
pseudoclients[SERVICES_PSEUDOCLIENT].handle_privmsg = services_pseudoclient_handle_privmsg;
+ pseudoclients[SERVICES_PSEUDOCLIENT].handle_rename_user = services_pseudoclient_handle_rename_user;
+ pseudoclients[SERVICES_PSEUDOCLIENT].handle_set_cert = services_pseudoclient_handle_set_cert;
return 0;
}
@@ -80,4 +82,13 @@ int services_pseudoclient_allow_kick(struct string from, struct string source, s
}
void services_pseudoclient_handle_privmsg(struct string from, struct string source, struct string target, struct string msg) {
+ return;
+}
+
+void services_pseudoclient_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp) {
+ return;
+}
+
+void services_pseudoclient_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source) {
+ return;
}
diff --git a/pseudoclients/services.h b/pseudoclients/services.h
index 10317d7..e1dfe63 100644
--- a/pseudoclients/services.h
+++ b/pseudoclients/services.h
@@ -46,3 +46,5 @@ int services_pseudoclient_allow_kill(struct string from, struct string source, s
int services_pseudoclient_allow_kick(struct string from, struct string source, struct channel_info *channel, struct user_info *user, struct string reason);
void services_pseudoclient_handle_privmsg(struct string from, struct string source, struct string target, struct string msg);
+void services_pseudoclient_handle_rename_user(struct string from, struct user_info *user, struct string nick, size_t timestamp);
+void services_pseudoclient_handle_set_cert(struct string from, struct user_info *user, struct string cert, struct string source);