* @param {Fucntion} callback A callback function\r
*/\r
this.setEncoding = function (connection_id, new_encoding, callback) {\r
- var data = {\r
- method: 'encoding',\r
- args: {\r
- encoding: new_encoding\r
- }\r
- };\r
-\r
- this.sendData(connection_id, data, callback);\r
+ var data = {\r
+ method: 'encoding',\r
+ args: {\r
+ encoding: new_encoding\r
+ }\r
+ };\r
+ this.sendData(connection_id, data, callback);\r
};\r
\r
/**\r
ENCODING: function (args, irc_connection, callback) {\r
if (args.encoding) {\r
if (irc_connection.setEncoding(args.encoding)) {\r
- return callback('Encoding modified to '+args.encoding);\r
+ return callback('Encoding modified to '+args.encoding);\r
} else {\r
- return callback(args.encoding+' is not a valid encoding');\r
+ return callback(args.encoding+' is not a valid encoding');\r
}\r
}\r
}\r
*/
IrcConnection.prototype.setEncoding = function (encoding) {
- if (global.config.available_encodings.indexOf(encoding.toUpperCase()) >= 0) {
- this.encoding = encoding.toUpperCase();
- return true;
- }
- return false;
+ if (global.config.available_encodings.indexOf(encoding.toUpperCase()) >= 0) {
+ this.encoding = encoding.toUpperCase();
+ return true;
+ }
+ return false;
};