Method code for $channel_ui.channel_off()

[Turn on line numbering]
arg channel;

if (active_channels.contains(channel)) {
    if (channel in $channel_db.system_channels())
        .tell("<" + channel + "> You have left this channel.");
    else
        .broadcast(channel, ":has left this channel.");
    active_channels = active_channels.del(channel);
} else {
    .tell("You are not on this channel.");
}

// Created 24-Jul-1996 as a part of ColdCore, see: @help Credit

Tlon