Giter Club home page Giter Club logo

jbnc's People

Contributors

madriix avatar mrnfn80 avatar realrasengan avatar tynes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jbnc's Issues

[WEBIRC] jbnc not hashing/forwarding correct hash to IRCd when webchat with its own webirc tries to connect

Confirmed
from webchat (webirc) -> jbnc (webirc) -> server | jbnc isn't getting the right IP address that the webirc client is forwarding, maybe it's just taking the connection thats connected to it?

can we get JBNC to listen for a webirc command and if its pass matches what its suppose to forward to the server (from jbnc.com), accept the IP its given, hash it and forward that IP to the ircd?
webchat ips all get the same localhost ip and hash of that localip, but clients connecting directly to j.bnc 9998 passwordhere/x get their right ip's forwarded
forwarded / hashed
it should be webchat (webirc command) -> jbnc (convert webirc ipa/hostname from webchat to hash) -> webirc command -> ircd

New updated jbnc can't send PRIVMSG's

older bugs dont crash though, but /joining #x:x or anything with a : in it causes jbnc to act differently; won't send your JOIN when you connect/join - still forwards you messages though

Error for 'replace' of undefined, of 3 january 2021

1609615417 # Serious problem (uncaughtException) - this should not happen but the JBNC is still running. TypeError: Cannot read property 'replace' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:1054:51)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)

I warn that there is this bug. I don't prefer to correct this error myself, I'm afraid of breaking other things.

Line error replace undefined: https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1054

issues when using normal irc clients

it works fine in weechat, but if i use Xchat or irssi, it doesnt display things to their windows, everything goes to the status window in raw format. (poison did a temporary work around, not sure what exactly but creates a timestamp issue with offline msgs using the work around which is better then not working in the other clients), i believed it also work in thelounge properly besides weechat but can't remember for sure

Channels with ! in them crash jbnc

<PONG :1590610386048.jbnc
<JOIN #bitcoin/6:6)!

:mrinfinity![email protected] JOIN #bitcoin/6:6)!

:irc.t60group.org MODE #bitcoin/6:6)! +Cnst
:irc.t60group.org 353 mrinfinity @ #bitcoin/6:6)! :@MrInfinity![email protected]
/home/ircd/jbnc/bouncer.js:1097
this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
^

TypeError: Cannot read property 'push' of undefined
at Socket. (/home/ircd/jbnc/bouncer.js:1097:53)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23

messages and motd/raws come in double

  • https://kiwiirc.com/nextclient/ connected to irc.dns.live +9998 with password: shanetest
    webirc is set in both ircd hybrid conf (ircd.conf) and jbnc.conf
    messages come in twice
    and hostname for client is name!hash(fromkiwi)@localhost
    jbnc.conf:
    {
    "mode":"gateway",
    "bouncerPassword":"",

    "serverPort":"6667",
    "server":"127.0.0.1",
    "webircPassword":"",

    "bouncerPort":8888,
    "bouncerAdmin":"",
    "bouncerTimeout":1209600,

    "debug":false
    }
    /home/ircd/jbnc

problem with away

Finally there is a real problem with the away as indicated on #47

I've been investigating this for several weeks.

In reality there was this anti flood problem on the away side IRC server with unrealircd.conf, but there is still another bug, here is how to reproduce it (in production mode, it has not been tested):

  1. Login for the first time on JBNC with your client
  2. You must be away for a long, long time, wait for your BNC to disconnect from your client
  3. On your mobile, go to your client, it will want to reconnect to the JBNC (it may connect to JBNC but the connection is not complete). The client asks to refresh the page to really connect to JBNC, so it reconnects, and here I have the impression that there are "2 connected" on JBNC (in your session) as soon as you disconnect it. remainder "1" impossible to set it to zero. I can not understand. So it will never go "/away" and it will never remove the way either if you add it manually with the command /away

Every now and then he doesn't put any /Away

problem line 593 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L593

I've noticed a problem for a week or two.
From time to time he does not go /away.

Currently I don't see how to fix this.

Here are the symptoms:

  • Maybe it does not detect the socket.on ('close'
  • Maybe it does not detect the if with .parents.length or the if with .parents.length == 0
  • I manage to reproduce this bug but only by reconnecting at least once to JBNC (with clientReconnect () but maybe this is a coincidence) and also this bug is rare, you really have to stay connected for a long time or reconnect or I don't really know how to reproduce this bug very quickly

When logging on with webchat

in mIRC in every channel I see:
12:12pm * mrinfinity sets mode:

in Webchat I see:
12:12 *** mrinfinity (mrinfinity@291fe5) has joined the channel
12:12 *** Channel mode is +
12:12 *** The topic is: <#netops> NETWORK ops channel for IRCops that lead their communities. Paving a decentralized foundation for the * | sysadmin doc: https://docs.google.com/document/d/1m6rZE5zMQkjJVksgAyb67WgNgYIb01H5f-cGnaqoPb0/edit?usp=sharing
12:12 *** Topic set by mrinfinity on 15 April 2020, 21:32:58
12:12 *** Channel mode is +nst

Node the channel mode is + line

Undefined channel

https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L355
Between line 354 and 355 I added this:

                  case 'CHANNELS':
                    for (key in connections[this.hash].channels) {
                      if (connections[this.hash].channels.hasOwnProperty(key)) {
                          this.write(":*jbnc NOTICE * :Salon actif: "+connections[this.hash].channels[key].name+"\n");
                      }
                    }
                    this.write(":*jbnc NOTICE * :Fin des salons actifs\n");
                    break;

Then to reproduce the undefined bug you have to do this manipulation:

  1. Connect to JBNC on the IRC server and join 2 rooms with at least 100 connected
  2. Then join a new lounge of 100 connected and leave immediately within 1 second (repeat this step 2 or 3 times if necessary)
  3. Then type /jbnc channels and there you will see an undefined channel like this:
:*jbnc NOTICE * :Salon actif: #15-25ans
:*jbnc NOTICE * :Salon actif: #adultes
:*jbnc NOTICE * :Salon actif: undefined
:*jbnc NOTICE * :Fin des salons actifs

How to solve this problem at the level of JBNC?

The bug occurs here:
https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1134
or elsewhere.

bug: joining a channel with no name causes a crash

Just playing around with our new server, and when I typed just /join I crashed my entire setup. I'll look into submitting a PR for this tomorrow morning - getting a bit too late here to figure out how to stop this. I'm guessing this will be related to the other issues w/ jbnc crashing due to channel names so hopefully this can be fixed relatively across the board.

/home/ircd/thelounge/src/models/network.js:455
	name = name.toLowerCase();
	            ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at Network.getChannel (/home/ircd/thelounge/src/models/network.js:455:14)
    at IrcClient.<anonymous> (/home/ircd/thelounge/src/plugins/irc-events/join.js:11:22)
    at IrcClient.emit (/home/ircd/thelounge/node_modules/eventemitter3/index.js:129:35)
    at /home/ircd/thelounge/node_modules/irc-framework/src/client.js:223:24
    at next (/home/ircd/thelounge/node_modules/middleware-handler/index.js:42:18)
    at MiddlewareHandler.handle (/home/ircd/thelounge/node_modules/middleware-handler/index.js:64:3)
    at IrcCommandHandler.<anonymous> (/home/ircd/thelounge/node_modules/irc-framework/src/client.js:217:38)
    at IrcCommandHandler.emit (/home/ircd/thelounge/node_modules/eventemitter3/index.js:130:35)
    at IrcCommandHandler.emit (/home/ircd/thelounge/node_modules/irc-framework/src/commands/handler.js:90:27)
    at Array.JOIN (/home/ircd/thelounge/node_modules/irc-framework/src/commands/handlers/channel.js:191:17)
Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:207:27) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

2 errors in november 2020

2 errors detected in November 2020 on the current Jbnc version

Error 1:
TypeError: Cannot read property 'indexOf' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:1007:90)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)

Line 1007 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1007
if(_mode_target[_mode_count]!=this.nick && curchan.aov.indexOf(_this_target)<0 && this.opmode) {

Errror 2 :
Another error on line 982
TypeError: Cannot read property 'indexOf' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:982:90)

