File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1-
1+ // <% if(pkg.build['node server']) { %> only include this code if "node server" set in package.json
22irc . NodeConnection = new Class ( {
33 Implements : [ Options , Events ] ,
44 Binds : [ "_recv" , "_error" ] ,
@@ -150,3 +150,5 @@ irc.NodeConnection = new Class({
150150 return _.delay(this.autoretry, next, this);
151151 }*/
152152} ) ;
153+
154+ // <% } %>
Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ irc.IRCClient = new Class({
3232 self . nickname = options . nickname ;
3333 self . lowerNickname = self . toIRCLower ( self . nickname ) ;
3434
35+ //sorry ugly bit of templating :(
36+
37+ // <% if(pkg.build['twisted server'] && pkg.build['node server']) { %>
3538 if ( options . node ) {
39+ // <% } %>
40+ //<% if(pkg.build['node server']) { %>
3641 var conn = self . connection = new irc . NodeConnection ( {
3742 account : options . account ,
3843 nickname : self . nickname ,
@@ -46,7 +51,11 @@ irc.IRCClient = new Class({
4651 "connected" : self . connected ,
4752 "lostConnection" : self . lostConnection
4853 } ) ;
54+ // <% } %>
55+ // <% if(pkg.build['twisted server'] && pkg.build['node server']) { %>
4956 } else {
57+ // <% } %>
58+ //<% if(pkg.build['twisted server']) { %>
5059 self . connection = new irc . TwistedConnection ( {
5160 nickname : self . nickname ,
5261 serverPassword : options . serverPassword ,
@@ -56,7 +65,10 @@ irc.IRCClient = new Class({
5665 // "retry": self.retry,
5766 "lostConnection" : self . lostConnection
5867 } ) ;
68+ // <% } %>
69+ // <% if(pkg.build['twisted server'] && pkg.build['node server']) { %>
5970 }
71+ // <% } %>
6072
6173 // self.commandparser = new irc.Commands(self);
6274 // self.exec = self.commandparser.exec;
Original file line number Diff line number Diff line change 1- // /* This could do with a rewrite from scratch. */
2- //going to rewrite using socket.io commet.
1+ // <% if(pkg.build['twisted server']) { %> only include this code if "twisted server" set in package.json
32// //uris = dict(p=push, n=newConnection, s=subscribe)
43( function ( ) {
54 //http://blog.mibbit.com/?p=143
4847 initialize : function ( options ) {
4948 this . setOptions ( options ) ;
5049 this . __timeout = this . options . initialTimeout ;
50+ this . cacheAvoidance = util . randHexString ( 16 ) ;
5151 } ,
5252
5353 connect : function ( ) {
5454 var self = this ;
5555 self . connected = true ;
56- self . cacheAvoidance = util . randHexString ( 16 ) ;
5756 var request = self . newRequest ( "n" ) ;
5857
5958 request . addEvent ( "complete" , function ( stream ) {
299298 }
300299 } ) ;
301300} ) ( ) ;
301+ // <% } %>
You can’t perform that action at this time.
0 commit comments