From: Egor Date: Wed, 28 Jan 2026 15:08:26 +0000 (+0200) Subject: remove channel_kill X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=c870066d187a6a2f9eb1aadbeff924a821317f82;p=patchyircd.git remove channel_kill --- diff --git a/src/irc.cpp b/src/irc.cpp index 8ea267f..5ce7e8b 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -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); diff --git a/src/irc.hpp b/src/irc.hpp index 9f94383..0360d55 100644 --- a/src/irc.hpp +++ b/src/irc.hpp @@ -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 databuf; diff --git a/src/ircdata.hpp b/src/ircdata.hpp index 419f6bd..44942fd 100644 --- a/src/ircdata.hpp +++ b/src/ircdata.hpp @@ -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 diff --git a/src/ircfmt.cpp b/src/ircfmt.cpp index 79bc827..2c9d15d 100644 --- a/src/ircfmt.cpp +++ b/src/ircfmt.cpp @@ -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" diff --git a/src/main.cpp b/src/main.cpp index 1f21903..1e4fe2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) diff --git a/src/util.cpp b/src/util.cpp index 14c056d..525ecf6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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" diff --git a/src/util.hpp b/src/util.hpp index ff349f6..f4e04f3 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -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_