Line 982 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L982
if(_mode_target[_mode_count]!=this.nick && curchan.aop.indexOf(_this_target)<0 && this.opmode) {

I don't even know how to fix it actually

channels with mode +l viewed from outside of channel (/mode #channel) crash jbnc

I set mode #music to +l 99, then I did /mode #music (while in the channel), jbnc was fine

I then left, and did /mode #music again and have found that it crashes.

<MODE #music

:irc.t60group.org 324 mrinfinity #music +ntl 99

:irc.t60group.org 329 mrinfinity #music 1590542373

PING :1590610609091.jbnc

<PONG :1590610609091.jbnc

<PART #music

PING :1590610619094.jbnc

<PONG :1590610619094.jbnc

:hacktioneer![email protected] PRIVMSG #handshake-live :hs1quw3cv4a5qdtfeaqxs0xx3c87hcr5hmwkc0ehef REVEALED a BID of 10 HNS ($1.44) for barnaul

:hacktioneer![email protected] PRIVMSG #handshake-live :hs1q6t9f2nquqquvm07s7zwpgljfeyzt0en79n5apx REVEALED a BID of 1 HNS ($0.14) for barnaul

:hacktioneer![email protected] PRIVMSG #handshake-live :hs1qk5ntrketn3lc99fw0mrnah7ksrdlaycd45mpxd REVEALED a BID of 0 HNS ($0.00) for barnaul

:hacktioneer![email protected] PRIVMSG #handshake-live :hs1qkynuh97epg29hflhefms2tt3yhdfcvp6x76e33 REVEALED a BID of 5.00499 HNS ($0.72) for barnaul

<MODE #music

:irc.t60group.org 324 mrinfinity #music +ntl
/home/ircd/jbnc/bouncer.js:889
curchan.limit=_mode_target[_mode_count];
^

TypeError: Cannot set property 'limit' of undefined
at Socket. (/home/ircd/jbnc/bouncer.js:889:40)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)

my irc client sees:
-> irc.t60group.org MODE #music
<- :irc.t60group.org 324 mrinfinity #music +ntl 99
<- :irc.t60group.org 329 mrinfinity #music 1590542373

when I'm in the channel and /mode normally

[FEATURE REQUEST] add autohash feature in webirc

add autohash feature in webirc so jbnc can pass a secure hash of a hostname/ip-address to a server for total anonymity
so instead of !@some-ip.ip-t.country.isp.com
md5 of some-ip.ip-t.country.isp.com = 50f96456b50f5154835588baedce1581
sha256 is pretty long

The "/" character in the user's password

Hi
I just noticed that I had several users who put the "/" character in their password. This one is not accepted in JBNC

df9260cxxxxxxxxxxxxxxxxxxxx||PassWord//irc.site.com:+6697||df9xxxxxxxxxxxxxxxecxxxxxxx/mobile/mozart

Just imagine that the password is: PassWord/

Should we change the args "/" in JBNC to put another character? If so which one should I put?

problem undefined preview on a user

Here is the "undefined" error in the second line:

[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES #jeuxvideos 
[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES undefined 
[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES #quebec 
[21:03:32] <-Monitor-> {[nickUserjbnc]} AWAY away 

A channel was improperly removed from an array or something.
There is no error log in the console.
I could not solve.

add message-tags

Hi

I tested Jbnc today, it is super and fast and very light.
However, the correct timestamps for messages with "message-tags" are missing. Can you add it?

              if(lines[n].trim().indexOf("multi-prefix")>=0) {
                this.write("CAP REQ :multi-prefix\n");
              }
              if(lines[n].trim().indexOf("message-tags")>=0) {
                this.write("CAP REQ :message-tags\n");
              }
              if(lines[n].trim().indexOf("userhost-in-names")>=0) {
                this.write("CAP REQ :userhost-in-names\n");
                this.userhostInNames=true;
              }

I tried to add but does not work, there is a crash, at the line

                  this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
                                                    ^

TypeError: Cannot read property 'push' of undefined

Salutations

channels with : in them crash jbnc* fixed

:MRNFN80!~MRNFN80@jbnc/f52876 JOIN #t:tt

<MODE #t:tt

:irc.t60group.org MODE #t:tt +Cnst
:irc.t60group.org 353 MRNFN80 @ #t:tt :@MRNFN80!~MRNFN80@jbnc/f52876
/home/mrinfinity/jbnc/bouncer.js:1097
this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
^

TypeError: Cannot read property 'push' of undefined
at Socket. (/home/mrinfinity/jbnc/bouncer.js:1097:53)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)

sorry just creating issues as i try to fix them ;/

[FEAT REQUEST] auto-op/voice clients when they're opped/voiced, remove when they're deopped/devoice

[FEAT REQUEST] auto-op/voice clients when they're opped/voiced, remove when they're deopped/devoice
so if anybody / somebody ops, halfops, or voices somebody it adds their *!ident@fullhostname to auto-op
if somebody deoped / devoices / dehalfops them then any masks involving that target usser is removed for that mode

  • add users to autoop / avoice / ahalfop when +o/v/h is set
  • remove users from autoop / avoice / ahalfop when -o/v/h is set

Registration Bug / Kline bug

If you try to connect and your nickname and altnickname are taken, but don't /nick to-something-else, IRCD sends you a registration timeout, but upon connecting you reconnect to a jbnc session of the first nick trying to connect with (even if it was taken) with no connection from jbnc->server. As listed below. Also if you get klined and try to reconnect (auto or not), you connect back to a jbnc session which isn't connected to the ircd (because it can't) - maybe treat same way as being /killed (unsure)

03:30pm * Connect retry #44 irc.bitcoin.com (+9998) (dns pool)

03:30pm -irc.bitcoin.com- *** Looking up your hostname

03:30pm -irc.bitcoin.com- *** Found your hostname

03:30pm -irc.bitcoin.com- WEBIRC host/IP set to 291fe5 74.195.139.158

03:30pm MRNFN80 Nickname is already in use.

03:30pm mrinfinity Nickname is already in use.

03:31pm Closing Link: 291fe5 (Registration timed out)

03:31pm * Disconnected

03:31pm * Connect retry #45 irc.bitcoin.com (+9998)

03:31pm * Your nick is now mrinfinity

03:31pm - Message of the Day -

03:31pm End of /MOTD command.

03:31pm Local host: unknown (unknown)

03:31pm * mrinfinity sets mode: +
03:31pm End of /MOTD command.

03:31pm Local host: unknown (unknown)

03:31pm * mrinfinity sets mode: +

(Cannot send commands) only /jbnc

How to solve a problem with "irc-framework" of kiwiirc

Hi
On JBNC there is all this currently:

          if(data[1]=="CAP") {
            if(data[3] && data[3]=='LS') {
              if(lines[n].trim().indexOf("cap-notify")>=0) {
                this.write("CAP REQ :cap-notify\n");
              }
              if(lines[n].trim().indexOf("away-notify")>=0) {
                this.write("CAP REQ :away-notify\n");
              }
              if(lines[n].trim().indexOf("invite-notify")>=0) {
                this.write("CAP REQ :invite-notify\n");
              }
              if(lines[n].trim().indexOf("extended-join")>=0) {
                this.write("CAP REQ :extended-join\n");
              }
              if(lines[n].trim().indexOf("userhost-in-names")>=0) {
                this.write("CAP REQ :userhost-in-names\n");
                this.userhostInNames=true;
              }
              if(lines[n].trim().indexOf("multi-prefix")>=0) {
                this.write("CAP REQ :multi-prefix\n");
              }
              if(lines[n].trim().indexOf("account-notify")>=0) {
                this.write("CAP REQ :account-notify\n");
              }
              if(lines[n].trim().indexOf("message-tags")>=0) {
                this.write("CAP REQ :message-tags\n");
                this.messagetags=true;
              }
              if(lines[n].trim().indexOf("account-tag")>=0) {
                this.write("CAP REQ :account-tag\n");
              }
              if(this.messagetags && lines[n].trim().indexOf("server-time")>=0) {
                this.write("CAP REQ :server-time\n");
              }
              if(lines[n].trim().indexOf("sasl")>=0) {
                this.write("CAP REQ :sasl\n");
                this.sasl=true;
              }
              if (!this.sasl)
                this.write("CAP END\n");
            }
            else if(this.sasl && data[3] && data[3]=='ACK') {
              if(lines[n].trim().indexOf("sasl")>=0) {
                this.write("AUTHENTICATE :PLAIN\n");
              }
            }
            else {
              if (!this.sasl)
                this.write("CAP END\n");
            }
            continue;
          }

I found a problem here:
https://github.com/kiwiirc/irc-framework/blob/469cbe7b2129ddae0328a7efe91eb218257e98ff/src/commands/handlers/channel.js#L218

handler.network.cap.isEnabled('extended-join')
this line always returns "false"
even for this one (the line 226):
data.gecos = command.params[gecos_idx] || '';
which can be tested for debug with:
data.gecos = command.params[gecos_idx]+" - test:"+handler.network.cap.isEnabled('sasl') || '';

it returns false all the time, when it should return true
It should be noted that jbnc recognizes well that it is connected by sasl, and it also detects the raws of the "extended-join" but on ircframework it always detects false for the "isEnabled", the problem could come from where ? Jbnc or irc-framework?
Something must be missing but i don't know where

also on you can remove the "if" https://github.com/kiwiirc/irc-framework/blob/469cbe7b2129ddae0328a7efe91eb218257e98ff/src/commands/handlers/channel.js#L218 like this:

        //if (handler.network.cap.isEnabled('extended-join')) {
            data.account = command.params[1] === '*' ? false : command.params[1];
            gecos_idx = 2;
        //}

and there the "data.gecos" works well, it is displayed correctly, the problem comes from the "handler.network.cap.isEnabled" which detects no active cap

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.