Git Product home page Git Product logo

ircd.js's Introduction

 ::::::::::..     .,-::::::::::::-.         ....:::::: .::::::. 
 ;;;;;;;``;;;;  ,;;;'````' ;;,   `';,    ;;;;;;;;;````;;;`    ` 
 [[[ [[[,/[[['  [[[        `[[     [[    ''`  `[[.    '[==/[[[[,
 $$$ $$$$$$c    $$$         $$,    $$   ,,,    `$$      '''    $
 888 888b "88bo,`88bo,__,o, 888_,o8P'd8b888boood88     88b    dP
 MMM MMMM   "W"   "YUMMMMMP"MMMMP"`  YMP"MMMMMMMM"      "YMmMY" 

                                            A Node.JS IRC Server
 ircd.js

About

I’m implementing RFC 1459 / RFC 2812 for Node.js.

The server will allow clients to connect, join channels, change topics; basic stuff.

Done:

  • PASS (connection password)
  • PING/PONG
  • PRIVMSG
  • MODE
  • JOIN
  • TOPIC
  • NAMES
  • LIST
  • INVITE
  • WHOWAS
  • TIME
  • VERSION
  • AWAY
  • WHO
  • OPER
  • KICK
  • WALLOP
  • CONNECT
  • Connection garbage like MOTD
  • Basic data validation
  • Simple JSON config file
  • Channel modes: o, p, s, t, n, m, i, l, b, v, k
  • User modes: i, w, o

Planned:

  • Services
  • Bring back server links
  • Server-to-server NICK messages when nicks are changed or new clients join
  • Server-to-server messages for JOIN, NJOIN, MODE, PRIVSG and NOTICE
  • SQUIT and QUIT for links
  • Server to server communication
  • More basic commands: NOTICE, LINKS, TRACE, ADMIN, INFO
  • Log files and logging options
  • Local ops (+O)
  • Stats command

Documentation

Install with npm install ircdjs.

Set up configuration in /etc/ircdjs/config.json.

Contributions

  • overra
  • jazzychad (Chad Etzel)
  • sespindola (Sebastian A. Espindola)
  • niklasf
  • treeform
  • guybrush (Patrick Pfeiffer)
  • eirikb (Eirik Brandtzæg)
  • andrew12 (Andrew Herbig)
  • jrasanen (Jussi Räsänen)

License (GPL)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

ircd.js's People

Contributors

sespindola avatar niklasf avatar overra avatar hannahherbig avatar cameronnemo avatar jazzychad avatar coolstar avatar jus101 avatar matejkramny avatar maxime-gaudron avatar neiltron avatar simonwex avatar sonnyp avatar zarino avatar eirikb avatar slifin avatar

Stargazers

X Caminhante avatar Roman Kelesidis avatar kaste avatar  avatar  avatar Varshith Kancharla avatar Goran Džaferi avatar  avatar YoungChief avatar Yonle avatar Humberto Campolina avatar Meleeman avatar Jean-Paul Sauve avatar Tim Shaker avatar  avatar Violet avatar Scott Cooper avatar cozy avatar Terrance Robotham avatar  avatar Seven Chan avatar Zach Bloomquist avatar Sunny avatar Joshua Byrd avatar Iqbal Rifai avatar David Ralph avatar zehcnas34 avatar Daniel Kats avatar Ingwie Phoenix avatar Wittawas Nakkasem avatar Shane avatar Tom Smith avatar  avatar Alex King avatar Tamino Tsai avatar Michael McGloin avatar  avatar  avatar David Eugene avatar Binar Web avatar Andrew Nagy avatar Andrejs Agejevs avatar B H avatar Jacky Alciné avatar Mert avatar Deividy Metheler avatar Mikal avatar heimindanger avatar Kyungyeol Kim (Bret) avatar Dorian avatar 载颐 avatar jbs avatar Konstantin Semyanystyi avatar DeathlyNocturnal avatar Dhruv avatar Chen Chao Shih (Frank) avatar ansuz avatar Dmitry Shadrunov avatar Reiner avatar Alexis Hovorka avatar Soma Szelpal avatar Victor Truong avatar Humoyun avatar Sean H avatar Max avatar James Hernandez avatar  avatar Travis Pulley avatar  avatar Thiago Paes avatar 翎栋 avatar pandada8 avatar Ishan Marikar avatar Ziyad Parekh avatar Arindam Paul avatar David K avatar alekzonder avatar Josh Byrnes avatar Oskar Thornblad avatar Doug Estey avatar Uoc Nguyen avatar 真如赝 avatar trskldn avatar Kevin Hatfield avatar Tony Crisci avatar Son Tran avatar Saravana J avatar Matthew Raymer avatar jermdw avatar Jon Baer avatar Sean Wilson avatar Thomas Kjærgaard avatar Porramate Lim avatar Kristian Koivisto-Kokko avatar Jamie Holly avatar  avatar Doug Hardy avatar Triet Luong avatar hagb4rd (earendel) avatar Andrew Palmer avatar

Watchers

Michael Huynh avatar Ben Ellis avatar Alexander Nestorov avatar  avatar James (setkeh) Griffis avatar tom zhou avatar Brad avatar yuichi takeda avatar James Cloos avatar  avatar  avatar Michael Anthony avatar  avatar Ed Rochenski avatar Jamezs Gladney avatar Massimo Neri avatar  avatar Zach D. LAMAZIÈRE avatar Dorian avatar  avatar Matt Scott avatar  avatar Justin Garfield avatar 真如赝 avatar  avatar

ircd.js's Issues

ircdjs is too slow

I start ircdjs, connect two clients locally and join the same channel.

Now if I write a lot of lines quickly, the first lines will be displayed immediately by the other client.

But after about 5 lines it will be terribly slow:

Every 3 seconds (!) a new line will be displayed!

Push new version to npm?

Would it be possible to push a new version into npm any time soon?

npm holds a 7 months old version and after that a couple of much needed issues has been resolved. At the moment its not possible to use the version of this module which is in npm as a requirement in another project due to this issue.

Having that feature in npm release would be great.

'make' fails

make fails with the tests.

WDG:ircd.js-master Wes$ make
./node_modules/.bin/mocha --reporter list -c --ui exports test/*.test.js

  1) Channels test bad join (#22)
  2) Channels "after each" hook
  3) Clients test valid WHOIS
  4) Clients "after each" hook
  ․ Protocol test nickname validation: 0ms
  ․ Protocol test channelname validation: 0ms
  ․ Protocol test channelkey validation: 0ms
  ․ Server test connection passwords: 160ms
  ․ Sockets test destroy a socket: 0ms
  ․ Sockets test send garbage: 1ms
  5) Sockets "after each" hook

  6 passing (8s)
  5 failing

  1) Channels test bad join (#22):
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  2) Channels "after each" hook:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  3) Clients test valid WHOIS:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  4) Clients "after each" hook:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  5) Sockets "after each" hook:
     Uncaught Error: read ECONNRESET
      at errnoException (net.js:901:11)
      at TCP.onread (net.js:556:19)



make: *** [test] Error 5
WDG:ircd.js-master Wes$ sudo make
./node_modules/.bin/mocha --reporter list -c --ui exports test/*.test.js

  1) Channels test bad join (#22)
  2) Channels "after each" hook
  3) Clients test valid WHOIS
  4) Clients "after each" hook
  ․ Protocol test nickname validation: 1ms
  ․ Protocol test channelname validation: 0ms
  ․ Protocol test channelkey validation: 1ms
  ․ Server test connection passwords: 166ms
  ․ Sockets test destroy a socket: 0ms
  ․ Sockets test send garbage: 1ms
  5) Sockets "after each" hook

  6 passing (8s)
  5 failing

  1) Channels test bad join (#22):
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  2) Channels "after each" hook:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  3) Clients test valid WHOIS:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  4) Clients "after each" hook:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/Wes/Downloads/ircd.js-master/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  5) Sockets "after each" hook:
     Uncaught Error: read ECONNRESET
      at errnoException (net.js:901:11)
      at TCP.onread (net.js:556:19)



make: *** [test] Error 5
WDG:ircd.js-master Wes$ 

Does anyone know this problem?

Thanks.

External Auth/DB Support

Rather than using the same ol' NickServ, I'd propose filling the hole that nickserv currently does not fill, external auth connections.

This would have to be fleshed out more, but some procedure of validating ext users and passwords (or session identifiers) with external databases.

USE CASE:
Any website with a users table. The nickserv would only allow connections (or only joins to +r rooms) from users who have validated against it.

Specifically, a forum website could ensure that everyone uses their forum names in the chat. Therefore, using your favorite client (which we all know is irsii) or, for seemless integration, the webclient could send a session key to the client (which would be stored in the db).

I understand this is months away, just wanted to add that the future projects :)

LIST only seems to be showing channels you are connected to

i am trying to get a full list of channels on the server from a client (limechat) i have got another client (adium) connected to a channel that the first isn't but when i send /list from limechat i only get a listing of the channels i am connected to.

is this the expected behaviour? and if it is, is there a way i can get the full list?

Crash

[server1, C: Kettch23] USER Kettch Kettch irc.aff2aw.com :Kettch
S: [Kettch23] :localhost 001 Kettch23 Welcome to the ircn IRC network :[email protected]
S: [Kettch23] :localhost 002 Kettch23 Your host is localhost running version 0.0.4
S: [Kettch23] :localhost 003 Kettch23 This server was created on 2011-10-31
S: [Kettch23] :localhost 004 Kettch23 0.0.4
S: [Kettch23] :localhost 375 Kettch23 :- Message of the Day -
S: [Kettch23] :localhost 372 Kettch23 :-
S: [Kettch23] :localhost 376 Kettch23 :End of /MOTD command.
S: [Kettch23] :[email protected] MODE Kettch23 +w Kettch23
[server1, C: Kettch23] JOIN #aff,#psbeta,#public ,secret

/p/ircd.js/lib/user.js:98
var parts = mask.match(/([^!])!([^@])@(.*)/) || [],
^
TypeError: Cannot call method 'match' of undefined
at Object.matchesMask (/p/ircd.js/lib/user.js:98:22)
at /p/ircd.js/lib/channel.js:83:19
at Array.some (native)
at Object.isBanned (/p/ircd.js/lib/channel.js:82:24)
at Object.join (/p/ircd.js/lib/storage.js:122:17)
at /p/ircd.js/lib/commands.js:72:25
at Array.forEach (native)
at Object. (/p/ircd.js/lib/commands.js:64:29)
at EventEmitter. (/p/ircd.js/lib/server.js:112:34)
at EventEmitter.emit (events.js:72:17)

Switch to redis for users and channels

Hi,
Just as a thought, have you considered using redis for users and channels? It would offload the burden of having to keep track of connected users, channels (users in those channels) etc and allow the javascript vm to handle more important things. I would like to hear what you think about this.

brian

configuration documentation

I'd like to set this up partially to help introduce my coworkers to node.js but I'm not that familiar with IRC configurations so I was hoping to get some documentation of the config file.

Ted

Still having issues PMing people.

It looks like the user can join and be active on a channel but not be in the user store's list of people.

You can look at my branch i put print statements when iterating over users:

[server1, C: treeform] PRIVMSG luque foo
looking for luque
user: Blah64 false
user: Stranj false
user: Kynes false
user: SkyWay false
user: ikarus false
user: Kettch23 false
user: Sudazima false
user: treeform false
user: Matt false

but when some one does a who:

[server1, C: Kettch23] WHO #aff
S: [Kettch23] :localhost 352 Kettch23 #aff stranj 87-194-127-38.bethere.co.uk localhost Stranj H :0 stranj
S: [Kettch23] :localhost 352 Kettch23 #aff SkyWay a91-156-174-241.elisa-laajakaista.fi localhost SkyWay H :0 SkyWay
S: [Kettch23] :localhost 352 Kettch23 #aff Xyx 42-1-223.ftth.xms.internl.net localhost XyxAFK H :0 Xyx
S: [Kettch23] :localhost 352 Kettch23 #aff ikarus 92.82.225.135 localhost @ikaRus H :0 ...
S: [Kettch23] :localhost 352 Kettch23 #aff Kettch business-188-111-108-254.static.arcor-ip.net localhost @kettch23 H :0 Kettch
S: [Kettch23] :localhost 352 Kettch23 #aff sudazima 138-206.mxp.dsl.internl.net localhost Sudazima H :0 sudazima
S: [Kettch23] :localhost 352 Kettch23 #aff me 108-60-121-46.static.wiline.com localhost treeform H :0 me
S: [Kettch23] :localhost 352 Kettch23 #aff luuk ip5654cd0e.speed.planet.nl localhost luque H :0 luuk
S: [Kettch23] :localhost 352 Kettch23 #aff Matt pool-71-191-197-244.washdc.fios.verizon.net localhost Matt H :0 Matt
S: [Kettch23] :localhost 315 Kettch23 #aff :End of /WHO list.

but you can see he is in the list as "luuk" ....

  • Thanks!

Case-insensitive compares

nicks and channels are supposed to be compared case-insensitively (and there's some oddities due to IRC's Scandinavian origin, like '{' is uppercase '[').

sending "join" to the server crashes it

[server1, C: Muff] NOTICE Muff :LAGCHK 2806.244
[server1, C: Kettch23] PING LAG3999713818
S: [Kettch23] :localhost PONG localhost :localhost
[server1, C: Fred] join

/p/ircd.js/lib/commands.js:66
channelNames.split(',').forEach(function(args) {
^
TypeError: Cannot call method 'split' of undefined
at Object. (/p/ircd.js/lib/commands.js:66:18)
at EventEmitter. (/p/ircd.js/lib/server.js:112:34)
at EventEmitter.emit (events.js:67:17)
at Object.respond (/p/ircd.js/lib/server.js:163:24)
at Object.data (/p/ircd.js/lib/server.js:232:10)
at Carrier. (/p/ircd.js/lib/server.js:184:51)
at Carrier.emit (events.js:64:17)
at /p/ircd.js/node_modules/carrier/lib/carrier.js:40:16
at Array.forEach (native)
at Socket. (/p/ircd.js/node_modules/carrier/lib/carrier.js:26:13)

Sending a message to a channel that doesn't exist crashes server

At least for me (where #what is an as-of-yet non-existent channel):

[lunchbox, C: neil] PRIVMSG #what :hi

/usr/local/lib/node_modules/ircdjs/lib/commands.js:161
if (channel.isModerated && !user.isVoiced(channel)) {
^
TypeError: Cannot read property 'isModerated' of undefined
at Object. (/usr/local/lib/node_modules/ircdjs/lib/commands.js:161:18)
at EventEmitter. (/usr/local/lib/node_modules/ircdjs/lib/server.js:113:34)
at EventEmitter.emit (events.js:77:17)
at Object.respond (/usr/local/lib/node_modules/ircdjs/lib/server.js:164:24)
at Object.data (/usr/local/lib/node_modules/ircdjs/lib/server.js:248:10)
at Carrier. (/usr/local/lib/node_modules/ircdjs/lib/server.js:203:51)
at Carrier.emit (events.js:67:17)
at /usr/local/lib/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:40:16
at Array.forEach (native)
at Socket. (/usr/local/lib/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:26:13)

Discovered this because I wanted a bot I'm working with to do a send a status message to a channel without joining.

npm install ircdjs fails

I'm trying to install ircdjs using npm, but it fails with error message

..\src\bcrypt_node.cc(38): fatal error C1083: Cannot open include file: 'openssl/rand.h': No such file or directory C:\node_modules\ircdjs\node_modules\bcrypt\build\bcrypt_lib.vcxproj]

I'm assuming that that's a package issue? The output from npm is bellow.

npm http GET https://registry.npmjs.org/ircdjs
npm http 304 https://registry.npmjs.org/ircdjs
npm http GET https://registry.npmjs.org/winston/0.6.1
npm http GET https://registry.npmjs.org/carrier
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/winston/0.6.1
npm http 304 https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/carrier
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/cycle
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/cycle
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/request

> [email protected] install C:\node_modules\ircdjs\node_modules\bcrypt
> node-gyp rebuild


C:\node_modules\ircdjs\node_modules\bcrypt>node "c:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\node_modules\ircdjs\node_modules\
bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(38): fatal error C1083: Cannot open include file: 'openssl/rand.h': No such file or directory [C:\node_modules\ircdjs\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:786:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\node_modules\ircdjs\node_modules\bcrypt
gyp ERR! node -v v0.10.3
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

Ability to set interval between PING intervals.

Hi. Would it be possible to set PING intervals in the config?

Its not possible to write long commands in command line (using telnet). It keeps sending PING {hostname} every 10 seconds or so.

ircd -> socket.io -> php-based chat

Hey. I am just asking for some advice here:

My site runs an instance of AJAX-Chat and its a dedicated server to which I have root access. So, I want to implement a bridge between the chats:

  • Users are registered on the site that the chat, in php, mainly runs on.
  • The chat sends messages thru a websocket to a worker that inserts stuff into mysql database, and reads from there. I can inject code in there - let's just call it the "chatsrv-receive" event.
  • Some tasks, as for example the site itself and some other server progresses send messages to a redis server, that then notice the destination to be the chat, it also counts as a "chatsrv-receive" event.
  • In the moment the "chatsrv-receive" event is fired, we also emit a "chatsrv-send" event to dish out a batch of messages, info objects and updates to all connected clients.

My goal: when someone connects to the IRC daemon, it joins the socket.io stream and issues chatsrv-receive when somebody sends a message from their client to the demon and also sends new messages that were written in the chat to the irc clients.

Is this posible with ircd?

Kind regards, Ingwie.

/nick breaks message listening

After a client changes their nickname by "/nick ____" messages from that client still send to others however but client does not receive messages from others.

Send message with :

If you send the message:

PRIVMSG #channel1 :this is my message : hellow tom

In the channel1 you see:

this is my message :

instead of:

this is my message : hellow tom

Would like to use ircdjs as a library; thoughts?

Hi there! I just stepped up as a collaborator on irc.js and we are looking for an easy way to test that library. "Hey, let's look for an ircd written in node!" I thought, and I found ircdjs. Unfortunately, it doesn't appear that it was written with library usage in mind--there are no callbacks, there's no support for interacting with clients programmatically. I would like to extend ircdjs to support these use cases so we can test our code. If you'll accept pull reqs for this, I'm fine writing patches that do what I need. Thoughts?

What does being /oper grant you right now?

It does not look like being oper gives you any more power then regular user? What is the plan for opers in the future?

What i did for now i grant /oper the right to be /op in every channel. I wander if that is useful to any one?

treeform@5cbed77

User joined with same name as lagged out user, then became invisble

Stranj, joined while there was already a Stranj there, that Stranj lagged out making the Stranj that joined invisible.

[server1, C: null] NICK Stranj
S: [null] :null![email protected] NICK :Stranj
[server1, C: Stranj] USER stranj unknown unknown :stranj
S: [Stranj] :localhost 001 Stranj Welcome to the ircn IRC network :Stranj![email protected]
S: [Stranj] :localhost 002 Stranj Your host is localhost running version 0.0.7
S: [Stranj] :localhost 003 Stranj This server was created on 2011-10-31
S: [Stranj] :localhost 004 Stranj 0.0.7
S: [Stranj] :localhost 375 Stranj :- Message of the Day -
S: [Stranj] :localhost 372 Stranj :-
S: [Stranj] :localhost 376 Stranj :End of /MOTD command.
S: [Stranj] :Stranj![email protected] MODE Stranj +w Stranj
[server1, C: Stranj] JOIN #aff
S: [Kettch23] :Stranj![email protected] JOIN #aff
S: [farseer] :Stranj![email protected] JOIN #aff
S: [treeform] :Stranj![email protected] JOIN #aff
S: [Muff] :Stranj![email protected] JOIN #aff
S: [ikarus] :Stranj![email protected] JOIN #aff
S: [Stranj] :Stranj![email protected] JOIN #aff
E: [Stranj] error writing to stream:Error: Socket is not writable
S: [Jetfire1] :Stranj![email protected] JOIN #aff
S: [Stranj] :Stranj![email protected] JOIN #aff
S: [Stranj] :localhost 331 Stranj #aff :No topic is set
S: [Stranj] :localhost 353 Stranj = #aff :@kettch23 farseer treeform Muff ikarus Stranj Jetfire1 Stranj
S: [Stranj] :localhost 366 Stranj #aff :End of /NAMES list.
S: [Kettch23] :Stranj![email protected] QUIT Connection lost
S: [farseer] :Stranj![email protected] QUIT Connection lost
S: [treeform] :Stranj![email protected] QUIT Connection lost
S: [Muff] :Stranj![email protected] QUIT Connection lost
S: [ikarus] :Stranj![email protected] QUIT Connection lost
S: [Jetfire1] :Stranj![email protected] QUIT Connection lost
S: [Stranj] :Stranj![email protected] QUIT Connection lost
[server1, C: Stranj] MODE #aff
S: [Stranj] :localhost 324 Stranj #aff +ntr
[server1, C: Kettch23] PING LAG1460743354
S: [Kettch23] :localhost PONG localhost :localhost
[server1, C: Stranj] PRIVMSG #aff :.
S: [Kettch23] :Stranj![email protected] PRIVMSG #aff :.
S: [farseer] :Stranj![email protected] PRIVMSG #aff :.
S: [treeform] :Stranj![email protected] PRIVMSG #aff :.
S: [Muff] :Stranj![email protected] PRIVMSG #aff :.
S: [ikarus] :Stranj![email protected] PRIVMSG #aff :.
S: [Jetfire1] :Stranj![email protected] PRIVMSG #aff :.
[server1, C: Muff] NOTICE Muff :LAGCHK 12314.085
[server1, C: Stranj] PRIVMSG #aff :trilliquit
S: [Kettch23] :Stranj![email protected] PRIVMSG #aff :trilliquit
S: [farseer] :Stranj![email protected] PRIVMSG #aff :trilliquit
S: [treeform] :Stranj![email protected] PRIVMSG #aff :trilliquit
S: [Muff] :Stranj![email protected] PRIVMSG #aff :trilliquit
S: [ikarus] :Stranj![email protected] PRIVMSG #aff :trilliquit
S: [Jetfire1] :Stranj![email protected] PRIVMSG #aff :trilliquit
[server1, C: Stranj] PRIVMSG #aff :yeystock
S: [Kettch23] :Stranj![email protected] PRIVMSG #aff :yeystock
S: [farseer] :Stranj![email protected] PRIVMSG #aff :yeystock
S: [treeform] :Stranj![email protected] PRIVMSG #aff :yeystock
S: [Muff] :Stranj![email protected] PRIVMSG #aff :yeystock
S: [ikarus] :Stranj![email protected] PRIVMSG #aff :yeystock
S: [Jetfire1] :Stranj![email protected] PRIVMSG #aff :yeystock
[server1, C: Muff] NOTICE Muff :LAGCHK 12329.295
[server1, C: treeform] PONG localhost
[server1, C: ikarus] PRIVMSG #aff :stranj ure invisible
S: [Kettch23] :[email protected] PRIVMSG #aff :stranj ure invisible
S: [farseer] :[email protected] PRIVMSG #aff :stranj ure invisible
S: [treeform] :[email protected] PRIVMSG #aff :stranj ure invisible
S: [Muff] :[email protected] PRIVMSG #aff :stranj ure invisible
S: [Jetfire1] :[email protected] PRIVMSG #aff :stranj ure invisible
S: [Stranj] :[email protected] PRIVMSG #aff :stranj ure invisible
[server1, C: Kettch23] PING LAG1490743354
S: [Kettch23] :localhost PONG localhost :localhost

Project activity?

Is this project still alive? The issues seem have been untouched for over a year. I'm considering using this in an upcoming project and I'm wondering if the code will continue to be advanced.

limit on number of clients

I'm not able to connect more than 10 clients(from same host) to the server is there any hard limit or configurable limit set

wallops doesn't receive full args

if you try and send a message with two words in using /wallops the second word is lost, I assume this is because the parameters of the wallops function are being delimited by a space.

I've tried checking the IRC RFC too on whether the sender of the message should be inside the message sent to other clients, but it's not that clear to me:
https://tools.ietf.org/html/rfc2812 (page 41)

Load balancing on multiple servers

I've been doing some research on messaging systems. I think all commands commands can be replicated to multiple servers whit a messaging system like redis or rabbitmq.

You can also keep a table of nicks, channels, users in a room, and all the information that needs to be shared among multiple servers in a key-value memory database distributed (http://redis.io/)

I think it would be the simplest way to load balance.

Any more ideas?

Test Fail

  ✖ 3 of 22 tests failed:

  1) Channels test messaging a non-existent channel (#26):
     Error: global leak detected: messagePart
      at Runner.checkGlobals (/home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runner.js:170:21)
      at Runner.<anonymous> (/home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runner.js:59:44)
      at Runner.emit (events.js:88:20)
      at /home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runner.js:401:14
      at done (/home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runnable.js:187:5)
      at /home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runnable.js:199:9
      at Client.<anonymous> (/home/ping/Escritorio/ircd.js/test/channels.test.js:49:15)
      at Client.emit (events.js:67:17)
      at Client.<anonymous> (/home/ping/Escritorio/ircd.js/node_modules/irc/lib/irc.js:520:26)
      at Client.emit (events.js:67:17)
      at /home/ping/Escritorio/ircd.js/node_modules/irc/lib/irc.js:634:22
      at Array.forEach (native)
      at Socket.<anonymous> (/home/ping/Escritorio/ircd.js/node_modules/irc/lib/irc.js:631:15)
      at Socket.emit (events.js:67:17)
      at TCP.onread (net.js:342:31)

  2) Channels test join with invalid key:
     Error: timeout of 2000ms exceeded
      at Object.<anonymous> (/home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runnable.js:167:14)
      at Timer.ontimeout (timers.js:94:19)

  3) Channels "after each" hook:
     Error: timeout of 2000ms exceeded
      at Object.<anonymous> (/home/ping/Escritorio/ircd.js/node_modules/mocha/lib/runnable.js:167:14)
      at Timer.ontimeout (timers.js:94:19)

Needs Update

The npm is so out of date it no longer installs correctly.

Can we get an update?

Erroneus nickname

I keep on getting a "Erroneus nickname" error while trying to connect to ircd.

Seems to find the host, etablish a connection but then it immediately loses it and gives me "Erroneus nickname"..

Actually tried it locally yesterday and got the same issue at first, but then somehow I managed to connect (I have no idea what I did..) I then installed it on a server and ran in to the same issue. Also locally.

From the server:
C: [null] NICK philipharrison
S: [null] :178.79.152.140 432 philipharrison :Erroneus nickname
C: [null] USER harrison harrison foretagsfokus.se :Philip Harrison

Cheers

Some people could not PM each other reason #2

It looks like the name normalization was leaving spaces at the end or beginning of names, I propose we trim it as well:

normalizeName: function(name) {
  return name &&
         name.toLowerCase()
         .replace(/{/g, '[')
         .replace(/}/g, ']')
         .replace(/\|/g, '\\')
         .trim();
},

ircd.js under forever

Anyone had success with running ircd.js under nodejitsu's forever? I seem to be missing something.

$ forever start -l irc.log -out irc_out.log -e irc_err.log bin/ircd.js 

info:   Forever processing file: bin/ircd.js

fs.js:224
  binding.open(pathModule._makeLong(path), stringToFlags(flags), mode,
          ^
TypeError: Bad argument
    at [object Object].<anonymous> (fs.js:224:11)
    at [object Object].flush (fs.js:1303:10)
    at new <anonymous> (fs.js:1240:10)
    at Object.createWriteStream (fs.js:1201:10)
    at [object Object].<anonymous> (/usr/local/lib/node_modules/forever/lib/forever/plugins/logger.js:12:43)
    at Object.bootstrap (/usr/local/lib/node_modules/forever/lib/forever/monitor.js:34:35)
    at [object Object].<anonymous> (/usr/local/lib/node_modules/forever/node_modules/broadway/lib/broadway/app.js:47:21)
    at new <anonymous> (/usr/local/lib/node_modules/forever/lib/forever/monitor.js:115:16)
    at Object.startDaemon (/usr/local/lib/node_modules/forever/lib/forever.js:378:17)
    at /usr/local/lib/node_modules/forever/lib/forever/cli.js:229:27

User can connect without server password

If I specify a "serverPassword" in the config file, I can still connect to the server without sending a PASS command upon connect. If I specify an incorrect password, it will correctly tell me the password was incorrect, and if I specify the correct password it will let me connect. However it appears that there is no check to make sure a PASS command is sent first if there is a serverPassword in the config, thereby letting users connect w/o one.

The server ran out of memory

I am doing load testing with the program.

When I start the test server has 2585 MB of memory in use:

  1. 2585MB 0 users

Connect 500.

  1. 2641MB 500 user

Connect 524 user.

  1. 2692MB 1024 user

Disconnect all user

  1. 2724MB 0 user

The server not free memory when users disconnect.

  1. I DO: Kill -9

Memory 2585MB

How is this possible?

Thanks.

PMs break when changing nick without joining channel

Repro:
start server
join with two clients
do not join any channels!
/msg eash other
change /nick on one of the clients
now that client cant be msged any more

The irc client gets confused to what the user's nick is because the change nick command is not sent to it.

In this code:

NICK: function(user, nick) {
.....
user.channels.forEach(function(channel) {
channel.send(user.mask, 'NICK', ':' + nick);
});

The new nick command is only sent to channels that nick is in. But if the users is not in any channels he never gets the command that he got the new nick.

I am not sure how to send nick changed command directly to client, i tried this:
user.send(user.mask, 'NICK', ':' + nick);

but it does not seem to work.

WHO on an invalid channel causes a crash

I typoed a /who command and ended up with a server crash. Probably ought to check the validity of channel names before trying to work with them.

C: [levi] WHO #pad

/home/levi/node_modules/ircdjs/lib/server.js:457
        channel.users.forEach(function(channelUser) {
               ^
TypeError: Cannot read property 'users' of undefined
    at Object.<anonymous> (/home/levi/node_modules/ircdjs/lib/server.js:457:16)
    at Object.respond (/home/levi/node_modules/ircdjs/lib/server.js:715:45)
    at Object.data (/home/levi/node_modules/ircdjs/lib/server.js:775:10)
    at Carrier.<anonymous> (/home/levi/node_modules/ircdjs/lib/server.js:736:51)
    at Carrier.emit (events.js:64:17)
    at /home/levi/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:40:16
    at Array.forEach (native)
    at Socket.<anonymous> (/home/levi/node_modules/ircdjs/node_modules/carrier/lib/carrier.js:26:13)
    at Socket.emit (events.js:64:17)
    at Socket._onReadable (net.js:678:14)

Part channel

When you part channel and no one in the room, the channel still appears in the channel list.

/OPER possible failure

I'm trying to figure out how to get ops within a channel or at least ops privileges

I've used /OPER username password and I can see that the request authenticates

then this code is called:

user.send(self.host, irc.reply.youAreOper, user.nick, ':You are now an IRC operator');
user.oper();

but the user is not granted ops, is there any other way that could be used to moderate users

Multiple OPERS cause login, then password incorrect.

Hi. Just discovered a bug. If you add more than one operators to the config file, and then try the OPER user pass command, the server will respond with :You are now an IRC operator followed by :Password Incorrect.

I fixed the issue. Code change in lib/commands.js

Original:

  // TODO: Local ops
  OPER: function(user, name, password) {
    if (!name || !password) {
      user.send(this.host, irc.errors.wasNoSuchNick, user.nick, ':OPER requires a nick and password');
    } else {
      var userConfig,
          self = this;

      Object.keys(this.config.opers).forEach(function(nick) {
        // TODO: ERR_NOOPERHOST (noOperHost)
        ircd.compareHash(password, self.config.opers[nick].password, function(err, res) {
          if (res) {
            user.send(self.host, irc.reply.youAreOper, user.nick, ':You are now an IRC operator');
            user.oper();
          } else {
            user.send(self.host, irc.errors.passwordWrong, user.nick, ':Password incorrect');
          }
        });
      });
    }
  },

Fixed:

  // TODO: Local ops
  OPER: function(user, name, password) {
    if (!name || !password) {
      user.send(this.host, irc.errors.wasNoSuchNick, user.nick, ':OPER requires a nick and password');
    } else {
      var userConfig,
          self = this;

      ircd.compareHash(password, self.config.opers[name].password, function(err, res) {
        if (res) {
          user.send(self.host, irc.reply.youAreOper, user.nick, ':You are now an IRC operator');
          user.oper();
        } else {
          user.send(self.host, irc.errors.passwordWrong, user.nick, ':Password incorrect');
        }
      });
    }
  },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.