-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakeconf
More file actions
751 lines (646 loc) · 19.6 KB
/
makeconf
File metadata and controls
751 lines (646 loc) · 19.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
#!/bin/sh
# makeconf $Id: makeconf 3314 2008-03-05 04:12:56Z Fish $
if [ "$1" ] ; then
NEOSTATSCONF=$1
else
NEOSTATSCONF="neostats.conf"
fi
TIME=`date +"%H:%M:%S %Z"`
DATE=`date +"%a, %b %e %Y"`
SERVNAME="stats.somenet.net"
ROOTNICK="NeoStats"
SERVICEHOST="stats.net"
SERVNUMERIC="1"
INFOLINE="NeoStats 3.0 IRC Services"
LINKPORT="6667"
LINKSERVER="127.0.0.1"
LINKPASS="linkpassword"
NEOCHAN="#services"
NEOCONN="10"
BINDIP="127.0.0.1 <- CHANGETHIS!!"
LOGFNAMEFORMAT="-%m-%d"
SETSERVERTIMES="24"
DATABASE="gdbm"
# these are so I can use stuff like $1 without it replacing it...like by
# using $dlrsgn$uno for $1
dlrsgn="$"
uno="1"
dos="2"
# remove the temp file if it exists
rm -f mkconf.tmp
# make a quick script for replacing one line with another
cat > repl_str << __EOF__
sed -e "s@^$dlrsgn$uno\(.*\)@$dlrsgn$dos" $NEOSTATSCONF > mkconf.tmp
cp mkconf.tmp $NEOSTATSCONF
rm mkconf.tmp
__EOF__
# mark repl_str as an executable
chmod +x repl_str
rm -f repl_str
# Checking out how to specify not to make a new line with the current OS
c=''
n=''
2>/dev/null
if [ "`eval echo -n 'a'`" = "-n a" ]; then
c='\c'
else
n='-n'
fi
# If Settings exist, load the info, otherwise tell them to run configure.
if [ -r config.h ]; then
echo "Starting configuration.. "
else if [ -r include/config.h ]; then
echo "Starting configuration.. "
else
echo "Configuration failed!"
echo "You have not run configure yet!"
echo "You probably should read the README file too"
echo ""
echo "Type ./configure"
echo "(If you need help read the README before asking us)"
echo ""
exit 1
fi
fi
CONF=$NEOSTATSCONF
if [ -r "$CONF" ]; then
echo "$NEOSTATSCONF found"
echo " "
echo "You already have a configuration file. This script is just for"
echo "creating the configuration file. If you continue you WILL LOSE"
echo "all the data that is already in your configuration file!"
echo ""
echo "If you are sure you want to recreate your configuration file"
echo "type 'recreate'."
echo $n " [exit] -> $c"
read cc
if [ "$cc" != "recreate" ]; then
echo " "
echo "Do you want to edit $NEOSTATSCONF using an editor?"
echo "If so, specify the editor you want to use. Otherwise,"
echo "type 'exit'."
EDITFND="not found"
if [ -r /usr/bin/pico ]; then
EDITFND="pico"
fi
if [ -r /usr/bin/joe ]; then
EDITFND="joe"
fi
if [ -r /usr/bin/vi ]; then
EDITFND="vi"
fi
if [ -r /usr/bin/vim ]; then
EDITFND="vim"
fi
while [ "c" = "c" ]; do
echo $n " [$EDITFND] -> $c"
read EDITOR
if [ -z "$EDITOR" ]; then
EDITOR="$EDITFND"
fi
if [ "$EDITOR" = "exit" ]; then
echo "Done."
exit 1
fi
if [ -f $EDITOR ]; then
$EDITOR $CONF
exit 1
fi
if [ -f /usr/bin/$EDITOR ]; then
/usr/bin/$EDITOR $CONF
exit 1
fi
echo "Editor not found. Specify a valid editor or"
echo "type 'exit' to quit this script."
done
fi
mv $CONF "$CONF.saved"
rm $CONF
echo "$NEOSTATSCONF has been renamed to $CONF.saved"
else
echo "$NEOSTATSCONF is not found. (good)"
fi
clear
echo ""
echo "Thanks for Choosing NeoStats!"
echo ""
echo "*----------------------------------------*"
echo "| Welcome to the $NEOSTATSCONF generator. |"
echo "*----------------------------------------*"
###########################################################################
# select IRCd
validselection=0
echo "Which IRC server do you use?"
echo " 1) Unreal 3.1.x"
echo " 2) Unreal 3.2.x"
echo " 3) Ultimate 2.x.x"
echo " 4) Ultimate 3.x.x"
echo " 5) Hybrid7"
echo " 6) Bahamut 1.4"
echo " 7) Bahamut 1.8"
echo " 8) Plexus"
echo " 9) IRCu P10"
echo " 10) Asuka"
echo " 11) Nefarious"
echo " 12) Inspircd 1.1"
while [ $validselection -eq 0 ] ; do
echo $n " [$IRCD_DEFAULT] -> $c"
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$IRCD_DEFAULT
fi
case $INPUT in
no\ default)
echo "You must specify your IRC server type in order for NeoStats to function"
echo "correctly."
;;
1)
IRCD="unreal31"
validselection=1
;;
2)
IRCD="unreal32"
validselection=1
;;
3)
IRCD="ultimate2"
validselection=1
;;
4)
IRCD="ultimate3"
validselection=1
;;
5)
IRCD="hybrid7"
MEXTAUTHALLOWED=0
validselection=1
;;
6)
IRCD="bahamut14"
validselection=1
;;
7)
IRCD="bahamut18"
validselection=1
;;
8)
IRCD="plexus"
validselection=1
;;
9)
IRCD="ircup10"
validselection=1
;;
10)
IRCD="asuka"
validselection=1
;;
11)
IRCD="nefarious"
validselection=1
;;
12)
IRCD="inspircd"
validselection=1
;;
*)
echo "Please enter a valid option number."
;;
esac
done
IRCD_DEFAULT=$INPUT
echo ""
echo " "
echo "What will your root nickname be? (ie: $ROOTNICK)"
echo $n " [$ROOTNICK] -> $c"
read cc
if [ ! -z "$cc" ]; then
ROOTNICK="$cc"
fi
echo " "
echo "What will your service host be? (ie: $SERVICEHOST)"
echo $n " [$SERVICEHOST] -> $c"
read cc
if [ ! -z "$cc" ]; then
SERVICEHOST="$cc"
fi
echo " "
echo "What will your server name be? (ie: $SERVNAME)"
echo $n " [$SERVNAME] -> $c"
read cc
if [ ! -z "$cc" ]; then
SERVNAME="$cc"
fi
echo " "
echo "What is your IRC server's IP? (ie: $LINKSERVER)"
echo $n " [$LINKSERVER] -> $c"
read cc
if [ ! -z "$cc" ]; then
LINKSERVER="$cc"
fi
echo " "
echo "What is the IRCd's Link port? (ie: 7890)"
echo $n " [$LINKPORT] -> $c"
read cc
if [ ! -z "$cc" ]; then
LINKPORT="$cc"
fi
echo " "
echo "What is the IRCd's Link password for stats? (ie: bleh)"
echo $n " [$LINKPASS] -> $c"
read cc
if [ ! -z "$cc" ]; then
LINKPASS="$cc"
fi
echo " "
echo "NeoStats Server comment?"
echo $n " [$INFOLINE] -> $c"
read cc
if [ ! -z "$cc" ]; then
INFOLINE="$cc"
fi
echo " "
echo "What channel should NeoStats join on IRC?"
echo $n " [$NEOCHAN] -> $c"
read cc
if [ ! -z "$cc" ]; then
NEOCHAN="$cc"
fi
echo " "
echo "Time in seconds we wait before attempting to reconnect to the server on a split?"
echo $n " [$NEOCONN] -> $c"
read cc
if [ ! -z "$cc" ]; then
NEOCONN="$cc"
fi
echo " "
echo "What IP should NeoStats Bind to? (ie: 203.208.228.144)"
echo "This is optional. See neostats.conf for more information"
echo $n " [$BINDIP] -> $c"
read cc
if [ ! -z "$cc" ]; then
BINDIP="$cc"
fi
cat > $CONF << __EOF__
##################################################
## Configuration file for NeoStats
## Created: $DATE - $TIME
## NeoStats Copyright (c) 1999-2008, Adam Rutter, Justin Hammond, Mark Hetherington
## Web: http://www.NeoStats.Net
## File Revision: 3.0
##################################################
##################################################
#Each of the options has an indicator as follows:
# [REQUIRED] - must be set or NeoStats will not run.
# [RECOMMENDED] - optional but may cause problems if not set.
# [OPTIONAL] - optional and the feature will be disabled if not set.
# [DISCOURAGED] - may cause undesirable side effects if enabled.
##################################################
#################################
# NeoStats Server Configuration #
#################################
ServerConfig {
# NAME = "<hostname>" [REQUIRED]
# Specifies the name of the NeoStats Server as it will appear on
# the network. e.g.
#
# SERVER_NAME = "stats.neostats.net"
#
# When NeoStats links, it will appear as stats.neostats.net.
Name = "$SERVNAME"
# INFO = "<info line>" [REQUIRED]
# Specify the description of the server that
# appears when you do /links e.g.
#
# INFO "Network Auxiliary Services"
Info = "$INFOLINE"
# SERVICECHANNEL="#<channel name>" [REQUIRED]
# Specify the channel that all bots on NeoStats
# will automatically join, and echo out any
# important information e.g.
#
# SERVICECHANNEL="#services"
#
# Makes NeoStats, and all the other bots join #services channel on
# start-up/load.
ServiceChannel = "$NEOCHAN"
# SERVER_NUMERIC = <numeric> [RECOMMENDED]
# Specify the numeric of the server to send on connect.
# This must be a value between 1 and 254, and must not be in use by
# any other IRC server on the network.
#
# SERVER_NUMERIC = 1
ServerNumeric = $SERVNUMERIC
# BINDTO = <ip address or hostname> [OPTIONAL]
# Make NeoStats bind to a particular IP Address. If not
# specified NeoStats will attempt to find this address
# itself. e.g.
#
# BINDTO 203.203.123.12
#
# All outgoing connections from NeoStats will originate from this
# IP address
# This IP address should not be localhost (127.0.0.1)
BindTo = "$BINDIP"
# PROTOCOL = "<protocol>" [REQUIRED]
# Specifies the protocol module to use.
# Valid protocol options are:
# unreal31 unreal32 ultimate2 ultimate3
# hybrid7 bahamut14 bahamut18 plexus
# ircup10 asuka nefarious
# client
#
# PROTOCOL = "unreal32"
#
Protocol = "$IRCD"
}
#################################
# NeoStats Option Configuration #
#################################
Options {
# RECONNECTTIME = <seconds> [RECOMMENDED]
# If NeoStats server gets split from the network, how long to wait
# before attempting to reconnect to the network. A value of 0 will
# cause NeoStats to shutdown and not attempt to reconnect. e.g.
#
# RECONNECTTIME = 10
#
# Specifies wait 10 seconds before trying to reconnect
#
# RECONNECT_TIME = 0
#
# Tells NeoStats to never reconnect to the network
#
# If not specified, NeoStats will default to 10 seconds.
ReconnectTime = $NEOCONN
# USEPRIVMSG = <true/false> [DISCOURAGED]
# Specify if the bots should send all messages as privmsgs or as
# notices (Most Services use notice) e.g.
#
# USEPRIVMSG true
#
# If present or set to true, will send all messages as privmsgs (if commented out,
# it will send as Notices) *NOTE:* This option Violates IRC RFC, and
# can cause flooding problems on your network. Its NOT recommended.
UsePrivmsg = false
# OPERONLY = <true/false> [OPTIONAL]
# Restrict NeoStats and StatServ to opers use only.
# If not specified, users will have some access to NeoStats
# and StatServ commands. e.g.
#
# OPERONLY=true
#
# Only opers may use NeoStats and StatServ.
OperOnly = false
# SERVERSETTIME=<INTERVAL> [OPTIONAL]
# Cause NeoStats to sync server times at the given interval
# INTERVAL is an integer representing the number of hours
#
# Examples
#
# SERVERSETTIME=24
#
# Cause NeoStats to sync server times every 24 hours
# If not present, NeoStats will not sync times.
# This option only works on servers that support this and
# defaults to a sync interval of 24 hours. Enabling this
# option will also cause NeoStats to sync servers when it
# first joins the network.
ServerSettime = 24
# DatabaseType = "<dbm>" [OPTIONAL]
# Specifies the database manager module to use.
# NeoStats will default to GDBM if this is not provided.
# Valid options are:
# gdbm
# bdb (if found during configure)
#
# DatabaseType = "gdbm"
#
#
DatabaseType = "$DATABASE"
# LOGFILENAMEFORMAT = "<format>" [OPTIONAL]
# Defines the format for dated log files. This allows you to choose
# what date format is used for log file names when they are rotated at
# midnight. The option uses the parameters passed to strftime so you
# can use any options valid for that function. Common ones are:
# %a Abbreviated weekday name
# %A Full weekday name
# %b Abbreviated month name
# %B Full month name
# %d Day of month as decimal number (01 31)
# %m Month as decimal number (01 12)
# %y Year without century, as decimal number (00 99)
# %Y Year with century, as decimal number
#
# Examples using 30 September 2003 as the date:
# For NeoStats0930.log:
#
# LOGFILENAMEFORMAT="%m%d"
#
# For NeoStats20030930.log:
#
# LOGFILENAMEFORMAT="%Y%m%d"
#
# If not defined, the default is the original NeoStats log format of
# "-%m-%d" i.e. NeoStats-09-30.log
#LogFileNameFormat = "$LOGFNAMEFORMAT"
# ROOTNICK = "<nick>" [REQUIRED]
# Specifies the nick of the NeoStats root bot
# e.g.
#
# ROOTNICK="NeoStats"
#
# When NeoStats links, it create a root bot with nick NeoStats
RootNick = "$ROOTNICK"
# SERVICESHOST = "<hostname>" [REQUIRED]
# Specifies the default host of NeoStats service bots
# e.g.
#
# SERVICEHOST="stats.net"
#
# Service bots will now we user@stats.net
# If not specified NeoStats will default to the server name
ServicesHost = "$SERVICEHOST"
# NOLOAD = true [YOU MUST REMOVE THIS]
# If this is in the neostats.conf your NeoStats WILL NOT START UP. To
# disable this simply comment this line out. e.g.
#
# NOLOAD = true <- NeoStats will not load.
#
# #NOLOAD = true <- NeoStats will load.
#
# NOLOAD = false <- Neostats will load.
NOLOAD = true
}
##################################
# NeoStats Linking Configuration #
##################################
# This section defines the Server that NeoStats will
# attempt to link to. You must configure this server
# with the correct C/N and U lines for Neostats
Servers {
# IPADDRESS ="<ip address or hostname>" [REQUIRED]
# Specifies the IP address to connect to. e.g.
#
# IPADDRESS="127.0.0.1"
#
# This will force stats to connect to 127.0.0.1
IpAddress = "$LINKSERVER"
# PORT = <port number> [REQUIRED]
# Specifies the port to connect to on the IRC Server e.g.
#
# PORT=6667
#
# When connecting, NeoStats will connect to port 6667
Port = $LINKPORT
# PASSWORD="<link password>" [REQUIRED]
# Specifies the password used to connect. This must match your C/N
# lines in your IRCD configuration e.g.
#
# PASSWORD="linkpass"
#
# Send "linkpass" as the password to connect
Password = "$LINKPASS"
}
########################################
# NeoStats Administrator Configuration #
########################################
ServiceRoot {
#MASK="<nick!ident@host>" [REQUIRED]
# Who should get master access to manage NeoStats regardless of
# authentication systems. Only one entry allowed. e.g.
#
# MASK="fish!?Fish@*.neostats.net"
#
# Will give "fish" complete access to NeoStats if fish has
# umode +r and comes from the specified hostname and ident.
#Mask = "ircop!*@*"
}
#################################
# NeoStats Module Configuration #
#################################
Modules {
#####################################
# Module Configurations and Loading #
#####################################
# MODULENAME = {"<module name>", "<module name>", "<module_name>"} [OPTIONAL]
# What modules to load at start-up. e.g.
#
# MODULENAME = { "statserv" }
#
# Will load up StatServ only at boot
#
# To specify NeoStats to load multiple modules, place a comma after
# each module and specify the next one e.g.
#
# MODULENAME = { "statserv", "extauth" }
#
# will load up both statserv and extauth modules
#
# We have provided example lines for convenience for
# official modules but you must download and install
# external modules before trying to load them.
MODULENAME = {
# Update notification module, loaded by default
"update",
# StatServ, maintain and report various networks statistics
"statserv",
# HostServ, vhost services for users
"hostserv",
# TextServ, text messaging service
"textserv",
# ConnectServ, monitor connections to the network: user connections, oper
# modes, server connections and nick changes.
"connectserv",
# Operlog, operator command logging service
"operlog",
# IRCdauth, authenticate users based on their user modes.
"ircdauth",
# Extauth, authenticate users based on nick!user@host access lists
"extauth",
# QuoteServ, Quote Message Service
"quoteserv",
# LimitServ, Channel Limit Setting Service
"limitserv",
# SecureServ. You must download and install SecureServ first.
# "secureserv",
# BLSB. You must download and install BLSB first.
# "blsb",
# OPSB. You must download and install OPSB first.
# "opsb",
# LogServ. You must download and install LogServ first.
# "logserv",
# TriviaServ. You must download and install TriviaServ first.
# "triviaserv",
# WarServ. You must download and install WarServ first.
# "warserv",
# GamesServ. You must download and install GameServ first.
# "gamesserv",
# YahzteeServ. You must download and install YahzteeServ first.
# "yahtzeeserv",
# FloodServ. You must download and install FloodServ first.
# "floodserv",
# SeenServ. You must download and install SeenServ first.
# "seenserv",
# ProfileServ. You must download and install ProfileServ first.
# "profileserv",
}
}
#####################################
# NeoNetConfigurations and Loading #
#####################################
# NeoNet is a protocol that links all NeoStats installations back to the main
# NeoStats sites, such as http://secure.irc-chat.net etc.
# This allows you to take advantage of some of the aditional features or modules
# that we support, such as updated definitions for SecureServ accounts, or
# reporting options for OPSB.
# You must visit http://accounts.neostats.net/ to create your NeoNet account
# and select what aditional options you would like. (some might require 3rd
# party modules, such as SecureServ or OPSB).
# If you have been using SecureServ on the 2.5 series, please visit
# http://accounts.neostats.net/migrate/ for information on how to
# use your existing Secure.irc-chat.net account with NeoNet.
NeoNet {
# This is the username, as supplied on the NeoNet pages.
# It should be your IRC Network user account and not your
# personal accounts.
# UserName = "somenet"
# This is your IRC Network User account password.
# PassWord = "password"
# Leave the port at 2960 unless otherwise instructed.
# Port = 2960
# This option handles how NeoNet connections are established. The available
# options are:
# yes - Connect to NeoNet during startup
# no - Never connect to NeoNet (Note, some features might not work if Connect
# is set to No
# demand - Only connect to NeoNet when there is a pending NeoNet Message
# to be sent.
Connect = "yes"
}
###############################################################################
## End of Configuration ##
###############################################################################
__EOF__
# Make it so ONLY the one who created the conf can read or write.
chmod 700 $NEOSTATSCONF
echo ""
echo "*------------------------------------------------*"
echo "| Thank you for choosing NeoStats. |"
echo "| You must now edit neostats.conf and check all |"
echo "| settings are correct then just type ./neostats |"
echo "| to run NeoStats. NeoStats will not run until |"
echo "| you do not edit this file. |"
echo "*------------------------------------------------*"
echo "| Check any external and third party modules you |"
echo "| wish to use (e.g. SecureServ) are compiled and |"
echo "| installed then add them to $NEOSTATSCONF for |"
echo "| them to load. |"
echo "*------------------------------------------------*"
echo "| **I CANT STRESS THIS ENOUGH, PLEASE READ THE** |"
echo "| **README FILE BEFORE ASKING FOR HELP!!!!! ** |"
echo "*------------------------------------------------*"
echo "| This file was updated by M (mark@ctcp.net) |"
echo "*------------------------------------------------*"
echo
exit 1