mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-09 03:35:24 +01:00
made ulines load from the new config
This commit is contained in:
parent
dbddc21399
commit
6a02c2b900
6 changed files with 253 additions and 5 deletions
3
Changes
3
Changes
|
@ -83,5 +83,6 @@
|
|||
- Merged in sts-laptop branch
|
||||
- Made /admin use the new config (had to modify some newconf stuff to make a backwards copy
|
||||
of the list as well)
|
||||
- Made U:lines loaded from the newconf, also made /stats U read the U:lines from the newconf
|
||||
- Added listen {} runtime-configuration code work :))
|
||||
- Removed unrealircd.conf from stock
|
||||
- Removed unrealircd.com from the stock
|
||||
|
|
|
@ -64,6 +64,7 @@ extern ConfigItem_link *conf_link;
|
|||
ConfigItem_class *Find_class(char *name);
|
||||
ConfigItem_oper *Find_oper(char *name);
|
||||
ConfigItem_listen *Find_listen(char *ipmask, int port);
|
||||
ConfigItem_ulines *Find_uline(char *host);
|
||||
|
||||
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
|
||||
|
||||
|
|
|
@ -1859,4 +1859,17 @@ ConfigItem_listen *Find_listen(char *ipmask, int port)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ConfigItem_ulines *Find_uline(char *host) {
|
||||
ConfigItem_ulines *ulines;
|
||||
|
||||
if (!host)
|
||||
return NULL;
|
||||
|
||||
for(ulines = conf_ulines; ulines; ulines =(ConfigItem_ulines *) ulines->next) {
|
||||
if (!stricmp(host, ulines->servername))
|
||||
return ulines;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ static char *replies[] = {
|
|||
/* 245 RPL_STATSSLINE */ ":%s 245 %s %c %s * %s %d %d",
|
||||
/* 246 */ NULL,
|
||||
/* 247 RPL_STATSXLINE */ ":%s 247 %s X %s %d",
|
||||
/* 248 RPL_STATSULINE */ ":%s 248 %s %c %s * %s %d %d",
|
||||
/* 248 RPL_STATSULINE */ ":%s 248 %s U %s",
|
||||
/* 249 */ NULL,
|
||||
/* 250 RPL_STATSCONN */ ":%s 250 %s :Highest connection count: %d (%d clients)",
|
||||
/* 251 RPL_LUSERCLIENT */ ":%s 251 %s :There are %d users and %d invisible on %d servers",
|
||||
|
|
11
src/s_serv.c
11
src/s_serv.c
|
@ -850,7 +850,7 @@ int m_server(cptr, sptr, parc, parv)
|
|||
* server are also U:lined, very helpful if HIDE_ULINES is on
|
||||
*/
|
||||
if (IsULine(sptr)
|
||||
|| (find_uline(cptr->confs, acptr->name)))
|
||||
|| (Find_uline(acptr->name)))
|
||||
acptr->flags |= FLAGS_ULINE;
|
||||
add_server_to_table(acptr);
|
||||
IRCstats.servers++;
|
||||
|
@ -1196,7 +1196,7 @@ int m_server_estab(cptr)
|
|||
#ifndef NO_FDLIST
|
||||
addto_fdlist(cptr->fd, &serv_fdlist);
|
||||
#endif
|
||||
if ((find_uline(cptr->confs, cptr->name)))
|
||||
if ((Find_uline(cptr->name)))
|
||||
cptr->flags |= FLAGS_ULINE;
|
||||
cptr->flags |= FLAGS_TS8;
|
||||
nextping = TStime();
|
||||
|
@ -2603,8 +2603,13 @@ int m_stats(cptr, sptr, parc, parv)
|
|||
tstats(sptr, parv[0]);
|
||||
break;
|
||||
case 'U':
|
||||
report_configured_links(sptr, CONF_UWORLD);
|
||||
{
|
||||
ConfigItem_ulines *ulines;
|
||||
for (ulines = conf_ulines; ulines; ulines = (ConfigItem_ulines *)ulines->next) {
|
||||
sendto_one(sptr, rpl_str(RPL_STATSULINE), me.name, parv[0], ulines->servername);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'u':
|
||||
{
|
||||
time_t tmpnow;
|
||||
|
|
228
unrealircd.conf
Normal file
228
unrealircd.conf
Normal file
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
* UnrealIRCd Config File - Example for irc.fyremoon.net
|
||||
*/
|
||||
|
||||
// Information about me
|
||||
me {
|
||||
// My IRC server name
|
||||
name "irc-devel.unrealircd.com";
|
||||
// My infoline
|
||||
info "Forever is gonna start tonight";
|
||||
// My numeric
|
||||
numeric 13;
|
||||
};
|
||||
|
||||
// Who is my admin?
|
||||
|
||||
admin {
|
||||
/* You can put as many lines as you want here */
|
||||
"UnrealIRCd Team";
|
||||
"codemastr";
|
||||
"codemastr@unrealircd.com";
|
||||
|
||||
};
|
||||
|
||||
/* We use class names now :)*/
|
||||
class clients
|
||||
{
|
||||
/* How often to ping the user */
|
||||
pingfreq 90;
|
||||
/* How many clients allowed in class*/
|
||||
maxclients 900;
|
||||
/* Maximum SendQueue */
|
||||
sendq 100000;
|
||||
};
|
||||
|
||||
class servers
|
||||
{
|
||||
pingfreq 90;
|
||||
maxclients 1;
|
||||
sendq 1000000;
|
||||
};
|
||||
|
||||
/* The old I:lines */
|
||||
allow {
|
||||
/* username mask*/
|
||||
user *;
|
||||
/* ip mask */
|
||||
ip *;
|
||||
/* hostmask */
|
||||
hostname *;
|
||||
/* what class to put them in */
|
||||
class clients;
|
||||
// Leave out password to make it passwordless
|
||||
/* Password to require */
|
||||
password "moocowsrule";
|
||||
};
|
||||
|
||||
/* /oper <login> (oper <login>)*/
|
||||
oper stskeeps {
|
||||
/* What class to put oper in upon opering */
|
||||
class clients;
|
||||
/* What userhost masks to allow the IRCop to come from */
|
||||
from {
|
||||
userhost *@the.elite-hacker.cx;
|
||||
userhost *@*.image.dk;
|
||||
};
|
||||
/* Password to require */
|
||||
password "moocow";
|
||||
/* We use named flags now :) */
|
||||
flags
|
||||
{
|
||||
netadmin;
|
||||
global;
|
||||
};
|
||||
};
|
||||
|
||||
/* P:lines, we listen here on IP 127.0.0.1 port 6667 */
|
||||
listen 205.161.96.20:6667
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
|
||||
link irc.hs-bremen.de /* servername */
|
||||
{
|
||||
username *; /* usermask */
|
||||
hostname 194.94.24.40; /* hostmask */
|
||||
bind-ip *; /* What IP to bind to when connecting */
|
||||
port 7151; /* What port to connect to, if any */
|
||||
hub *; /* Is this a hub and what servermasks may it bring in */
|
||||
|
||||
// leaf *;
|
||||
// leaf-depth 2;
|
||||
password-connect "tdx6667";
|
||||
password-recieve "tdx6667";
|
||||
/* for later: class-connect, class-recieve */
|
||||
class servers;
|
||||
// rsa-auth "path.to.public.key";
|
||||
options {
|
||||
autoconnect;
|
||||
ssl;
|
||||
zip;
|
||||
};
|
||||
};
|
||||
|
||||
/* As many as you like */
|
||||
ulines {
|
||||
services.roxnet.org;
|
||||
stats.roxnet.org;
|
||||
};
|
||||
|
||||
drpass {
|
||||
restart "time-to-restart"; /* Password to use for /restart */
|
||||
die "killme"; /* Password to use for /die */
|
||||
};
|
||||
|
||||
/*
|
||||
* The old T:lines. We however also can use this as auto-join per .domain
|
||||
*/
|
||||
tld {
|
||||
mask *@*.fr;
|
||||
motd "ircd.motd.fr";
|
||||
rules "ircd.rules.fr";
|
||||
};
|
||||
|
||||
/* The old nick Q:lines :) */
|
||||
ban nick {
|
||||
mask "*C*h*a*n*S*e*r*v*";
|
||||
reason "Reserved for Services";
|
||||
};
|
||||
/* The old Z:lines */
|
||||
ban ip { mask 195.86.232.81; reason "Delinked server"; };
|
||||
|
||||
/* The old server Q:lines */
|
||||
ban server {
|
||||
mask eris.berkeley.edu;
|
||||
reason "Get out of here.";
|
||||
};
|
||||
|
||||
/* The wonderful K:lines */
|
||||
ban user { mask *tirc@*.saturn.bbn.com; reason "Idiot"; };
|
||||
|
||||
/* Bans Realnames, the old n:lines */
|
||||
ban realname {
|
||||
mask "Swat Team";
|
||||
reason "mIRKFORCE";
|
||||
};
|
||||
|
||||
ban realname {
|
||||
mask "sub7server";
|
||||
reason "sub7";
|
||||
};
|
||||
|
||||
|
||||
/* Do not ban Stskeeps
|
||||
* The old E:lines
|
||||
*/
|
||||
except ban {
|
||||
mask *stskeeps@212.*;
|
||||
};
|
||||
|
||||
/* savage-r.*
|
||||
* the old e: lines
|
||||
*/
|
||||
except socks {
|
||||
mask 216.73.27.177;
|
||||
};
|
||||
|
||||
/* Old vhost.conf */
|
||||
vhost {
|
||||
vhost i.hate.microsefrs.com;
|
||||
userhost *@*.image.dk;
|
||||
login stskeeps;
|
||||
password techie;
|
||||
};
|
||||
|
||||
/* You can include other configuration files */
|
||||
// include "klines.conf";
|
||||
|
||||
// Network configuration
|
||||
set {
|
||||
network-name "ROXnet";
|
||||
default-server "irc.roxnet.org";
|
||||
services-name "services.roxnet.org";
|
||||
stats-name "stats.roxnet.org";
|
||||
help-channel "#ROXnet";
|
||||
hiddenhost-prefix "rox";
|
||||
prefix_quit "no";
|
||||
/* on-oper host */
|
||||
hosts {
|
||||
local "locop.roxnet.org";
|
||||
global "ircop.roxnet.org";
|
||||
coadmin "coadmin.roxnet.org";
|
||||
admin "admin.roxnet.org";
|
||||
servicesadmin "csops.roxnet.org";
|
||||
techadmin "techadmin.roxnet.org";
|
||||
netadmin "netadmin.roxnet.org";
|
||||
host-on-oper-up "no";
|
||||
};
|
||||
};
|
||||
|
||||
/* Server specific configuration */
|
||||
|
||||
set {
|
||||
kline-address "stskeeps@roxnet.org";
|
||||
modes-on-connect "+xwG";
|
||||
oper-auto-join "#opers";
|
||||
dns {
|
||||
nameserver 127.0.0.1;
|
||||
timeout 2s;
|
||||
retries 2s;
|
||||
};
|
||||
options {
|
||||
enable-opermotd;
|
||||
enable-chatops;
|
||||
hide-ulines;
|
||||
webtv-support;
|
||||
identd-check;
|
||||
};
|
||||
|
||||
socks {
|
||||
ban-message "Insecure SOCKS server";
|
||||
quit-message "Insecure SOCKS server";
|
||||
ban-time "4d";
|
||||
};
|
||||
maxchannelsperuser 10;
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue