weechat-protocol.js: uiatos -> uia2s

This commit is contained in:
Philippe Proulx 2013-10-05 15:03:36 -04:00
parent 3a9ccc4098
commit 5a14c1a412

View file

@ -12,8 +12,9 @@ var WeeChatProtocol = function() {
'arr': this.getArray 'arr': this.getArray
}; };
}; };
WeeChatProtocol._uiatos = function(uia) { WeeChatProtocol._uia2s = function(uia) {
var _str = []; var _str = [];
for (var c = 0; c < uia.length; c++) { for (var c = 0; c < uia.length; c++) {
_str[c] = String.fromCharCode(uia[c]); _str[c] = String.fromCharCode(uia[c]);
} }
@ -62,7 +63,7 @@ WeeChatProtocol.prototype = {
var pointer = this.getSlice(l) var pointer = this.getSlice(l)
var parsed_data = new Uint8Array(pointer); var parsed_data = new Uint8Array(pointer);
return WeeChatProtocol._uiatos(parsed_data); return WeeChatProtocol._uia2s(parsed_data);
}, },
getInt: function() { getInt: function() {
var parsed_data = new Uint8Array(this.getSlice(4)); var parsed_data = new Uint8Array(this.getSlice(4));
@ -84,7 +85,7 @@ WeeChatProtocol.prototype = {
var s = this.getSlice(l); var s = this.getSlice(l);
var parsed_data = new Uint8Array(s); var parsed_data = new Uint8Array(s);
return WeeChatProtocol._uiatos(parsed_data); return WeeChatProtocol._uia2s(parsed_data);
} }
return ""; return "";
@ -99,7 +100,7 @@ WeeChatProtocol.prototype = {
getType: function() { getType: function() {
var t = this.getSlice(3); var t = this.getSlice(3);
return WeeChatProtocol._uiatos(new Uint8Array(t)); return WeeChatProtocol._uia2s(new Uint8Array(t));
}, },
runType: function(type) { runType: function(type) {
var cb = this.types[type]; var cb = this.types[type];