WebIRC block

The webirc block allows you to configure host spoofing for WebIRC / CGI:IRC gateways you trust, see WebIRC Support.

Note that a more modern method would be to use websockets. With websockets, clients (browsers) connect directly to the IRC server without any WebIRC gateway in-between, in which case you do not need any webirc { } blocks.

Syntax
webirc { mask 1.2.3.4; /* ip or host mask */ password ; };

mask is checked against the client (the WebIRC or CGI:IRC gateway) that is trying to connect.

password is the webirc password

How to configure with method 'webirc' (recommended method)
In both your web IRC client software and UnrealIRCd you have to set the same webirc password.

Example with KiwiIRC
The example below configures KiwiIRC and UnrealIRCd. Note that this is just an example, if you use something other than KiwiIRC you edit that instead of the KiwiIRC-side.

KiwiIRC-side (old and outdated)
Edit kiwiirc's config.js as follows (note: this is NOT a complete configuration file, it just shows 3 important sections): // WebIRC passwords enabled for this server conf.webirc_pass = { "irc1.yournetwork.org":       "ThisIsMySecretWebIRCPassword" };

// Default settings for the client. These may be changed in the browser conf.client = { server: 'irc1.yournetwork.org', port:   6697, ssl:    true, channel: '#test', nick:   'kiwi_?' }; // or use conf.restrict_server etc... to achieve the same effect (see example config.js file).

// What matters is that the server name in conf.client or conf.restrict_server // match the server name in conf.webirc_pass (and use the right password). // So be sure to replace BOTH the irc1.yournetwork.org instances with the same server name.

// Now something else... "send ip as username".... // Be sure *NOT* to list your server here !!!! // If you add it here, then the IP will show up in the ident. This is NOT what you want // as the IP is already sent via WEBIRC. Doing so would reveal the users' IP to everyone which is bad. conf.ip_as_username = [ "xxxx" ];

KiwiIRC-side (new aka nextclient)
Edit kiwiirc's webircgateway config.conf as follows (note: this is NOT a complete configuration file): // WebIRC passwords enabled for this server [upstream.1] webirc = "xxxx"

UnrealIRCd-side
Then, in your unrealircd.conf you add a webirc block:

webirc { mask 127.0.0.1; password "ThisIsMySecretWebIRCPassword"; };

except ban { mask 127.0.0.1; type { connect-flood; handshake-data-flood; blacklist; }; };

The Except ban block block is highly recommended. This will ensure your webirc gateway is not seen as connection flooding and the blacklist exception will make it connect faster. If you don't have an except ban block for your webirc gateway then users will not be able to connect during peak hours or after a server restart.