webirc configuration does not work with thelounge client

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

webirc configuration does not work with thelounge client

Post by Suratka »

hi, I installed on an external server "thelounge" client, and I configured in the client the ip and password of my ircd unrealircd 4.2.4, after I configured in unrealircd.conf in the webirc block, where I also have the ip and the password for kiwwiirc and Mibbit and these two work fine. But loungechat doesn't work,
it does not connect to the irc server. Do you know why?
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

Need more feedback

Also, on config.js of TheLounge client, be sure to set this line https://github.com/thelounge/thelounge/ ... fig.js#L44 to use the IP that you've configured in UnrealIRCd webirc block, like:

Code: Select all

bind: "127.0.0.1,
in case that your machine has more than one IP address or has support for IPv4 and IPv6, because if you let it as it is, it will choose a random IP to connect and will prefer IPv6 over IPv4.

Then try to connect again via TheLounge.

Hope this helps.

Cheers
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

wait, wait, go slowly. I'm not a great expert and over-technical language confuses me.
can you explain to me in simple words and step by step what should i do and what should i write and where?
and I don't understand that 127.0.0.1 what centers, if tehlounge is not installed on the same server where unrealircd is housed.
please if you can paste the line or lines to copy in config.js.
I would be really grateful to you. ;)
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

Code: Select all

webirc { 
mask 91.92.xx.xx; 
password "password";
};
questo è quello che ho impostato nel mio unrealircd.conf; 91.92.xx.xx è l'ip del server dove è installato "thelounge"

Code: Select all

webirc: {
          "irc.XXXXXX.net": (webircObj, network) => {
            webircObj.password = "password";
            webircObj.hostname = `webirc/${webircObj.hostname}`;
            return webircObj;
          },
        },
questo è come ho impostato config.js di tehlounge.
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

Also, change your TheLounge webirc line to something like this:

Code: Select all

webirc: { "irc.xxx.net": "password"},
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

Quick fix

1) On TheLounge search for:

Code: Select all

bind: undefined,
and replace it by

Code: Select all

bind "91.92.xxx.xxx",

2) Change your webirc line on TheLounge by:

Code: Select all

webirc: { "irc.xxxx.net": "password" },
This should do the trick.

Cheers
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

Code: Select all

Connection closed unexpectedly: Error: connect EINVAL 199.181.xxx.XXX:6697 - Local (127.0.0.1:46533)
with the line you gave me, and with bind: "127.0.0.1", it gives me this error,
if instead I change 127.0.0.1 cn 91.92.XX.XX, the IP address of the vps which contains thelounge, then it connects but with the ip of the vps, that is: 91.92.XX.XX
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

Be sure to restart TheLounge and confirm that the password is correct.
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

I do not understand. everything seems ok the setup.
the bind is set with the ip of the vps that hosts tehlounge.
I copied the line you gave me and inserted it in the webirc block of config.js, being careful to insert the correct password and the ip of the irc server.
Where am I wrong?

ps.
I restart it every time I make a change to config.js.
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

I assume that you've rehashed UnrealIRCd too?
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

obviously yes
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

with the same password and method, but obviously with different IPs, I have configured kiwiirc and mibbit and they work very well.
PeGaSuS
Official supporter
Posts: 96
Joined: Tue Jun 27, 2017 4:42 pm
Contact:

Re: webirc configuration does not work with thelounge client

Post by PeGaSuS »

can you paste the bind and webirc lines from TheLounge?
You can omit the IP, but don't omit any quotes or punctuation.
IRC Network: PTirc - GitHub: TehPeGaSuS - Help and support: #unreal-support
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

Code: Select all

// ## WEBIRC support
	//
	// When enabled, The Lounge will pass the connecting user's host and IP to the
	// IRC server. Note that this requires to obtain a password from the IRC
	// network that The Lounge will be connecting to and generally involves a lot
	// of trust from the network you are connecting to.
	//
	// There are 2 ways to configure the `webirc` setting:
	//
	// - **Basic**: an object where keys are IRC hosts and values are passwords.
	//   For example:
	//
	//   ```json
	//   webirc: {
	//     "irc.example.net": "thisiswebircpassword1",
	//     "irc.example.org": "thisiswebircpassword2",
	//   },
	//   ```
	//
	// - **Advanced**: an object where keys are IRC hosts and values are functions
	//   that take two arguments (`webircObj`, `network`) and return an
	//   object to be directly passed to `irc-framework`. `webircObj` contains the
	//   generated object which you can modify. For example:
	//
	//   ```js
	//   webirc: {
	//     "irc.example.com": (webircObj, network) => {
	//       webircObj.password = "thisiswebircpassword";
	//       webircObj.hostname = `webirc/${webircObj.hostname}`;
	//       return webircObj;
	//     },
	//   },
	//   ```
	//
	// This value is set to `null` to disable WEBIRC by default.
	webirc: { "irc.xxxx.net": "password"},
          
	// ## identd and oidentd support

	// ### `identd`
	//
	// Run The Lounge with `identd` support.
	//
	// The available keys for the `identd` object are:
	//
	// - `enable`: When `true`, the identd daemon runs on server start.
	// - `port`: Port to listen for ident requests.
	//
	// The value of `enable` is set to `false` to disable `identd` support by
	// default, in which case the value of `port` is ignored. The default value of
	// `port` is 113.
	identd: {
		enable: true,
		port: 4400,
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: webirc configuration does not work with thelounge client

Post by Suratka »

Code: Select all

"use strict";

module.exports = {
	// ## Server settings

	// ### `public`
	//
	// When set to `true`, The Lounge starts in public mode. When set to `false`,
	// it starts in private mode.
	//
	// - A **public server** does not require authentication. Anyone can connect
	//   to IRC networks in this mode. All IRC connections and channel
	//   scrollbacks are lost when a user leaves the client.
	// - A **private server** requires users to log in. Their IRC connections are
	//   kept even when they are not using or logged in to the client. All joined
	//   channels and scrollbacks are available when they come back.
	//
	// This value is set to `false` by default.
	public: true,

	// ### `host`
	//
	// IP address or hostname for the web server to listen to. For example, set it
	// to `"127.0.0.1"` to accept connections from localhost only.
	//
	// For UNIX domain sockets, use `"unix:/absolute/path/to/file.sock"`.
	//
	// This value is set to `undefined` by default to listen on all interfaces.
	host: undefined,

	// ### `port`
	//
	// Set the port to listen to.
	//
	// This value is set to `9000` by default.
	port: XXXX,

	// ### `bind`
	//
	// Set the local IP to bind to for outgoing connections.
	//
	// This value is set to `undefined` by default to let the operating system
	// pick its preferred one.
	bind: "91.92.XXX.XXX",

	// ### `reverseProxy`
	//
	// When set to `true`, The Lounge is marked as served behind a reverse proxy
	// and will honor the `X-Forwarded-For` header.
	//
	// This value is set to `false` by default.
	reverseProxy: false,
Locked