Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nurupo
Last active October 14, 2023 16:16
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nurupo/91b0ebc7f85059b57ea7108a25ae6c69 to your computer and use it in GitHub Desktop.
Save nurupo/91b0ebc7f85059b57ea7108a25ae6c69 to your computer and use it in GitHub Desktop.
How to close a channel on Freenode when migrating to Libera

How to close a channel on Freenode when migrating to Libera

Run /msg NickServ LISTCHANS to see what permissions you have in what channels.

For each channel you have +s, +R and either +o or +O or +t permissions in, run:

/msg ChanServ OP #channel
/msg ChanServ SET #channel TOPICLOCK OFF
/msg ChanServ TOPIC #channel We have moved to irc.libera.chat
/topic We have moved to irc.libera.chat
/msg ChanServ SET #channel TOPICLOCK ON
/msg ChanServ SET #channel KEEPTOPIC ON
/msg ChanServ SET #channel GUARD ON
/msg ChanServ SET #channel ENTRYMSG We have moved to irc.libera.chat
/msg ChanServ SET #channel MLOCK +fist ##moved_to_libera
/msg ChanServ CLEAR #channel BANS I
/msg ChanServ CLEAR #channel USERS We have moved to irc.libera.chat
/part #channel

These will kick everyone out of the #channel (ChanServ is unkickable), and will make any attempts to join the channel result in joining ##moved_to_libera instead. Note that this clears channel's invite list to achieve that.

It will also hide the channel from /list, in a perhaps futile attempt to slow down the new Freenode staff from dropping the channel.

You might want to edit the message to indicate the new channel name, if it differs on Libera. Note that the message is used in four places, so don't forget to edit them all!

If you are extra paranoid, you could setup your own duplicate of ##moved_to_libera, e.g. #channel-libera, and use that instead.

Explanation of the required channel permissions: you need +s to use the SET commands, +R to use the CLEAR commands and any of +o/+O/+t to change the channel topic one way or another.


If you only have +o or +O permissions in a channel, you could achieve close to the above by running:

/msg ChanServ OP #channel
/topic We have moved to irc.libera.chat
/mode #channel +fist ##moved_to_libera

then checking the invite list with /mode #channel +I and removing everyone from it one by one with /mode #channel -I nick,

then kicking everyone from the channel one byone with /kick nick We have moved to irc.libera.chat.

It is possible for the /topic command to fail if the channel has TOPICLOCK flag set and you don't have +t permission.

Note that the channel modes will be lost if the channel becomes empty, so without being able to use MLOCK to make the modes persistent, it's the best to stay in the channel to keep them alive. If the channel has GUARD listed in /msg ChanServ info #channel then ChanServ should remain in the channel, which should prevent the channel from dropping the modes.

@Minoru
Copy link

Minoru commented May 24, 2021

Thanks for a nice guide!

One more thing the operator can do is /msg ChanServ SET #channel ENTRYMSG We have moved to irc.libera.chat, so that users don't even have to look at the topic — a message will be shown right where the users are likely to look.

@nurupo
Copy link
Author

nurupo commented May 24, 2021

@Minoru It doesn't make sense to set the entrymesg. +i makes the channel invite-only, so the users aren't able to join the channel, and since they can't join, they don't see see the topic not don't receive the entrymsg. However, the ##moved_to_libera that the users get redirected to does have the topic and the entrymsg set.

@Minoru
Copy link

Minoru commented May 24, 2021

Ah, makes sense, thank you!

@nurupo
Copy link
Author

nurupo commented May 24, 2021

they don't see see the topic not don't receive the entrymsg

Now that I think about it, there is actually another way to see the entrymsg, one without joining the channel -- by examining the channel with /msg ChanServ INFO #channel. So I guess it might make sense to set it after all, in case someone runs /msg ChanServ INFO #channel on the channel.

@nurupo
Copy link
Author

nurupo commented May 24, 2021

@Minoru added the ENTRYMSG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment