mscdex / node-oscar Goto Github PK
View Code? Open in Web Editor NEWAn OSCAR protocol client module for node.js
License: MIT License
An OSCAR protocol client module for node.js
License: MIT License
Got this error on new icq account with no contacts.
oscar.js:2214
for (var i=0,groups=Object.keys(items[0x01]),len=groups.length,gro
^
TypeError: Object.keys called on non-object
Great module. Thank you very much.
As node-oscar is a module for working with AIM/ICQ it would be nice to at least provide an example of connecting to ICQ (with new oscar.OscarConnection({username: 'xxx', password: 'xxx', host: 'login.icq.com', port: '443'})
or better still changing the default host/port
Here is ASCII ... Maybe UNICODE is better ?
OscarConnection.prototype.sendIM = function(who, message, flags, cb) {
.... charset = ICBM_MSG_CHARSETS.ASCII ....
No matter what I try all I get returned is undefined for both datetime and data when I use aim.me.icon
When using aim.getIcon I get a node.js error:
TypeError: Cannot read property 'users' of undefined at OscarConnection._downloadIcons
(C:\DOCUME1\ADMINI1\LOCALS1\Temp\nw3612_7201\node_modules\oscar\oscar.js:2583:50)1\ADMINI
at eval
(C:\DOCUME1\LOCALS1\Temp\nw3612_7201\node_modules\oscar\oscar.js:559:41) at process._tickCallback (node.js:534:11)
My function is:
aim.on('contactonline', function(user) {
aim.getIcon(user, function(error, data, size){
console.log(size);
});
});
Hi, I'm trying to create a simple ICQ client but I have problem with diacritics in both directions. The second client I use is Trillian.
Now when I send some string like "ěšččřžý" from Trilian to Node.JS the special characters are wrong . When I send the same string from Node.JS to trillian the message doesn't even display. There is no problem with common ascii chars in any direction. Any ideas where might be a problem? I can push my code to github if necessary.
Hello,
as i mentioned in an other ticket, i am building a constantly running bot. However i get a Connection reset after some time (ECONNRESET). I have not yet analyzed the length, but it is somewhere around 10-20minutes of inactivity.
Is there some sort of "ping" function, to signalize, that the client is still active, so the connection is not being reset?
events.js:72
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at errnoException (net.js:904:11)
at TCP.onread (net.js:558:19)
Hello.
I am using node-oscar to build a temporary fix for a friend (He can not join chatrooms, so i built a bot to forward the chat).
It works perfectly, however i can not figure out how ot encode special characters or more specifically german umlauts (ä,ö,ü,...) when receiving and sending them.
I tried UTF-8 encoding them, which results in it being \uFFFD (replacement character). Trying to use HTML for it (ü) results in the message not being sent.
My question now is: Is there a way to receive a message with a umlaut in it, if necessary convert it and then send it to someone else?
Hello.
I have using node-oscar for few days, ands sometimes it crashes in _createFLAP function here:
var seqNum = conn.seqNum = (conn.seqNum === 0x7FFF ? 0 : conn.seqNum + 1);
Crash reason — conn is undefined, but I have no closing, or some other events, from connection... this is weird. May be you can help with this issue?
Also I fix a few bugs, and implement authRequest and authReply and change encoding to UNICODE. Here is my diff: https://github.com/DarkSilence/node-oscar/commit/f78cb898b8f22a3e83e97c9aea6b12dc78035578
oscar/oscar.js:2214
for (var i=0,groups=Object.keys(items[0x01]),len=groups.length,gro
TypeError: Object.keys called on non-object
at Function.keys (native)
at OscarConnection._parseSNAC (app/node_modules/oscar/oscar.js:2214:40)
at Socket.data_handler (app/node_modules/oscar/oscar.js:746:14)
at Socket.<anonymous> (app/node_modules/oscar/oscar.js:872:72)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
My OscarConnections consistently time out after 2 hours, 11 minutes and 17 seconds. What can I do to prevent this? I have been just reconnecting them, but then after a while the program dies with an error about "too many open files".
Not sure if this is a node-oscar issue actually, but I encountered this when using perfectly valid user details. After some search I found that the problem was in password length: passwords longer than 8 characters are not processed properly. If you encounter the same error and are lost you might want to try changing the password to a shorter one
http.js:1093
s.on('free', onFree);
^
TypeError: Cannot call method 'on' of undefined
at Agent.createSocket (http.js:1093:5)
at Agent.addRequest (http.js:1070:23)
at new ClientRequest (http.js:1205:16)
at Object.exports.request (http.js:1585:10)
at Request.request.self.start (/Users/bryan/Dropbox/web-www/zapim/node_modules/request/main.js:348:32)
at Request.write (/Users/bryan/Dropbox/web-www/zapim/node_modules/request/main.js:561:28)
at Request.request (/Users/bryan/Dropbox/web-www/zapim/node_modules/request/main.js:530:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Easy fix, seems like the overloading of the connect() method on socket is what messes it up, simply comment out the overloading:
var _oldStreamConnect = net.Stream.prototype.connect;
net.Stream.prototype.connect = function(port, host) {
this.remoteAddress = host;
this.remotePort = port;
_oldStreamConnect.apply(this, Array.prototype.slice.call(arguments));
};
Should be:
// var _oldStreamConnect = net.Stream.prototype.connect;
// net.Stream.prototype.connect = function(port, host) {
// this.remoteAddress = host;
// this.remotePort = port;
// _oldStreamConnect.apply(this, Array.prototype.slice.call(arguments));
// };
I get the following error while trying to run test.js
in a blank project using Node v0.10.25:
/home/user/oscarTest/node_modules/oscar/oscar.js:2676
hash[i] = oldhash.charCodeAt(i);
^
TypeError: Object s���h½�▒▒^�# has no method 'charCodeAt'
at OscarConnection._login (/home/user/oscarTest/node_modules/oscar/oscar.js:2676:29)
at /home/user/oscarTest/node_modules/oscar/oscar.js:2653:62
at process._tickCallback (node.js:415:13)
username and password have been changed in test.js
to valid values.
callback is fired but info object undefined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.