Replace illegal characters in username
When a user has an _ or any other non-alphanumeric characters in their nickname, Shout would fail to connect to some IRC servers. This replaces all non-alphanumeric characters in the nickname before sending it as the username.
This commit is contained in:
parent
40f8a4ddc4
commit
35f347472a
@ -150,7 +150,7 @@ Client.prototype.connect = function(args) {
|
||||
});
|
||||
|
||||
var nick = args.nick || "shout-user";
|
||||
var username = args.username || nick;
|
||||
var username = args.username || nick.replace(/[^a-zA-Z0-9]/g, '');
|
||||
var realname = args.realname || "Shout User";
|
||||
|
||||
var irc = slate(stream);
|
||||
|
Loading…
Reference in New Issue
Block a user