Thread: [srvx-commits] CVS: services/src sockcheck.c,1.74,1.75 opserv.c,1.260,1.261 nickserv.c,1.193,1.194 m
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-08-11 03:26:24
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv8293/src
Modified Files:
sockcheck.c opserv.c nickserv.c mini-tools.c main.c helpserv.c
hash.h global.c conf.c compat.h chanserv.c Makefile.am
Log Message:
add configure --with-modules option (and sample module, for arcnet's use)
require automake-1.5 or higher (to make --with-modules and $(OBJEXT) work sanely)
make kick_func callbacks return void, not int
make conf_register_reload() call the config re(lo)ad function
add split_line() to mini-tools.c
make valid_user_for() remove allowauth from dict itself
Index: sockcheck.c
===================================================================
RCS file: /cvsroot/srvx/services/src/sockcheck.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** sockcheck.c 30 Jul 2002 02:15:11 -0000 1.74
--- sockcheck.c 11 Aug 2002 03:26:15 -0000 1.75
***************
*** 1080,1084 ****
{
conf_register_reload(sockcheck_read_conf);
- sockcheck_read_conf();
reg_exit_func(sockcheck_shutdown);
_sockcheck_init();
--- 1080,1083 ----
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -C2 -r1.260 -r1.261
*** opserv.c 5 Aug 2002 03:22:19 -0000 1.260
--- opserv.c 11 Aug 2002 03:26:16 -0000 1.261
***************
*** 4373,4377 ****
{
opserv = AddService(nick, "Oper Services");
- opserv_conf_read();
conf_register_reload(opserv_conf_read);
--- 4373,4376 ----
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -C2 -r1.193 -r1.194
*** nickserv.c 8 Aug 2002 02:15:58 -0000 1.193
--- nickserv.c 11 Aug 2002 03:26:16 -0000 1.194
***************
*** 647,650 ****
--- 647,651 ----
}
if (!res && (dict_find(nickserv_allow_auth_dict, user->nick, NULL) == hi)) {
+ dict_remove(nickserv_allow_auth_dict, user->nick);
res = 2;
}
***************
*** 1335,1344 ****
}
res = valid_user_for(user, hi);
! if (res == 0) {
nickserv_notice(user, NSMSG_HOSTMASK_INVALID, hi->handle);
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
- } else if (res == 2) {
- dict_remove(nickserv_allow_auth_dict, user->nick);
}
if (!checkpass(passwd, hi->passwd)) {
--- 1336,1343 ----
}
res = valid_user_for(user, hi);
! if (!res) {
nickserv_notice(user, NSMSG_HOSTMASK_INVALID, hi->handle);
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
}
if (!checkpass(passwd, hi->passwd)) {
***************
*** 3314,3318 ****
userList_init(&curr_helpers);
- conf_register_reload(nickserv_conf_read);
nickserv_service = service_register(nickserv, 0);
--- 3313,3316 ----
Index: mini-tools.c
===================================================================
RCS file: /cvsroot/srvx/services/src/mini-tools.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** mini-tools.c 30 Jul 2002 02:15:11 -0000 1.2
--- mini-tools.c 11 Aug 2002 03:26:16 -0000 1.3
***************
*** 26,29 ****
--- 26,56 ----
}
+ int
+ split_line(unsigned char *line, int irc_colon, int argv_size, unsigned char *argv[])
+ {
+ int argc = 0;
+ int n;
+ while (*line && (argc < argv_size)) {
+ while (*line == ' ') *line++ = 0;
+ if (*line == ':' && irc_colon && argc > 0) {
+ /* the rest is a single parameter */
+ argv[argc++] = line + 1;
+ break;
+ }
+ if (!*line) break;
+ argv[argc++] = line;
+ if (argc >= argv_size) break;
+ while (*line != ' ' && *line) line++;
+ }
+ #ifdef NDEBUG
+ n = 0;
+ #else
+ for (n=argc; n<argv_size; n++) {
+ argv[n] = (unsigned char*)0xFEEDBEEF;
+ }
+ #endif
+ return argc;
+ }
+
void
tools_init(void)
Index: main.c
===================================================================
RCS file: /cvsroot/srvx/services/src/main.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -r1.131 -r1.132
*** main.c 4 Aug 2002 21:12:57 -0000 1.131
--- main.c 11 Aug 2002 03:26:16 -0000 1.132
***************
*** 57,60 ****
--- 57,63 ----
#include "sockcheck.h"
#include "helpserv.h"
+ #ifdef EXTRA_MODULES
+ #include "modules.h"
+ #endif
extern FILE *replay_file;
***************
*** 753,757 ****
}
- uplink_compile();
conf_register_reload(uplink_compile);
--- 756,759 ----
***************
*** 796,799 ****
--- 798,804 ----
conf_globals();
conf_rlimits();
+ #ifdef EXTRA_MODULES
+ modules_init();
+ #endif
modcmd_finalize();
if (replay_file) log(MAIN_LOG, LOG_INFO, "Beginning replay...\n");
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** helpserv.c 5 Aug 2002 03:22:19 -0000 1.22
--- helpserv.c 11 Aug 2002 03:26:16 -0000 1.23
***************
*** 3677,3681 ****
helpserv_enabled = 1;
- helpserv_conf_read();
conf_register_reload(helpserv_conf_read);
--- 3677,3680 ----
Index: hash.h
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.h,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** hash.h 8 Aug 2002 02:15:58 -0000 1.85
--- hash.h 11 Aug 2002 03:26:16 -0000 1.86
***************
*** 225,229 ****
void KickChannelUser(struct userNode* target, struct chanNode* channel, struct userNode *kicker, const char *why);
! typedef int (*kick_func_t) (struct userNode *kicker, struct userNode *user, struct chanNode *chan);
void reg_kick_func(kick_func_t handler);
void ChannelUserKicked(struct userNode* kicker, struct userNode* victim, struct chanNode* channel);
--- 225,229 ----
void KickChannelUser(struct userNode* target, struct chanNode* channel, struct userNode *kicker, const char *why);
! typedef void (*kick_func_t) (struct userNode *kicker, struct userNode *user, struct chanNode *chan);
void reg_kick_func(kick_func_t handler);
void ChannelUserKicked(struct userNode* kicker, struct userNode* victim, struct chanNode* channel);
Index: global.c
===================================================================
RCS file: /cvsroot/srvx/services/src/global.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** global.c 5 Aug 2002 03:22:19 -0000 1.48
--- global.c 11 Aug 2002 03:26:16 -0000 1.49
***************
*** 765,769 ****
reg_oper_func(global_process_oper);
- global_conf_read();
conf_register_reload(global_conf_read);
--- 765,768 ----
Index: conf.c
===================================================================
RCS file: /cvsroot/srvx/services/src/conf.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** conf.c 30 Jul 2002 02:15:11 -0000 1.28
--- conf.c 11 Aug 2002 03:26:16 -0000 1.29
***************
*** 35,38 ****
--- 35,39 ----
}
reload_funcs[num_rfs++] = crf;
+ crf();
}
Index: compat.h
===================================================================
RCS file: /cvsroot/srvx/services/src/compat.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** compat.h 5 Aug 2002 02:58:17 -0000 1.11
--- compat.h 11 Aug 2002 03:26:16 -0000 1.12
***************
*** 9,13 ****
# define alloca __builtin_alloca
#else
! # if defined(HAVE_ALLOCA_H) && defined(CAN_INCLUDE_ALLOCA_H)
# include <alloca.h>
# else
--- 9,13 ----
# define alloca __builtin_alloca
#else
! # if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# else
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.268
retrieving revision 1.269
diff -C2 -r1.268 -r1.269
*** chanserv.c 10 Aug 2002 01:20:29 -0000 1.268
--- chanserv.c 11 Aug 2002 03:26:16 -0000 1.269
***************
*** 6013,6022 ****
}
! static int
handle_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *channel)
{
char *reason = CSMSG_PROTECT_REASON;
! if(!channel->channel_info || IsService(kicker) || (kicker == victim) || IsSuspended(channel->channel_info)) return 0;
if(protect_user(victim, kicker, channel->channel_info))
--- 6013,6022 ----
}
! static void
handle_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *channel)
{
char *reason = CSMSG_PROTECT_REASON;
! if(!channel->channel_info || IsService(kicker) || (kicker == victim) || IsSuspended(channel->channel_info)) return;
if(protect_user(victim, kicker, channel->channel_info))
***************
*** 6024,6029 ****
KickChannelUser(kicker, channel, chanserv, reason);
}
-
- return 0;
}
--- 6024,6027 ----
***************
*** 6990,6994 ****
{
chanserv = AddService(nick, "Channel Services");
- chanserv_conf_read();
conf_register_reload(chanserv_conf_read);
--- 6988,6991 ----
Index: Makefile.am
===================================================================
RCS file: /cvsroot/srvx/services/src/Makefile.am,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** Makefile.am 30 Jul 2002 02:15:11 -0000 1.51
--- Makefile.am 11 Aug 2002 03:26:16 -0000 1.52
***************
*** 10,15 ****
srvx_LIBS = @RX_LIBS@
! EXTRA_srvx_SOURCES = proto-bahamut.c proto-common.c proto-p10.c
! srvx_LDADD = @PROTO_FILES@
srvx_SOURCES = \
chanserv.c chanserv.h \
--- 10,16 ----
srvx_LIBS = @RX_LIBS@
! EXTRA_srvx_SOURCES = proto-bahamut.c proto-common.c proto-p10.c mod-snoop.c
! srvx_LDADD = @MODULE_OBJS@
! srvx_DEPENDENCIES = @MODULE_OBJS@
srvx_SOURCES = \
chanserv.c chanserv.h \
***************
*** 43,46 ****
checkdb_SOURCES = checkdb.c recdb.c recdb.h dict-splay.c dict.h log.h mini-tools.c
! globtest_SOURCES = tools.c globtest.c common.h dict-splay.c mini-tools.c
globtest_CFLAGS = -DGLOBTEST
--- 44,48 ----
checkdb_SOURCES = checkdb.c recdb.c recdb.h dict-splay.c dict.h log.h mini-tools.c
! globtest_SOURCES = tools.c globtest.c common.h dict-splay.c dict.h mini-tools.c
globtest_CFLAGS = -DGLOBTEST
+
|