message: Strip invalid chars early in getNick()
diff: const logging = require("../logging");
  const IrcClientConfig = require("../models/IrcClientConfig");
  const log = logging.get("IrcServer");
  +const BridgedClient = require("./BridgedClient");
  const GROUP_ID_REGEX = /^\+\S+:\S+$/;
  @@ -435,6 +436,8 @@ IrcServer.prototype.getAliasFromChannel = function(channel) {
  IrcServer.prototype.getNick = function(userId, displayName) {
  var localpart = userId.substring(1).split(":")[0];
  var display = displayName || localpart;
  + // Carefully replace any characters that will never be displayed.
  + display = BridgedClient.illegalCharactersRegex.replace(display, "");
  var template = this.config.ircClients.nickTemplate;
  var nick = template.replace(/\$USERID/g, userId);
  nick = nick.replace(/\$LOCALPART/g, localpart);
  