server numeric config option
This commit is contained in:
parent
1cba24ee4f
commit
f3920bfe2d
5 changed files with 31 additions and 2 deletions
8
README
8
README
|
@ -393,6 +393,14 @@ SERVER_INFOLINE <info line> [REQUIRED]
|
|||
|
||||
SERVER_INFOLINE Network Auxiliary Services
|
||||
|
||||
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.
|
||||
Currently only Unreal IRCd uses this option.
|
||||
|
||||
SERVER_NUMERIC 1
|
||||
|
||||
STATSERV_NETNAME <network name> [REQUIRED]
|
||||
Your network name, if unknown refer to your network file. Does not
|
||||
apply to all IRCDs e.g.
|
||||
|
|
10
conf.c
10
conf.c
|
@ -58,7 +58,8 @@ static config_option options[] = {
|
|||
{"ONLY_OPERS", ARG_STR, cb_Server, 11},
|
||||
{"NO_LOAD", ARG_STR, cb_Server, 12},
|
||||
{"BINDTO", ARG_STR, cb_Server, 13},
|
||||
{"LOGFILENAMEFORMAT", ARG_STR, cb_Server, 14}
|
||||
{"LOGFILENAMEFORMAT", ARG_STR, cb_Server, 14},
|
||||
{"SERVER_NUMERIC", ARG_STR, cb_Server, 15},
|
||||
};
|
||||
|
||||
|
||||
|
@ -240,6 +241,13 @@ cb_Server (char *arg, int configtype)
|
|||
memcpy (me.local, arg, sizeof (me.local));
|
||||
} else if (configtype == 14) {
|
||||
strncpy(LogFileNameFormat,arg,MAX_LOGFILENAME);
|
||||
} else if (configtype == 15) {
|
||||
me.numeric = atoi (arg);
|
||||
/* limit value - really need to print error and quit */
|
||||
if(me.numeric<=0)
|
||||
me.numeric=1;
|
||||
if(me.numeric>254)
|
||||
me.numeric=254;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
3
main.c
3
main.c
|
@ -131,6 +131,7 @@ main (int argc, char *argv[])
|
|||
me.coder_debug = 0;
|
||||
me.noticelag = 0;
|
||||
me.r_time = 10;
|
||||
me.numeric = 1;
|
||||
me.lastmsg = time (NULL);
|
||||
me.SendM = me.SendBytes = me.RcveM = me.RcveBytes = 0;
|
||||
me.synced = 0;
|
||||
|
@ -529,7 +530,7 @@ static void
|
|||
login (void)
|
||||
{
|
||||
SET_SEGV_LOCATION();
|
||||
slogin_cmd (me.name, 1, me.infoline, me.pass);
|
||||
slogin_cmd (me.name, me.numeric, me.infoline, me.pass);
|
||||
sprotocol_cmd ("TOKEN CLIENT");
|
||||
}
|
||||
|
||||
|
|
11
makeconf
11
makeconf
|
@ -5,6 +5,7 @@ TIME=`date +"%H:%M:%S %Z"`
|
|||
DATE=`date +"%a, %b %e %Y"`
|
||||
STATSCONF="neostats.cfg"
|
||||
SERVNAME="stats.somenet.net"
|
||||
SERVNUMERIC="1"
|
||||
COMMENT="NeoStats 2.5 IRC Statistical Server!"
|
||||
LINKPORT="6667"
|
||||
LINKSERVER="127.0.0.1"
|
||||
|
@ -303,6 +304,16 @@ CONNECT_PASS $LINKPASS
|
|||
|
||||
SERVER_INFOLINE "$COMMENT"
|
||||
|
||||
# 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.
|
||||
# Currently only Unreal IRCd uses this option.
|
||||
#
|
||||
# SERVER_NUMERIC 1
|
||||
|
||||
SERVER_NUMERIC "$SERVNUMERIC"
|
||||
|
||||
# STATSERV_NETNAME <network name> [REQUIRED]
|
||||
# Your network name, if unknown refer to your network file. Does not
|
||||
# apply to all IRCDs e.g.
|
||||
|
|
1
stats.h
1
stats.h
|
@ -182,6 +182,7 @@ struct me {
|
|||
int port;
|
||||
int r_time;
|
||||
int lag_time;
|
||||
int numeric; /* For Unreal and any other server that needs a numeric */
|
||||
char uplink[MAXHOST];
|
||||
char pass[MAXPASS];
|
||||
char services_name[MAXHOST];
|
||||
|
|
Reference in a new issue