Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
0972c5b8
Commit
0972c5b8
authored
1 year ago
by
Randy Sommerfeld
Browse files
Options
Downloads
Patches
Plain Diff
Move some stuff around for ini editing
parent
2ccc75e2
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/load/ircd/config.js
+143
-6
143 additions, 6 deletions
exec/load/ircd/config.js
exec/load/ircd/core.js
+0
-67
0 additions, 67 deletions
exec/load/ircd/core.js
exec/load/ircd/user.js
+0
-23
0 additions, 23 deletions
exec/load/ircd/user.js
with
143 additions
and
96 deletions
exec/load/ircd/config.js
+
143
−
6
View file @
0972c5b8
...
@@ -19,6 +19,29 @@
...
@@ -19,6 +19,29 @@
*/
*/
/* Various permissions that can be set on an O:Line */
const
OLINE_CAN_REHASH
=
(
1
<<
0
);
/* r */
const
OLINE_CAN_RESTART
=
(
1
<<
1
);
/* R */
const
OLINE_CAN_DIE
=
(
1
<<
2
);
/* D */
const
OLINE_CAN_GLOBOPS
=
(
1
<<
3
);
/* g */
const
OLINE_CAN_WALLOPS
=
(
1
<<
4
);
/* w */
const
OLINE_CAN_LOCOPS
=
(
1
<<
5
);
/* l */
const
OLINE_CAN_LSQUITCON
=
(
1
<<
6
);
/* c */
const
OLINE_CAN_GSQUITCON
=
(
1
<<
7
);
/* C */
const
OLINE_CAN_LKILL
=
(
1
<<
8
);
/* k */
const
OLINE_CAN_GKILL
=
(
1
<<
9
);
/* K */
const
OLINE_CAN_KLINE
=
(
1
<<
10
);
/* b */
const
OLINE_CAN_UNKLINE
=
(
1
<<
11
);
/* B */
const
OLINE_CAN_LGNOTICE
=
(
1
<<
12
);
/* n */
const
OLINE_CAN_GGNOTICE
=
(
1
<<
13
);
/* N */
const
OLINE_IS_ADMIN
=
(
1
<<
14
);
/* A */
/* Synchronet IRCd doesn't have umode +a RESERVED */
const
OLINE_CAN_UMODEC
=
(
1
<<
16
);
/* c */
const
OLINE_CAN_CHATOPS
=
(
1
<<
19
);
/* s */
const
OLINE_CHECK_SYSPASSWD
=
(
1
<<
20
);
/* S */
const
OLINE_CAN_EVAL
=
(
1
<<
21
);
/* x */
const
OLINE_IS_GOPER
=
(
1
<<
22
);
/* "big O" */
function
parse_nline_flags
(
flags
)
{
function
parse_nline_flags
(
flags
)
{
var
i
;
var
i
;
var
nline_flags
=
0
;
var
nline_flags
=
0
;
...
@@ -142,10 +165,7 @@ function parse_oline_flags(flags) {
...
@@ -142,10 +165,7 @@ function parse_oline_flags(flags) {
return
oline_flags
;
return
oline_flags
;
}
}
function
Read_Config_File
()
{
function
Clear_Config_Globals
()
{
var
i
;
/* All of these variables are global. */
Admin1
=
""
;
Admin1
=
""
;
Admin2
=
""
;
Admin2
=
""
;
Admin3
=
""
;
Admin3
=
""
;
...
@@ -170,7 +190,12 @@ function Read_Config_File() {
...
@@ -170,7 +190,12 @@ function Read_Config_File() {
ZLines
=
[];
ZLines
=
[];
Die_Password
=
""
;
Die_Password
=
""
;
Restart_Password
=
""
;
Restart_Password
=
""
;
/* End of global variables */
}
function
Read_Config_File
()
{
var
i
;
Clear_Config_Globals
();
var
fname
=
""
;
var
fname
=
""
;
if
(
Config_Filename
&&
Config_Filename
.
length
)
{
if
(
Config_Filename
&&
Config_Filename
.
length
)
{
...
@@ -195,12 +220,13 @@ function Read_Config_File() {
...
@@ -195,12 +220,13 @@ function Read_Config_File() {
file_handle
.
close
();
file_handle
.
close
();
}
else
{
}
else
{
log
(
LOG_NOTICE
,
"
Couldn't open configuration file! Proceeding with defaults.
"
);
log
(
LOG_NOTICE
,
"
Couldn't open configuration file! Proceeding with defaults.
"
);
load_config_defaults
();
}
}
Time_Config_Read
=
Epoch
();
Time_Config_Read
=
Epoch
();
Scan_For_Banned_Clients
();
Scan_For_Banned_Clients
();
YLines
[
0
]
=
new
YLine
(
120
,
600
,
1
,
505
0000
);
/*
Default IRC class
*/
YLines
[
0
]
=
new
YLine
(
120
,
600
,
1
00
,
100
0000
);
/*
Hardcoded class for fallback
*/
}
}
function
ini_sections
()
{
function
ini_sections
()
{
...
@@ -272,6 +298,51 @@ function ini_Hub(arg, ini) {
...
@@ -272,6 +298,51 @@ function ini_Hub(arg, ini) {
));
));
}
}
function
load_config_defaults
()
{
/*** M:Line ***/
ServerName
=
format
(
"
%s.synchro.net
"
,
system
.
qwk_id
.
toLowerCase
());
ServerDesc
=
system
.
name
;
Default_Port
=
6667
;
/*** A:Line ***/
Admin1
=
format
(
"
%s (%s)
"
,
system
.
name
,
system
.
qwk_id
);
Admin2
=
system
.
version_notice
;
Admin3
=
format
(
"
Sysop- <sysop@%s>
"
,
system
.
host_name
);
/*** Y:Line *** ping freq, connect freq, max clients, max sendq bytes */
/* Class 1: Internet users */
YLines
[
1
]
=
new
YLine
(
120
,
0
,
100
,
1000000
);
/* Class 2: BBS users */
YLines
[
2
]
=
new
YLine
(
30
,
0
,
100
,
1000000
);
/* Class 10: IRC operators */
YLines
[
10
]
=
new
YLine
(
400
,
0
,
10
,
2000000
);
/* Class 30: Leaf -> Hub Servers */
YLines
[
30
]
=
new
YLine
(
60
,
300
,
1
,
15000000
);
/* Class 40: Hub -> Hub Servers */
YLines
[
40
]
=
new
YLine
(
90
,
60
,
10
,
20000000
);
/* Class 50: Hub -> QWK Authenticator */
YLines
[
50
]
=
new
YLine
(
90
,
60
,
1
,
20000000
);
/*** I:Line *** mask, password, hostmask, port, class */
ILines
.
push
(
new
ILine
(
"
*@127.0.0.1
"
,
null
,
"
*@*
"
,
null
,
2
));
ILines
.
push
(
new
ILine
(
"
*@::1
"
,
null
,
"
*@*
"
,
null
,
2
));
ILines
.
push
(
new
ILine
(
"
*@*
"
,
null
,
"
*@*
"
,
null
,
1
));
/*** O:Line *** mask, password, name, flags, class */
OLines
.
push
(
new
OLine
(
format
(
"
*@%s
"
,
ServerName
),
"
*
"
,
"
Sysop
"
,
parse_oline_flags
(
"
OS
"
),
10
));
/*** U:Line ***/
ULines
.
push
(
"
services.synchro.net
"
);
ULines
.
push
(
"
stats.synchro.net
"
);
/*** K:Line *** deliberately empty by default */
/*** Z:Line *** deprecated and combined with above */
/*** Q:Line ***/
QLines
.
push
(
new
QLine
(
"
*Serv
"
,
"
Reserved for Services
"
));
QLines
.
push
(
new
QLine
(
"
Global
"
,
"
Reserved for Services
"
));
QLines
.
push
(
new
QLine
(
"
IRCOp*
"
,
"
Reserved for IRC Operators
"
));
QLines
.
push
(
new
QLine
(
"
Sysop
"
,
"
Reserved for Sysop
"
));
/*** H:Line ***/
HLines
.
push
(
new
HLine
(
"
*
"
,
"
vert.synchro.net
"
));
HLines
.
push
(
new
HLine
(
"
*
"
,
"
cvs.synchro.net
"
));
HLines
.
push
(
new
HLine
(
"
*
"
,
"
hub.synchro.net
"
));
/*** P:Line *** deliberately empty by default */
}
function
read_ini_config
(
conf
)
{
function
read_ini_config
(
conf
)
{
var
ini
=
conf
.
iniGetAllObjects
();
var
ini
=
conf
.
iniGetAllObjects
();
var
Sections
=
new
ini_sections
();
var
Sections
=
new
ini_sections
();
...
@@ -424,3 +495,69 @@ function read_conf_config(conf) {
...
@@ -424,3 +495,69 @@ function read_conf_config(conf) {
}
}
}
}
function
CLine
(
host
,
password
,
servername
,
port
,
ircclass
)
{
this
.
host
=
host
;
this
.
password
=
password
;
this
.
servername
=
servername
;
this
.
port
=
port
;
this
.
ircclass
=
ircclass
;
if
(
YLines
[
ircclass
].
connfreq
>
0
&&
parseInt
(
port
)
>
0
&&
!
Servers
[
servername
.
toLowerCase
()]
)
{
Reset_Autoconnect
(
this
,
1
/* connect immediately */
);
}
}
function
HLine
(
allowedmask
,
servername
)
{
this
.
allowedmask
=
allowedmask
;
this
.
servername
=
servername
;
}
function
ILine
(
ipmask
,
password
,
hostmask
,
port
,
ircclass
)
{
this
.
ipmask
=
ipmask
;
this
.
password
=
password
;
this
.
hostmask
=
hostmask
;
this
.
port
=
port
;
this
.
ircclass
=
ircclass
;
}
function
KLine
(
hostmask
,
reason
,
type
)
{
this
.
hostmask
=
hostmask
;
this
.
reason
=
reason
;
this
.
type
=
type
;
}
function
NLine
(
host
,
password
,
servername
,
flags
,
ircclass
)
{
this
.
host
=
host
;
this
.
password
=
password
;
this
.
servername
=
servername
;
this
.
flags
=
flags
;
this
.
ircclass
=
ircclass
;
}
function
OLine
(
hostmask
,
password
,
nick
,
flags
,
ircclass
)
{
this
.
hostmask
=
hostmask
;
this
.
password
=
password
;
this
.
nick
=
nick
;
this
.
flags
=
flags
;
this
.
ircclass
=
ircclass
;
}
function
QLine
(
nick
,
reason
)
{
this
.
nick
=
nick
;
this
.
reason
=
reason
;
}
function
YLine
(
pingfreq
,
connfreq
,
maxlinks
,
sendq
)
{
this
.
pingfreq
=
pingfreq
;
this
.
connfreq
=
connfreq
;
this
.
maxlinks
=
maxlinks
;
this
.
sendq
=
sendq
;
this
.
active
=
0
;
}
function
ZLine
(
ipmask
,
reason
)
{
this
.
ipmask
=
ipmask
;
this
.
reason
=
reason
;
}
This diff is collapsed.
Click to expand it.
exec/load/ircd/core.js
+
0
−
67
View file @
0972c5b8
...
@@ -2948,73 +2948,6 @@ function YLine_Increment(yline) {
...
@@ -2948,73 +2948,6 @@ function YLine_Increment(yline) {
/** Global object prototypes **/
/** Global object prototypes **/
function
CLine
(
host
,
password
,
servername
,
port
,
ircclass
)
{
this
.
host
=
host
;
this
.
password
=
password
;
this
.
servername
=
servername
;
this
.
port
=
port
;
this
.
ircclass
=
ircclass
;
if
(
YLines
[
ircclass
].
connfreq
>
0
&&
parseInt
(
port
)
>
0
&&
!
Servers
[
servername
.
toLowerCase
()]
)
{
Reset_Autoconnect
(
this
,
1
/* connect immediately */
);
}
}
function
HLine
(
allowedmask
,
servername
)
{
this
.
allowedmask
=
allowedmask
;
this
.
servername
=
servername
;
}
function
ILine
(
ipmask
,
password
,
hostmask
,
port
,
ircclass
)
{
this
.
ipmask
=
ipmask
;
this
.
password
=
password
;
this
.
hostmask
=
hostmask
;
this
.
port
=
port
;
this
.
ircclass
=
ircclass
;
}
function
KLine
(
hostmask
,
reason
,
type
)
{
this
.
hostmask
=
hostmask
;
this
.
reason
=
reason
;
this
.
type
=
type
;
}
function
NLine
(
host
,
password
,
servername
,
flags
,
ircclass
)
{
this
.
host
=
host
;
this
.
password
=
password
;
this
.
servername
=
servername
;
this
.
flags
=
flags
;
this
.
ircclass
=
ircclass
;
}
function
OLine
(
hostmask
,
password
,
nick
,
flags
,
ircclass
)
{
this
.
hostmask
=
hostmask
;
this
.
password
=
password
;
this
.
nick
=
nick
;
this
.
flags
=
flags
;
this
.
ircclass
=
ircclass
;
}
function
QLine
(
nick
,
reason
)
{
this
.
nick
=
nick
;
this
.
reason
=
reason
;
}
function
YLine
(
pingfreq
,
connfreq
,
maxlinks
,
sendq
)
{
this
.
pingfreq
=
pingfreq
;
this
.
connfreq
=
connfreq
;
this
.
maxlinks
=
maxlinks
;
this
.
sendq
=
sendq
;
this
.
active
=
0
;
}
function
ZLine
(
ipmask
,
reason
)
{
this
.
ipmask
=
ipmask
;
this
.
reason
=
reason
;
}
function
WhoWasObj
(
nick
,
uprefix
,
host
,
realname
,
server
,
serverdesc
)
{
function
WhoWasObj
(
nick
,
uprefix
,
host
,
realname
,
server
,
serverdesc
)
{
this
.
nick
=
nick
;
this
.
nick
=
nick
;
this
.
uprefix
=
uprefix
;
this
.
uprefix
=
uprefix
;
...
...
This diff is collapsed.
Click to expand it.
exec/load/ircd/user.js
+
0
−
23
View file @
0972c5b8
...
@@ -65,29 +65,6 @@ USERMODE_BCAST["A"] = true;
...
@@ -65,29 +65,6 @@ USERMODE_BCAST["A"] = true;
/* Services modes are broadcast but not displayed to the user. */
/* Services modes are broadcast but not displayed to the user. */
const
USERMODE_SERVICES
=
{};
const
USERMODE_SERVICES
=
{};
/* Various permissions that can be set on an O:Line */
const
OLINE_CAN_REHASH
=
(
1
<<
0
);
/* r */
const
OLINE_CAN_RESTART
=
(
1
<<
1
);
/* R */
const
OLINE_CAN_DIE
=
(
1
<<
2
);
/* D */
const
OLINE_CAN_GLOBOPS
=
(
1
<<
3
);
/* g */
const
OLINE_CAN_WALLOPS
=
(
1
<<
4
);
/* w */
const
OLINE_CAN_LOCOPS
=
(
1
<<
5
);
/* l */
const
OLINE_CAN_LSQUITCON
=
(
1
<<
6
);
/* c */
const
OLINE_CAN_GSQUITCON
=
(
1
<<
7
);
/* C */
const
OLINE_CAN_LKILL
=
(
1
<<
8
);
/* k */
const
OLINE_CAN_GKILL
=
(
1
<<
9
);
/* K */
const
OLINE_CAN_KLINE
=
(
1
<<
10
);
/* b */
const
OLINE_CAN_UNKLINE
=
(
1
<<
11
);
/* B */
const
OLINE_CAN_LGNOTICE
=
(
1
<<
12
);
/* n */
const
OLINE_CAN_GGNOTICE
=
(
1
<<
13
);
/* N */
const
OLINE_IS_ADMIN
=
(
1
<<
14
);
/* A */
/* Synchronet IRCd doesn't have umode +a RESERVED */
const
OLINE_CAN_UMODEC
=
(
1
<<
16
);
/* c */
const
OLINE_CAN_CHATOPS
=
(
1
<<
19
);
/* s */
const
OLINE_CHECK_SYSPASSWD
=
(
1
<<
20
);
/* S */
const
OLINE_CAN_EVAL
=
(
1
<<
21
);
/* x */
const
OLINE_IS_GOPER
=
(
1
<<
22
);
/* "big O" */
/* Bits used for walking the complex WHO flags. */
/* Bits used for walking the complex WHO flags. */
const
WHO_AWAY
=
(
1
<<
0
);
/* a */
const
WHO_AWAY
=
(
1
<<
0
);
/* a */
const
WHO_CHANNEL
=
(
1
<<
1
);
/* c */
const
WHO_CHANNEL
=
(
1
<<
1
);
/* c */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment