Maintain backwards compatibility by sending symbols to the client
This commit is contained in:
parent
b6993f6e37
commit
dff6eb33c5
@ -1,3 +1,4 @@
|
||||
var _ = require("lodash");
|
||||
var identd = require("../../identd");
|
||||
var Msg = require("../../models/msg");
|
||||
|
||||
@ -58,6 +59,12 @@ module.exports = function(irc, network) {
|
||||
return;
|
||||
}
|
||||
|
||||
network.prefixLookup = {};
|
||||
|
||||
_.each(data.options.PREFIX, function(mode) {
|
||||
network.prefixLookup[mode.mode] = mode.symbol;
|
||||
});
|
||||
|
||||
network.serverOptions.PREFIX = data.options.PREFIX;
|
||||
|
||||
client.emit("network_changed", {
|
||||
|
@ -10,7 +10,14 @@ module.exports = function(irc, network) {
|
||||
}
|
||||
chan.users = [];
|
||||
_.each(data.users, function(u) {
|
||||
chan.users.push(new User(u));
|
||||
var user = new User(u);
|
||||
|
||||
// irc-framework sets characater mode, but lounge works with symbols
|
||||
if (user.mode) {
|
||||
user.mode = network.prefixLookup[user.mode];
|
||||
}
|
||||
|
||||
chan.users.push(user);
|
||||
});
|
||||
chan.sortUsers();
|
||||
client.emit("users", {
|
||||
|
Loading…
Reference in New Issue
Block a user