Fix #368
This commit is contained in:
parent
f3dae85b99
commit
89c94701dc
|
@ -291,7 +291,8 @@ function handleNewChannel(req, res) {
|
|||
var sv = Server.getServer();
|
||||
if (sv.isChannelLoaded(name)) {
|
||||
var chan = sv.getChannel(name);
|
||||
chan.users.forEach(function (u) {
|
||||
var users = Array.prototype.slice.call(chan.users);
|
||||
users.forEach(function (u) {
|
||||
u.kick("Channel reloading");
|
||||
});
|
||||
|
||||
|
@ -377,6 +378,19 @@ function handleDeleteChannel(req, res) {
|
|||
webserver.ipForRequest(req) + " deleted channel " +
|
||||
name);
|
||||
}
|
||||
var sv = Server.getServer();
|
||||
if (sv.isChannelLoaded(name)) {
|
||||
var chan = sv.getChannel(name);
|
||||
chan.clearFlag(require("../flags").C_REGISTERED);
|
||||
var users = Array.prototype.slice.call(chan.users);
|
||||
users.forEach(function (u) {
|
||||
u.kick("Channel reloading");
|
||||
});
|
||||
|
||||
if (!chan.dead) {
|
||||
chan.emit("empty");
|
||||
}
|
||||
}
|
||||
db.channels.listUserChannels(loginName, function (err2, channels) {
|
||||
sendJade(res, "account-channels", {
|
||||
loggedIn: true,
|
||||
|
|
Loading…
Reference in a new issue