]> PatchyGit - patchyircd.git/commitdiff
remove channel_kill
authorEgor <egor@patchysicp.xyz>
Wed, 28 Jan 2026 15:08:26 +0000 (17:08 +0200)
committerEgor <egor@patchysicp.xyz>
Wed, 28 Jan 2026 15:09:23 +0000 (17:09 +0200)
src/irc.cpp
src/irc.hpp
src/ircdata.hpp
src/ircfmt.cpp
src/main.cpp
src/util.cpp
src/util.hpp

index 8ea267f..5ce7e8b 100644 (file)
@@ -1567,11 +1567,7 @@ void channel_part(Client *client, Channel *chan, const char *reason, Client *kic
        chan->v.remove(client);
        chan->member_count--;
        if (!chan->member_count && !(chan->dmode & DMODE_PERSIST))
-               channel_kill(chan);
-}
-void channel_kill(Channel *chan)
-{
-       delete chan;
+               delete chan;
 }
 Channel::~Channel() {
        channel_map.remove(this);
index 9f94383..0360d55 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2022 Sam Smith
-// Copyright (c) 2022-2025 Egor
+// Copyright (c) 2022-2026 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef IRC_H_
 #define IRC_H_
@@ -22,7 +22,6 @@ void channel_sendtopic(Client *client, Channel *chan, int joining);
 void channel_sendnames(Client *client, Channel *chan);
 void channel_join(Client *client, const char *channel, const char *chankey);
 void channel_part(Client *client, Channel *chan, const char *reason, Client *kicker);
-void channel_kill(Channel *chan);
 void channel_mode(Client *client, Channel *chan, char *args[]);
 void channel_topic(Client *src, Channel *chan, const char *topic, const char *who, time_t when);
 extern std::vector<char> databuf;
index 419f6bd..44942fd 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2022 Sam Smith
-// Copyright (c) 2022-2025 Egor
+// Copyright (c) 2022-2026 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef IRCDATA_H_
 #define IRCDATA_H_
@@ -117,7 +117,6 @@ struct Channel {
 };
 extern clientmap client_map;
 extern channelmap channel_map;
-extern stringset autojoin;
 extern Client  *clients;
 extern Client  *dyingclients;
 #endif
index 79bc827..2c9d15d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2022-2025 Egor
+// Copyright (c) 2022-2026 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
 #include "common.hpp"
 #include "ircfmt.hpp"
index 1f21903..1e4fe2b 100644 (file)
@@ -372,7 +372,7 @@ int main(int argc, char *argv[])
 #endif
        /* free any persistent channels */
        for (auto chan : channel_map.pop_view())
-               channel_kill(chan);
+               delete chan;
        client_map.clear();
        channel_map.clear();
        if (fchanlog)
index 14c056d..525ecf6 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2022 Sam Smith
-// Copyright (c) 2022-2025 Egor
+// Copyright (c) 2022-2026 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
 #include "common.hpp"
 #include "util.hpp"
index ff349f6..f4e04f3 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2022 Sam Smith
-// Copyright (c) 2022-2025 Egor
+// Copyright (c) 2022-2026 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef UTIL_H_
 #define UTIL_H_