]> PatchyGit - patchyircd.git/commitdiff
use PACKAGE_* defines
authorEgor <egor@patchysicp.xyz>
Wed, 11 Jun 2025 09:59:42 +0000 (12:59 +0300)
committerEgor <egor@patchysicp.xyz>
Wed, 11 Jun 2025 09:59:42 +0000 (12:59 +0300)
src/irc.cpp
src/ircfmt.cpp
src/main.cpp

index 2942c4e..f21809b 100644 (file)
@@ -822,7 +822,7 @@ saslcleanup:
                        return err_notregistered(client), sendbuf(client), 0;
                if (args[0] && strcmp(args[0], hostname) != 0)
                        return err_nosuchserver(client, args[0]), sendbuf(client), 0;
-               rpl_version(client, "v0.0.1", "PatchyIRCD v0.0.1"), sendbuf(client);
+               rpl_version(client, PACKAGE_VERSION, PACKAGE_STRING), sendbuf(client);
                rpl_isupport(client), sendbuf(client);
        } else if(strcmp(command, "ADMIN") == 0) {
                if (!is_registered(client))
index b02dd08..08a0b0c 100644 (file)
@@ -140,7 +140,7 @@ void rpl_welcome(struct client_data *client) // 001
 }
 void rpl_yourhost(struct client_data *client) // 002
 {
-       copy_strf(&databuf, ":%s 002 %s :Your host is PatchyIRCD, running version 0.0.1\r\n", hostname, client->nick);
+       copy_strf(&databuf, ":%s 002 %s :Your host is " PACKAGE_NAME ", running version " PACKAGE_VERSION "\r\n", hostname, client->nick);
 }
 void rpl_created(struct client_data *client) // 003
 {
@@ -148,7 +148,7 @@ void rpl_created(struct client_data *client) // 003
 }
 void rpl_myinfo(struct client_data *client) // 004
 {
-       copy_strf(&databuf, ":%s 004 %s PatchyIRCD 0.0.1 iworZ beIqwklPimnstov\r\n", hostname, client->nick);
+       copy_strf(&databuf, ":%s 004 %s " PACKAGE_STRING " iworZ beIqwklPimnstov\r\n", hostname, client->nick);
 }
 void rpl_isupport(struct client_data *client) // 005
 {
index 2a4c930..91a5e51 100644 (file)
@@ -195,7 +195,7 @@ static void determine_hostname(void)
 static void show_license(void)
 {
        fprintf(stderr,
-"PatchyIRCD 0.0.1\n"
+PACKAGE_STRING "\n"
 "Copyright (c) 2022, 2024 Sam Smith\n"
 "Copyright (c) 2022-2025 Egor\n"
 "\n"
@@ -222,7 +222,7 @@ int main(int argc, char *argv[])
 
        show_license();
 
-       fprintf(stderr, "[PatchyIRCD]: Starting up...\n");
+       fprintf(stderr, "Starting up...\n");
 
        net_init();
        netpoll::init();
@@ -372,7 +372,7 @@ int main(int argc, char *argv[])
        // Main loop
        while (is_running || dyingclients) {
                if (is_siginted) {
-                       fprintf(stderr, "[PatchyIRCD]: Cleaning up...\n");
+                       fprintf(stderr, "Cleaning up...\n");
                        for (int i = 0; i < listener_count; i++) {
                                netpoll::del_and_close(listeners[i].sock);
                        }