diff options
-rw-r--r-- | commands.c | 2 | ||||
-rw-r--r-- | general_network.c | 6 | ||||
-rw-r--r-- | network.h | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -59,7 +59,7 @@ int help_command(struct string sender, struct string original_message, struct st offset += 2; memcpy(&(message.data[offset]), def->summary.data, def->summary.len); - PRIVMSG(STRING("1HC000000"), to, message); + privmsg(STRING("1HC000000"), to, message); } return 0; diff --git a/general_network.c b/general_network.c index 475591a..01384ca 100644 --- a/general_network.c +++ b/general_network.c @@ -82,7 +82,7 @@ char channel_mode_types[UCHAR_MAX] = { ['X'] = MODE_TYPE_MULTIPLE, }; -int PRIVMSG(struct string source, struct string target, struct string message) { +int privmsg(struct string source, struct string target, struct string message) { if (!(target.len == 9 && memcmp(target.data, "1HC000001", 9) == 0)) { // if not sending to our one local user if (source.len != 0) { SEND(STRING(":")); @@ -120,9 +120,9 @@ int PRIVMSG(struct string source, struct string target, struct string message) { SENDCLIENT(STRING("@")); SENDCLIENT(hostmask); } else if (source.len == 3 && memcmp(source.data, "1HC", 3) == 0) { - SENDCLIENT(STRING(":")); SENDCLIENT(server_name); - SENDCLIENT(STRING(" ")); + } else { + SENDCLIENT(source); } SENDCLIENT(STRING(" PRIVMSG ")); } else { @@ -108,6 +108,6 @@ extern char channel_mode_types[UCHAR_MAX]; #define SENDCLIENT(x) write(client_fd, x.data, x.len) -extern int PRIVMSG(struct string source, struct string target, struct string message); +extern int privmsg(struct string source, struct string target, struct string message); extern 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); extern int remove_user(struct string uid, struct string reason); |