Permalink
Browse files

Movin' stuff

  • Loading branch information...
1 parent 5df705e commit eb193c0d24cdd124c0e9b0972a8acfe1bde2f4fd @sent1nel committed Jun 28, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 index.js
View
@@ -16,8 +16,6 @@ function zIRCClient(stream, options) {
this.send_anyway = false;
this.commands_sent = 0;
- var self = this;
-
/*
Client-generated event handling
The driver accepts these events from the client
@@ -37,6 +35,9 @@ function zIRCClient(stream, options) {
- setNick
- quit
*/
+
+ var self = this;
+
this.on("PONG", function (hostname) {
this.send_command("PONG %s", [ hostname ]);
});
@@ -141,7 +142,7 @@ function zIRCClient(stream, options) {
});
this.on("away", function (message) {
- message = (typeof message == 'undefined') ? '' : message;
+ message = (typeof message === 'string') ? message : '';
this.send_command("AWAY :%s", [ message ]);
});

0 comments on commit eb193c0

Please sign in to comment.