srvx-commits Mailing List for srvx IRC Services (Page 12)
Brought to you by:
entrope
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(80) |
Sep
(51) |
Oct
(94) |
Nov
(132) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(163) |
Feb
(96) |
Mar
(70) |
Apr
(182) |
May
(173) |
Jun
(73) |
Jul
(101) |
Aug
(101) |
Sep
(71) |
Oct
(76) |
Nov
(58) |
Dec
(60) |
2003 |
Jan
(61) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(7) |
Jun
(22) |
Jul
(81) |
Aug
(41) |
Sep
(34) |
Oct
(41) |
Nov
(16) |
Dec
(28) |
2004 |
Jan
(7) |
Feb
|
Mar
(3) |
Apr
(15) |
May
(11) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2005 |
Jan
(13) |
Feb
(6) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(2) |
Feb
(3) |
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2025 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Adrian D. <sai...@us...> - 2003-08-03 14:43:05
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv27188 Modified Files: opserv.c Log Message: Show account in ?trace print Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.333 retrieving revision 1.334 diff -C2 -r1.333 -r1.334 *** opserv.c 3 Aug 2003 03:01:23 -0000 1.333 --- opserv.c 3 Aug 2003 14:43:02 -0000 1.334 *************** *** 3065,3069 **** { struct discrim_and_source *das = extra; ! opserv_notice(das->source, "%s!%s@%s", match->nick, match->ident, match->hostname); return 0; } --- 3065,3073 ---- { struct discrim_and_source *das = extra; ! if (match->handle_info) { ! opserv_notice(das->source, "%s!%s@%s %s", match->nick, match->ident, match->hostname, match->handle_info->handle); ! } else { ! opserv_notice(das->source, "%s!%s@%s", match->nick, match->ident, match->hostname); ! } return 0; } |
From: Entrope <en...@us...> - 2003-08-03 14:40:27
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv26909/src Modified Files: common.h Log Message: allow LIST_append() to work on empty lists Index: common.h =================================================================== RCS file: /cvsroot/srvx/services/src/common.h,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** common.h 3 Aug 2003 03:01:23 -0000 1.90 --- common.h 3 Aug 2003 14:40:24 -0000 1.91 *************** *** 143,147 **** void STRUCTNAME##_append(struct STRUCTNAME *list, ITEMTYPE new_item) {\ if (list->used == list->size) {\ ! list->size <<= 1;\ list->list = realloc(list->list, list->size*sizeof(list->list[0]));\ }\ --- 143,147 ---- void STRUCTNAME##_append(struct STRUCTNAME *list, ITEMTYPE new_item) {\ if (list->used == list->size) {\ ! list->size = list->size ? (list->size << 1) : 4;\ list->list = realloc(list->list, list->size*sizeof(list->list[0]));\ }\ |
From: Adrian D. <sai...@us...> - 2003-08-03 05:33:16
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv15505/src Modified Files: nickserv.c Log Message: Fix typo in last commit. Not sure how that happened. Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.249 retrieving revision 1.250 diff -C2 -r1.249 -r1.250 *** nickserv.c 3 Aug 2003 03:51:17 -0000 1.249 --- nickserv.c 3 Aug 2003 05:33:13 -0000 1.250 *************** *** 1201,1205 **** default: type = "unknown"; break; } ! nickserv_notice(user, NSMSG_NICKSERV_COOKIE, preposition(type), type); } --- 1201,1205 ---- default: type = "unknown"; break; } ! nickserv_notice(user, NSMSG_HANDLEINFO_COOKIE, preposition(type), type); } |
From: Adrian D. <sai...@us...> - 2003-08-03 03:51:20
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv4406 Modified Files: nickserv.c Log Message: Part 2 (final) of RFE#711067 Show outstanding cookies in accountinfo Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.248 retrieving revision 1.249 diff -C2 -r1.248 -r1.249 *** nickserv.c 3 Aug 2003 03:46:18 -0000 1.248 --- nickserv.c 3 Aug 2003 03:51:17 -0000 1.249 *************** *** 151,154 **** --- 151,155 ---- #define NSMSG_HANDLEINFO_VACATION " On vacation." #define NSMSG_HANDLEINFO_EMAIL_ADDR " Email address: %s" + #define NSMSG_HANDLEINFO_COOKIE " Cookie: There is currently %s %s cookie issued for this account" #define NSMSG_HANDLEINFO_INFOLINE " Infoline: %s" #define NSMSG_HANDLEINFO_FLAGS " Flags: %s" *************** *** 1189,1192 **** --- 1190,1205 ---- if (nickserv_conf.email_enabled) { nickserv_notice(user, NSMSG_HANDLEINFO_EMAIL_ADDR, visible_email_addr(user, hi)); + } + + if (hi->cookie) { + char *type; + switch (hi->cookie->type) { + case ACTIVATION: type = KEY_ACTIVATION; break; + case PASSWORD_CHANGE: type = KEY_PASSWORD_CHANGE; break; + case EMAIL_CHANGE: type = KEY_EMAIL_CHANGE; break; + case ALLOWAUTH: type = KEY_ALLOWAUTH; break; + default: type = "unknown"; break; + } + nickserv_notice(user, NSMSG_NICKSERV_COOKIE, preposition(type), type); } |
From: Adrian D. <sai...@us...> - 2003-08-03 03:46:21
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv3612/src Modified Files: helpserv.c nickserv.c nickserv.h Log Message: Part 1 of RFE#711067 Notify helpers if a user they are helping attempts to authenticate with a bad password Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -r1.75 -r1.76 *** helpserv.c 3 Aug 2003 00:49:08 -0000 1.75 --- helpserv.c 3 Aug 2003 03:46:18 -0000 1.76 *************** *** 219,222 **** --- 219,223 ---- #define HSMSG_NOTIFY_ALLOWAUTH "The user for request ID#%lu, $b%s$b, has been permitted by %s to authenticate to account $b%s$b without hostmask checking." #define HSMSG_NOTIFY_UNALLOWAUTH "The user for request ID#%lu, $b%s$b, has had their ability to authenticate without hostmask checking revoked by %s." + #define HSMSG_NOTIFY_FAILPW "The user for request ID#%lu, $b%s$b, has attempted to authenticate to account $b%s$b, but used an incorrect password." #define HSMSG_NOTIFY_REQ_DROP "Request ID#%lu (%s%s) has been $bdropped$b because %s." *************** *** 4017,4020 **** --- 4018,4036 ---- } + static void handle_nickserv_failpw(struct userNode *user, struct handle_info *handle) { + struct helpserv_reqlist *reqlist; + unsigned int i; + + if ((reqlist = dict_find(helpserv_reqs_bynick_dict, user->nick, NULL))) { + for (i=0; i < reqlist->used; i++) { + struct helpserv_request *req=reqlist->list[i]; + + if (req->helper && (req->hs->notify >= NOTIFY_HANDLE)) { + helpserv_notify(req->helper, HSMSG_NOTIFY_FAILPW, req->id, user->nick, handle->handle); + } + } + } + } + static time_t helpserv_next_stats(time_t after_when) { struct tm *timeinfo=localtime(&after_when); *************** *** 4193,4196 **** --- 4209,4213 ---- reg_unreg_func(handle_nickserv_unreg); reg_allowauth_func(handle_nickserv_allowauth); + reg_failpw_func(handle_nickserv_failpw); reg_handle_merge_func(handle_nickserv_merge); Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -r1.247 -r1.248 *** nickserv.c 2 Aug 2003 23:13:22 -0000 1.247 --- nickserv.c 3 Aug 2003 03:46:18 -0000 1.248 *************** *** 1370,1373 **** --- 1370,1391 ---- } + static failpw_func_t *failpw_func_list; + static unsigned int failpw_func_size = 0, failpw_func_used = 0; + + void + reg_failpw_func(failpw_func_t func) + { + if (failpw_func_used == failpw_func_size) { + if (failpw_func_size) { + failpw_func_size <<= 1; + failpw_func_list = realloc(failpw_func_list, failpw_func_size*sizeof(failpw_func_t)); + } else { + failpw_func_size = 8; + failpw_func_list = malloc(failpw_func_size*sizeof(failpw_func_t)); + } + } + failpw_func_list[failpw_func_used++] = func; + } + static NICKSERV_FUNC(cmd_auth) { *************** *** 1388,1392 **** } if (argc == 3) { ! hi = dict_find(nickserv_handle_dict, argv[1], NULL); pw_arg = 2; } else if (argc == 2) { --- 1406,1410 ---- } if (argc == 3) { ! hi = dict_find(nickserv_handle_dict, argv[1], NULL); pw_arg = 2; } else if (argc == 2) { *************** *** 1408,1418 **** pw_arg = 1; } else { ! nickserv_notice(user, MSG_MISSING_PARAMS, argv[0]); ! NICKSERV_SYNTAX(); ! return 0; } if (!hi) { ! nickserv_notice(user, NSMSG_HANDLE_NOT_FOUND); ! return 0; } passwd = argv[pw_arg]; --- 1426,1436 ---- pw_arg = 1; } else { ! nickserv_notice(user, MSG_MISSING_PARAMS, argv[0]); ! NICKSERV_SYNTAX(); ! return 0; } if (!hi) { ! nickserv_notice(user, NSMSG_HANDLE_NOT_FOUND); ! return 0; } passwd = argv[pw_arg]; *************** *** 1425,1433 **** } argv[pw_arg] = "BADMASK"; ! return 1; } if (!checkpass(passwd, hi->passwd)) { ! nickserv_notice(user, NSMSG_PASSWORD_INVALID); argv[pw_arg] = "BADPASS"; if (nickserv_conf.autogag_enabled) { if (!user->auth_policer) { --- 1443,1453 ---- } argv[pw_arg] = "BADMASK"; ! return 1; } if (!checkpass(passwd, hi->passwd)) { ! unsigned int n; ! nickserv_notice(user, NSMSG_PASSWORD_INVALID); argv[pw_arg] = "BADPASS"; + for (n=0; n<failpw_func_used; n++) failpw_func_list[n](user, hi); if (nickserv_conf.autogag_enabled) { if (!user->auth_policer) { *************** *** 1443,1452 **** argv[pw_arg] = "GAGGED"; } ! return 1; } if (HANDLE_FLAGGED(hi, SUSPENDED)) { ! nickserv_notice(user, NSMSG_HANDLE_SUSPENDED); argv[pw_arg] = "SUSPENDED"; ! return 1; } --- 1463,1472 ---- argv[pw_arg] = "GAGGED"; } ! return 1; } if (HANDLE_FLAGGED(hi, SUSPENDED)) { ! nickserv_notice(user, NSMSG_HANDLE_SUSPENDED); argv[pw_arg] = "SUSPENDED"; ! return 1; } Index: nickserv.h =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** nickserv.h 8 Jul 2003 02:44:07 -0000 1.43 --- nickserv.h 3 Aug 2003 03:46:18 -0000 1.44 *************** *** 144,146 **** --- 144,150 ---- void reg_allowauth_func(allowauth_func_t func); + /* Called when an auth attempt fails because of a bad password */ + typedef void (*failpw_func_t)(struct userNode *user, struct handle_info *handle); + void reg_failpw_func(failpw_func_t func); + #endif |
From: Adrian D. <sai...@us...> - 2003-08-03 03:01:28
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv31024/src Modified Files: common.h opserv.c opserv.help Log Message: RFE#694678 Add and document new trace criteria authed and account Index: common.h =================================================================== RCS file: /cvsroot/srvx/services/src/common.h,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** common.h 2 Aug 2003 23:13:22 -0000 1.89 --- common.h 3 Aug 2003 03:01:23 -0000 1.90 *************** *** 189,194 **** void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl); ! #define enabled_string(string) (!irccasecmp((string), "on") || !strcmp((string), "1") || !irccasecmp((string), "enabled")) ! #define disabled_string(string) (!irccasecmp((string), "off") || !strcmp((string), "0") || !irccasecmp((string), "disabled")) #endif /* ifdef COMMON_H */ --- 189,196 ---- void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl); ! #define enabled_string(string) (!irccasecmp((string), "on") || !strcmp((string), "1") || !irccasecmp((string), "enabled")) ! #define disabled_string(string) (!irccasecmp((string), "off") || !strcmp((string), "0") || !irccasecmp((string), "disabled")) ! #define true_string(string) (!irccasecmp((string), "true") || !strcmp((string), "1") || !irccasecmp((string), "yes")) ! #define false_string(string) (!irccasecmp((string), "false") || !strcmp((string), "0") || !irccasecmp((string), "no")) #endif /* ifdef COMMON_H */ Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.332 retrieving revision 1.333 diff -C2 -r1.332 -r1.333 *** opserv.c 2 Aug 2003 23:13:22 -0000 1.332 --- opserv.c 3 Aug 2003 03:01:23 -0000 1.333 *************** *** 246,249 **** --- 246,250 ---- #define OSMSG_UPLINK_ADDRESS "Address: %s:%d" #define OSMSG_STUPID_GLINE "Gline %s? Now $bthat$b would be smooth." + #define OSMSG_ACCOUNTMASK_AUTHED "Invalid criteria: it is impossible to match an account mask but not be authed" #define MAX_CHANNELS_WHOIS 50 *************** *** 320,324 **** typedef struct opservDiscrim { struct chanNode *channel; ! char *mask_nick, *mask_ident, *mask_host, *mask_info, *server, *ip_mask_str, *reason; unsigned long limit, ip_mask; struct in_addr ip_addr; --- 321,325 ---- typedef struct opservDiscrim { struct chanNode *channel; ! char *mask_nick, *mask_ident, *mask_host, *mask_info, *server, *ip_mask_str, *reason, *accountmask; unsigned long limit, ip_mask; struct in_addr ip_addr; *************** *** 326,329 **** --- 327,331 ---- unsigned int match_opers : 1, option_log : 1; unsigned int chan_req_modes : 2, chan_no_modes : 2; + int authed : 2; time_t min_ts, max_ts; } *discrim_t; *************** *** 2784,2787 **** --- 2786,2790 ---- discrim->domain_depth = 2; discrim->max_channels = INT_MAX; + discrim->authed = -1; for (i=0; i<argc; i++) { *************** *** 2820,2825 **** j = parse_ipmask(argv[++i], &discrim->ip_addr, &discrim->ip_mask); if (!j) discrim->ip_mask_str = argv[i]; ! } else if (irccasecmp(argv[i], "duration") == 0) { ! discrim->duration = ParseInterval(argv[++i]); } else if (irccasecmp(argv[i], "channel") == 0) { for (j=0, i++; ; j++) { --- 2823,2849 ---- j = parse_ipmask(argv[++i], &discrim->ip_addr, &discrim->ip_mask); if (!j) discrim->ip_mask_str = argv[i]; ! } else if (irccasecmp(argv[i], "account") == 0) { ! if (discrim->authed == 0) { ! opserv_notice(user, OSMSG_ACCOUNTMASK_AUTHED); ! goto fail; ! } ! discrim->accountmask = argv[++i]; ! discrim->authed = 1; ! } else if (irccasecmp(argv[i], "authed") == 0) { ! i++; /* true_string and false_string are macros! */ ! if (true_string(argv[i])) { ! discrim->authed = 1; ! } else if (false_string(argv[i])) { ! if (discrim->accountmask) { ! opserv_notice(user, OSMSG_ACCOUNTMASK_AUTHED); ! goto fail; ! } ! discrim->authed = 0; ! } else { ! opserv_notice(user, MSG_INVALID_BINARY, argv[i]); ! goto fail; ! } ! } else if (irccasecmp(argv[i], "duration") == 0) { ! discrim->duration = ParseInterval(argv[++i]); } else if (irccasecmp(argv[i], "channel") == 0) { for (j=0, i++; ; j++) { *************** *** 2941,2944 **** --- 2965,2970 ---- || (user->channels.used < discrim->min_channels) || (user->channels.used > discrim->max_channels) + || (discrim->authed == 0 && user->handle_info) + || (discrim->authed == 1 && !user->handle_info) || (discrim->mask_nick && !match_ircglob(user->nick, discrim->mask_nick)) || (discrim->mask_ident && !match_ircglob(user->ident, discrim->mask_ident)) *************** *** 2946,2949 **** --- 2972,2976 ---- || (discrim->mask_info && !match_ircglob(user->info, discrim->mask_info)) || (discrim->server && !match_ircglob(user->uplink->name, discrim->server)) + || (discrim->accountmask && (!user->handle_info || !match_ircglob(user->handle_info->handle, discrim->accountmask))) || (discrim->ip_mask && !MATCH_IPMASK(user->ip, discrim->ip_addr, discrim->ip_mask))) { return 0; Index: opserv.help =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.help,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -r1.64 -r1.65 *** opserv.help 23 Jul 2003 00:01:31 -0000 1.64 --- opserv.help 3 Aug 2003 03:01:24 -0000 1.65 *************** *** 61,65 **** "$bGAG$b: Gag all matching users (by default, does not expire).", "$bDOMAINS$b: Display counts of users in each domain (length specified by DEPTH criteria.", ! "Note: By default, IRC operators are not affected by the KILL, GLINE or GAG actions. You can override this by specifying the $bABUSE OPERS$b criteria for a trace. Even if you do specify $bABUSE OPERS$b, it will not affect opers at your access level or above."); "TRACE CRITERIA" ("$bTRACE CRITERIA$b", "Criteria and values for $btrace$b (a search with $btrace$b must match all specified items):", --- 61,65 ---- "$bGAG$b: Gag all matching users (by default, does not expire).", "$bDOMAINS$b: Display counts of users in each domain (length specified by DEPTH criteria.", ! "Note: By default, IRC operators are not affected by the KILL, GLINE or GAG actions. You can override this by specifying the $bABUSE OPERS$b criteria for a trace. Even if you do specify $bABUSE OPERS$b, it will not affect opers at your access level or above."); "TRACE CRITERIA" ("$bTRACE CRITERIA$b", "Criteria and values for $btrace$b (a search with $btrace$b must match all specified items):", *************** *** 69,74 **** "$bHOST$b host Specifies a hostname to search for.", "$bINFO$b infoline Specifies a user's info to search for.", ! "$bSERVER$b server Specifies a server to search for.", "$bIP$b 127.0.0.1 Specifies an IP to search for (independent of hostname).", "$bCHANNEL$b #target Specifies a channel the client must be in.", "$bNUMCHANNELS$b 5 Specifies a number of channels the client must be in.", --- 69,76 ---- "$bHOST$b host Specifies a hostname to search for.", "$bINFO$b infoline Specifies a user's info to search for.", ! "$bSERVER$b server Specifies a server to search for.", "$bIP$b 127.0.0.1 Specifies an IP to search for (independent of hostname).", + "$bACCOUNT$b account Specifies an account to search for.", + "$bAUTHED$b yes/no Specifies if matching users must be authenticated with $N or not", "$bCHANNEL$b #target Specifies a channel the client must be in.", "$bNUMCHANNELS$b 5 Specifies a number of channels the client must be in.", *************** *** 77,85 **** "$bLINKED$b cmp Connected time constraint (<Nu, <=Nu, =Nu, >=Nu or >Nu)", "$bACCESS$b cmp Access constraints (<nnn, <=nnn, =nnn, >=nnn or >nnn)", ! "$bREASON$b reason Reason for kill or gline (must be listed last).", "$bDEPTH$b depth How many domain-name parts to use for $bDOMAINS$b action.", "$bDURATION$b duration How long to apply a G-line or gag.", "$bCLONES$b min Ignore clients from hosts with fewer than this many connections.", ! "$bABUSE OPERS$b Force adverse actions to affect opers as well.", "$bLOG$b Record matching users in $O's log file (in addition to acting).", "Additionally, the $bCHANNEL$b target may be prefixed with @ to select channel operators, + to select voiced users (will not select chanops unless @ is also used), or - to select non-voiced non-chanop users. For example, CHANNEL #foo will select all users in #foo; CHANNEL +#foo will select only users voiced in #foo; CHANNEL @+#foo will select ops and voiced users in #foo; etc."); --- 79,87 ---- "$bLINKED$b cmp Connected time constraint (<Nu, <=Nu, =Nu, >=Nu or >Nu)", "$bACCESS$b cmp Access constraints (<nnn, <=nnn, =nnn, >=nnn or >nnn)", ! "$bREASON$b reason Reason for kill or gline (must be listed last).", "$bDEPTH$b depth How many domain-name parts to use for $bDOMAINS$b action.", "$bDURATION$b duration How long to apply a G-line or gag.", "$bCLONES$b min Ignore clients from hosts with fewer than this many connections.", ! "$bABUSE OPERS$b Force adverse actions to affect opers as well.", "$bLOG$b Record matching users in $O's log file (in addition to acting).", "Additionally, the $bCHANNEL$b target may be prefixed with @ to select channel operators, + to select voiced users (will not select chanops unless @ is also used), or - to select non-voiced non-chanop users. For example, CHANNEL #foo will select all users in #foo; CHANNEL +#foo will select only users voiced in #foo; CHANNEL @+#foo will select ops and voiced users in #foo; etc."); |
From: Adrian D. <sai...@us...> - 2003-08-03 00:49:12
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv15058/src Modified Files: helpserv.c Log Message: RFE#693576 - Empty alert now replaces whine message if empty alert is enabled - Now contains number of unhandled requests - If reqonjoin is enabled, emptyalert only activates if there are requests Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** helpserv.c 31 Jul 2003 02:08:40 -0000 1.74 --- helpserv.c 3 Aug 2003 00:49:08 -0000 1.75 *************** *** 200,207 **** #define HSMSG_PAGE_WHINE_HEADER "$b%u unhandled request%s$b waiting at least $b%s$b (%u total)" #define HSMSG_PAGE_IDLE_HEADER "$b%u users$b in %s $bidle at least %s$b:" ! #define HSMSG_PAGE_EMPTYALERT "$b%s has no helpers present$b" ! #define HSMSG_PAGE_ONLYTRIALALERT "$b%s has no full helpers present (%d trial%s present)$b" ! #define HSMSG_PAGE_FIRSTEMPTYALERT "$b%s has no helpers present because %s has left$b" ! #define HSMSG_PAGE_FIRSTONLYTRIALALERT "$b%s has no full helpers present because %s has left (%d trial%s present)$b" #define HSMSG_PAGE_EMPTYNOMORE "%s has joined %s; cancelling the \"no helpers present\" alert" --- 200,207 ---- #define HSMSG_PAGE_WHINE_HEADER "$b%u unhandled request%s$b waiting at least $b%s$b (%u total)" #define HSMSG_PAGE_IDLE_HEADER "$b%u users$b in %s $bidle at least %s$b:" ! #define HSMSG_PAGE_EMPTYALERT "$b%s has no helpers present (%u unhandled request%s)$b" ! #define HSMSG_PAGE_ONLYTRIALALERT "$b%s has no full helpers present (%d trial%s present; %u unhandled request%s)$b" ! #define HSMSG_PAGE_FIRSTEMPTYALERT "$b%s has no helpers present because %s has left (%u unhandled request%s)$b" ! #define HSMSG_PAGE_FIRSTONLYTRIALALERT "$b%s has no full helpers present because %s has left (%d trial%s present; %u unhandled request%s)$b" #define HSMSG_PAGE_EMPTYNOMORE "%s has joined %s; cancelling the \"no helpers present\" alert" *************** *** 557,560 **** --- 557,562 ---- }; + static void run_empty_interval(void *data); + static void helpserv_interval(char *output, time_t interval) { int num_hours = interval / 3600; *************** *** 825,828 **** --- 827,835 ---- helpserv_msguser(user, "%s %s %s", lbuf[0], lbuf[1], lbuf[2]); + if (hs->req_on_join && req == hs->unhandled && hs->helpchan_empty) { + timeq_del(0, run_empty_interval, hs, TIMEQ_IGNORE_WHEN); + run_empty_interval(hs); + } + return req; } *************** *** 2164,2168 **** if (hs->intervals[INTERVAL_WHINE_DELAY] && (hs->page_types[PGSRC_ALERT] != PAGE_NONE) ! && (hs->page_targets[PGSRC_ALERT] != NULL)) { struct helpserv_request *unh; struct helpserv_reqlist reqlist; --- 2171,2176 ---- if (hs->intervals[INTERVAL_WHINE_DELAY] && (hs->page_types[PGSRC_ALERT] != PAGE_NONE) ! && (hs->page_targets[PGSRC_ALERT] != NULL) ! && (!hs->intervals[INTERVAL_EMPTY_INTERVAL] || !hs->helpchan_empty)) { struct helpserv_request *unh; struct helpserv_reqlist reqlist; *************** *** 2329,2339 **** struct helpserv_bot *hs=data; int num_trials=find_helpchan_helpers(hs); if (num_trials == -1) return; if (num_trials) { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_ONLYTRIALALERT, hs->helpchan->name, num_trials, (num_trials == 1 ? "" : "s")); } else { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_EMPTYALERT, hs->helpchan->name); } --- 2337,2352 ---- struct helpserv_bot *hs=data; int num_trials=find_helpchan_helpers(hs); + unsigned int num_unh; + struct helpserv_request *unh; if (num_trials == -1) return; + if (hs->req_on_join && !hs->unhandled) return; + + for (num_unh=0, unh=hs->unhandled; unh; num_unh++) unh = unh->next_unhandled; if (num_trials) { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_ONLYTRIALALERT, hs->helpchan->name, num_trials, (num_trials == 1 ? "" : "s"), num_unh, (num_unh == 1 ? "" : "s")); } else { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_EMPTYALERT, hs->helpchan->name, num_unh, (num_unh == 1 ? "" : "s")); } *************** *** 3385,3396 **** if (hs->intervals[INTERVAL_EMPTY_INTERVAL] && hs_user->level >= HlHelper) { int num_trials; if ((num_trials = find_helpchan_helpers(hs)) >= 0) { if (num_trials) { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_FIRSTONLYTRIALALERT, hs->helpchan->name, user->nick, num_trials, (num_trials == 1 ? "" : "s")); } else { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_FIRSTEMPTYALERT, hs->helpchan->name, user->nick); } - timeq_del(0, run_empty_interval, hs, TIMEQ_IGNORE_WHEN); - timeq_add(now + hs->intervals[INTERVAL_EMPTY_INTERVAL], run_empty_interval, hs); } } --- 3398,3417 ---- if (hs->intervals[INTERVAL_EMPTY_INTERVAL] && hs_user->level >= HlHelper) { int num_trials; + if ((num_trials = find_helpchan_helpers(hs)) >= 0) { + unsigned int num_unh; + struct helpserv_request *unh; + + for (num_unh=0, unh=hs->unhandled; unh; num_unh++) unh = unh->next_unhandled; + if (num_trials) { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_FIRSTONLYTRIALALERT, hs->helpchan->name, user->nick, num_trials, (num_trials == 1 ? "" : "s"), num_unh, (num_unh == 1 ? "" : "s")); } else { ! helpserv_page(PGSRC_ALERT, HSMSG_PAGE_FIRSTEMPTYALERT, hs->helpchan->name, user->nick, num_unh, (num_unh == 1 ? "" : "s")); ! } ! if (num_unh || !hs->req_on_join) { ! timeq_del(0, run_empty_interval, hs, TIMEQ_IGNORE_WHEN); ! timeq_add(now + hs->intervals[INTERVAL_EMPTY_INTERVAL], run_empty_interval, hs); } } } |
From: Adrian D. <sai...@us...> - 2003-08-02 23:42:17
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv6698/src Modified Files: chanserv.c Log Message: Send globals for channel merges and giveownership (RFE#678930) Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.371 retrieving revision 1.372 diff -C2 -r1.371 -r1.372 *** chanserv.c 31 Jul 2003 02:08:40 -0000 1.371 --- chanserv.c 2 Aug 2003 23:42:14 -0000 1.372 *************** *** 2377,2381 **** struct userData *target_user; struct chanNode *target; ! char reason[MAXLEN]; REQUIRE_PARAMS(2); --- 2377,2381 ---- struct userData *target_user; struct chanNode *target; ! char reason[MAXLEN], *oldname; REQUIRE_PARAMS(2); *************** *** 2385,2408 **** if(!(target = GetChannel(argv[1]))) { ! chanserv_notice(user, MSG_INVALID_CHANNEL); ! return 0; } if(!target->channel_info) { ! chanserv_notice(user, CSMSG_NOT_REGISTERED, target->name); ! return 0; } if(IsSuspended(target->channel_info)) { ! chanserv_notice(user, CSMSG_MERGE_SUSPENDED); ! return 0; } if(channel == target) { ! chanserv_notice(user, CSMSG_MERGE_SELF); ! return 0; } --- 2385,2408 ---- if(!(target = GetChannel(argv[1]))) { ! chanserv_notice(user, MSG_INVALID_CHANNEL); ! return 0; } if(!target->channel_info) { ! chanserv_notice(user, CSMSG_NOT_REGISTERED, target->name); ! return 0; } if(IsSuspended(target->channel_info)) { ! chanserv_notice(user, CSMSG_MERGE_SUSPENDED); ! return 0; } if(channel == target) { ! chanserv_notice(user, CSMSG_MERGE_SELF); ! return 0; } *************** *** 2417,2423 **** --- 2417,2429 ---- merge_channel(channel->channel_info, target->channel_info); sprintf(reason, "Channel merged into %s by %s.", target->name, user->handle_info->handle); + oldname = strdup(channel->name); unregister_channel(channel->channel_info); DelChannelUser(chanserv, channel, reason, 0); chanserv_notice(user, CSMSG_MERGE_SUCCESS, target->name); + + sprintf(reason, "%s merged into %s by %s.", oldname, target->name, user->handle_info->handle); + global_message(MESSAGE_RECIPIENT_OPERS | MESSAGE_RECIPIENT_HELPERS, reason); + free(oldname); + return 1; } *************** *** 5747,5750 **** --- 5753,5757 ---- unsigned int force; struct do_not_register *dnr; + char reason[MAXLEN]; REQUIRE_PARAMS(2); *************** *** 5809,5812 **** --- 5816,5823 ---- } chanserv_notice(user, CSMSG_OWNERSHIP_GIVEN, channel->name, new_owner_hi->handle); + + sprintf(reason, "%s ownership transferred to %s by %s", channel->name, new_owner_hi->handle, user->handle_info->handle); + global_message(MESSAGE_RECIPIENT_OPERS | MESSAGE_RECIPIENT_HELPERS, reason); + return 1; } |
From: Adrian D. <sai...@us...> - 2003-08-02 23:13:26
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv2369/src Modified Files: common.h hash.h messages.h mod-snoop.c nickserv.c opserv.c proto-bahamut.c proto-common.c proto-p10.c sockcheck.c tools.c Log Message: Make struct userNode -> ip into a struct in_addr instead of unsigned long This means that it is stored in network byte order instead of host byte order. - Use inet_ntoa for all ip -> string operations OpServ: Trusts now work based on ip, not hostname Index: common.h =================================================================== RCS file: /cvsroot/srvx/services/src/common.h,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -r1.88 -r1.89 *** common.h 22 Jul 2003 16:32:07 -0000 1.88 --- common.h 2 Aug 2003 23:13:22 -0000 1.89 *************** *** 43,46 **** --- 43,49 ---- #define INADDR_NONE 0xffffffffL #endif + #ifndef INADDR_LOOPBACK + #define INADDR_LOOPBACK 0x7f000001L + #endif #define ArrayLength(x) (sizeof(x)/sizeof(x[0])) *************** *** 112,117 **** unsigned long ParseInterval(const unsigned char *interval); unsigned long ParseVolume(const unsigned char *volume); ! int parse_ipmask(const unsigned char *str, unsigned long *addr, unsigned long *mask); ! #define MATCH_IPMASK(test, addr, mask) (((test & mask) ^ (addr & mask)) == 0) #define MD5_CRYPT_LENGTH 42 --- 115,120 ---- unsigned long ParseInterval(const unsigned char *interval); unsigned long ParseVolume(const unsigned char *volume); ! int parse_ipmask(const unsigned char *str, struct in_addr *addr, unsigned long *mask); ! #define MATCH_IPMASK(test, addr, mask) (((ntohl(test.s_addr) & mask) ^ (ntohl(addr.s_addr) & mask)) == 0) #define MD5_CRYPT_LENGTH 42 Index: hash.h =================================================================== RCS file: /cvsroot/srvx/services/src/hash.h,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -r1.105 -r1.106 *** hash.h 2 Aug 2003 22:03:19 -0000 1.105 --- hash.h 2 Aug 2003 23:13:22 -0000 1.106 *************** *** 103,107 **** #endif unsigned int dead : 1; ! unsigned long ip; long modes; /* user flags +isw etc... */ --- 103,107 ---- #endif unsigned int dead : 1; ! struct in_addr ip; long modes; /* user flags +isw etc... */ Index: messages.h =================================================================== RCS file: /cvsroot/srvx/services/src/messages.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** messages.h 7 Jul 2003 16:29:33 -0000 1.36 --- messages.h 2 Aug 2003 23:13:22 -0000 1.37 *************** *** 82,87 **** #define MSG_INVALID_BINARY "$b%s$b is an invalid binary value." ! #define IDENT_FORMAT "%s [%s@%s/%ld.%ld.%ld.%ld]" ! #define IDENT_DATA(user) user->nick, user->ident, user->hostname, (user->ip >> 24) & 255, (user->ip >> 16) & 255, (user->ip >> 8) & 255, user->ip & 255 #endif /* ifdef _MESSAGES_H_ */ --- 82,87 ---- #define MSG_INVALID_BINARY "$b%s$b is an invalid binary value." ! #define IDENT_FORMAT "%s [%s@%s/%s]" ! #define IDENT_DATA(user) user->nick, user->ident, user->hostname, inet_ntoa(user->ip) #endif /* ifdef _MESSAGES_H_ */ Index: mod-snoop.c =================================================================== RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** mod-snoop.c 29 Jul 2003 01:51:24 -0000 1.14 --- mod-snoop.c 2 Aug 2003 23:13:22 -0000 1.15 *************** *** 91,97 **** if (user->uplink->burst && !snoop_cfg.show_bursts) return 0; UPDATE_TIMESTAMP(); ! SNOOP("$bNICK$b %s %s@%s [%ld.%ld.%ld.%ld] on %s", user->nick, user->ident, user->hostname, ! (user->ip >> 24) & 255, (user->ip >> 16) & 255, (user->ip >> 8) & 255, user->ip & 255, ! user->uplink->name); return 0; } --- 91,95 ---- if (user->uplink->burst && !snoop_cfg.show_bursts) return 0; UPDATE_TIMESTAMP(); ! SNOOP("$bNICK$b %s %s@%s [%s] on %s", user->nick, user->ident, user->hostname, inet_ntoa(user->ip), user->uplink->name); return 0; } Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.246 retrieving revision 1.247 diff -C2 -r1.246 -r1.247 *** nickserv.c 31 Jul 2003 02:08:40 -0000 1.246 --- nickserv.c 2 Aug 2003 23:13:22 -0000 1.247 *************** *** 1086,1090 **** } else { string_list_append(hi->masks, generate_hostmask(user, GENMASK_OMITNICK|GENMASK_NO_HIDING|GENMASK_ANY_IDENT)); ! if (user->ip != 0) { string_list_append(hi->masks, generate_hostmask(user, GENMASK_OMITNICK|GENMASK_BYIP|GENMASK_NO_HIDING|GENMASK_ANY_IDENT)); } --- 1086,1090 ---- } else { string_list_append(hi->masks, generate_hostmask(user, GENMASK_OMITNICK|GENMASK_NO_HIDING|GENMASK_ANY_IDENT)); ! if (user->ip.s_addr) { string_list_append(hi->masks, generate_hostmask(user, GENMASK_OMITNICK|GENMASK_BYIP|GENMASK_NO_HIDING|GENMASK_ANY_IDENT)); } Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.331 retrieving revision 1.332 diff -C2 -r1.331 -r1.332 *** opserv.c 2 Aug 2003 22:03:18 -0000 1.331 --- opserv.c 2 Aug 2003 23:13:22 -0000 1.332 *************** *** 32,35 **** --- 32,41 ---- #include <sys/times.h> #endif + #ifdef HAVE_NETINET_IN_H + #include <netinet/in.h> + #endif + #ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> + #endif #define OPSERV_CONF_NAME "services/opserv" *************** *** 113,117 **** #define OSMSG_WHOIS_NICK "Nick : %s" #define OSMSG_WHOIS_HOST "Host : %s@%s" ! #define OSMSG_WHOIS_IP "Real IP : %ld.%ld.%ld.%ld" #define OSMSG_WHOIS_INFO "Info : %s" #define OSMSG_WHOIS_NUMERIC "Numeric : %s" --- 119,123 ---- #define OSMSG_WHOIS_NICK "Nick : %s" #define OSMSG_WHOIS_HOST "Host : %s@%s" ! #define OSMSG_WHOIS_IP "Real IP : %s" #define OSMSG_WHOIS_INFO "Info : %s" #define OSMSG_WHOIS_NUMERIC "Numeric : %s" *************** *** 281,285 **** struct trusted_host { ! char *hostname; char *issuer; char *reason; --- 287,291 ---- struct trusted_host { ! char *ipaddr; char *issuer; char *reason; *************** *** 315,319 **** struct chanNode *channel; char *mask_nick, *mask_ident, *mask_host, *mask_info, *server, *ip_mask_str, *reason; ! unsigned long limit, ip_addr, ip_mask; unsigned int min_level, max_level, domain_depth, duration, min_clones, min_channels, max_channels; unsigned int match_opers : 1, option_log : 1; --- 321,326 ---- struct chanNode *channel; char *mask_nick, *mask_ident, *mask_host, *mask_info, *server, *ip_mask_str, *reason; ! unsigned long limit, ip_mask; ! struct in_addr ip_addr; unsigned int min_level, max_level, domain_depth, duration, min_clones, min_channels, max_channels; unsigned int match_opers : 1, option_log : 1; *************** *** 1159,1163 **** { struct userNode *target; - unsigned long ip; char buffer[128], buffer2[INTERVALLEN]; int bpos, herelen; --- 1166,1169 ---- *************** *** 1173,1183 **** #endif if (!target) { ! opserv_notice(user, MSG_NICK_UNKNOWN, argv[1]); ! return 0; } - ip = target->ip; opserv_notice(user, OSMSG_WHOIS_NICK, target->nick); opserv_notice(user, OSMSG_WHOIS_HOST, target->ident, target->hostname); ! opserv_notice(user, OSMSG_WHOIS_IP, (ip >> 24) & 255, (ip >> 16) & 255, (ip >> 8) & 255, ip & 255); if (target->modes) { bpos = 0; --- 1179,1188 ---- #endif if (!target) { ! opserv_notice(user, MSG_NICK_UNKNOWN, argv[1]); ! return 0; } opserv_notice(user, OSMSG_WHOIS_NICK, target->nick); opserv_notice(user, OSMSG_WHOIS_HOST, target->ident, target->hostname); ! opserv_notice(user, OSMSG_WHOIS_IP, inet_ntoa(target->ip)); if (target->modes) { bpos = 0; *************** *** 1687,1700 **** /* Gag them if appropriate. */ for (gag = gagList; gag; gag = gag->next) { ! if (user_matches_glob(user, gag->mask, 1)) { ! gag_helper_func(user, NULL); ! break; ! } } /* Add to host info struct */ ! if (!(ohi = dict_find(opserv_hostinfo_dict, user->hostname, NULL))) { ! ohi = calloc(1, sizeof(*ohi)); ! dict_insert(opserv_hostinfo_dict, strdup(user->hostname), ohi); userList_init(&ohi->clients); } --- 1692,1705 ---- /* Gag them if appropriate. */ for (gag = gagList; gag; gag = gag->next) { ! if (user_matches_glob(user, gag->mask, 1)) { ! gag_helper_func(user, NULL); ! break; ! } } /* Add to host info struct */ ! if (!(ohi = dict_find(opserv_hostinfo_dict, inet_ntoa(user->ip), NULL))) { ! ohi = calloc(1, sizeof(*ohi)); ! dict_insert(opserv_hostinfo_dict, strdup(inet_ntoa(user->ip)), ohi); userList_init(&ohi->clients); } *************** *** 1702,1706 **** /* If they have a bum IP, don't proxy-check or G-line them. */ ! if ((user->ip == 0) || (user->ip == htonl(0x7f000001))) return 0; /* Only proxy check or warn of new user floods outside of bursts. */ --- 1707,1711 ---- /* If they have a bum IP, don't proxy-check or G-line them. */ ! if ((user->ip.s_addr == 0) || (ntohl(user->ip.s_addr) == INADDR_LOOPBACK)) return 0; /* Only proxy check or warn of new user floods outside of bursts. */ *************** *** 1718,1722 **** /* And only warn or G-line if there's an untrusted max. */ if (opserv_conf.untrusted_max) { ! struct trusted_host *th = dict_find(opserv_trusted_hosts, user->hostname, NULL); unsigned int limit = th ? th->limit : opserv_conf.untrusted_max; if (!limit) { --- 1723,1727 ---- /* And only warn or G-line if there's an untrusted max. */ if (opserv_conf.untrusted_max) { ! struct trusted_host *th = dict_find(opserv_trusted_hosts, inet_ntoa(user->ip), NULL); unsigned int limit = th ? th->limit : opserv_conf.untrusted_max; if (!limit) { *************** *** 1728,1733 **** } } else if (limit && (ohi->clients.used > limit)) { ! char *target = alloca(3+strlen(user->hostname)); ! sprintf(target, "*@%s", user->hostname); gline_add(opserv->nick, target, opserv_conf.clone_gline_duration, OSMSG_TOO_MANY_CLONES, now, 1); } --- 1733,1738 ---- } } else if (limit && (ohi->clients.used > limit)) { ! char target[18]; ! sprintf(target, "*@%s", inet_ntoa(user->ip)); gline_add(opserv->nick, target, opserv_conf.clone_gline_duration, OSMSG_TOO_MANY_CLONES, now, 1); } *************** *** 1743,1755 **** if (IsLocal(user)) { ! /* Try to remove it from the reserved nick dict without * calling free_reserve, because that would call DelUser(), * and we'd loop back to here. */ ! dict_remove(opserv_reserved_nick_dict, user->nick); ! return; } ! if ((ohi = dict_find(opserv_hostinfo_dict, user->hostname, NULL))) { userList_remove(&ohi->clients, user); ! if (ohi->clients.used == 0) dict_remove(opserv_hostinfo_dict, user->hostname); } } --- 1748,1760 ---- if (IsLocal(user)) { ! /* Try to remove it from the reserved nick dict without * calling free_reserve, because that would call DelUser(), * and we'd loop back to here. */ ! dict_remove(opserv_reserved_nick_dict, user->nick); ! return; } ! if ((ohi = dict_find(opserv_hostinfo_dict, inet_ntoa(user->ip), NULL))) { userList_remove(&ohi->clients, user); ! if (ohi->clients.used == 0) dict_remove(opserv_hostinfo_dict, inet_ntoa(user->ip)); } } *************** *** 2005,2018 **** { struct trusted_host *th = data; ! dict_remove(opserv_trusted_hosts, th->hostname); } static void ! opserv_add_trusted_host(const char *hostname, unsigned int limit, const char *issuer, time_t issued, time_t expires, const char *reason) { struct trusted_host *th; th = calloc(1, sizeof(*th)); if (!th) return; ! th->hostname = strdup(hostname); th->reason = reason ? strdup(reason) : NULL; th->issuer = issuer ? strdup(issuer) : NULL; --- 2010,2023 ---- { struct trusted_host *th = data; ! dict_remove(opserv_trusted_hosts, th->ipaddr); } static void ! opserv_add_trusted_host(const char *ipaddr, unsigned int limit, const char *issuer, time_t issued, time_t expires, const char *reason) { struct trusted_host *th; th = calloc(1, sizeof(*th)); if (!th) return; ! th->ipaddr = strdup(ipaddr); th->reason = reason ? strdup(reason) : NULL; th->issuer = issuer ? strdup(issuer) : NULL; *************** *** 2020,2024 **** th->limit = limit; th->expires = expires; ! dict_insert(opserv_trusted_hosts, th->hostname, th); if (th->expires) timeq_add(th->expires, opserv_expire_trusted_host, th); } --- 2025,2029 ---- th->limit = limit; th->expires = expires; ! dict_insert(opserv_trusted_hosts, th->ipaddr, th); if (th->expires) timeq_add(th->expires, opserv_expire_trusted_host, th); } *************** *** 2028,2032 **** { struct trusted_host *th = data; ! free(th->hostname); if (th->reason) free(th->reason); if (th->issuer) free(th->issuer); --- 2033,2037 ---- { struct trusted_host *th = data; ! free(th->ipaddr); if (th->reason) free(th->reason); if (th->issuer) free(th->issuer); *************** *** 2060,2064 **** if (!th) continue; if (th->expires) timeq_del(th->expires, opserv_expire_trusted_host, th, 0); ! dict_remove(opserv_trusted_hosts, argv[n]); } return opserv_notice(user, OSMSG_REMOVED_TRUSTED); --- 2065,2069 ---- if (!th) continue; if (th->expires) timeq_del(th->expires, opserv_expire_trusted_host, th, 0); ! dict_remove(opserv_trusted_hosts, argv[n]); } return opserv_notice(user, OSMSG_REMOVED_TRUSTED); *************** *** 2931,2935 **** { unsigned int access; - char ipbuf[16]; if ((user->timestamp < discrim->min_ts) --- 2936,2939 ---- *************** *** 2937,2947 **** || (user->channels.used < discrim->min_channels) || (user->channels.used > discrim->max_channels) ! || (discrim->mask_nick && !match_ircglob(user->nick, discrim->mask_nick)) ! || (discrim->mask_ident && !match_ircglob(user->ident, discrim->mask_ident)) ! || (discrim->mask_host && !match_ircglob(user->hostname, discrim->mask_host)) ! || (discrim->mask_info && !match_ircglob(user->info, discrim->mask_info)) ! || (discrim->server && !match_ircglob(user->uplink->name, discrim->server)) ! || (discrim->ip_mask && !MATCH_IPMASK(user->ip, discrim->ip_addr, discrim->ip_mask))) { ! return 0; } if (discrim->channel && !GetUserMode(discrim->channel, user)) return 0; --- 2941,2951 ---- || (user->channels.used < discrim->min_channels) || (user->channels.used > discrim->max_channels) ! || (discrim->mask_nick && !match_ircglob(user->nick, discrim->mask_nick)) ! || (discrim->mask_ident && !match_ircglob(user->ident, discrim->mask_ident)) ! || (discrim->mask_host && !match_ircglob(user->hostname, discrim->mask_host)) ! || (discrim->mask_info && !match_ircglob(user->info, discrim->mask_info)) ! || (discrim->server && !match_ircglob(user->uplink->name, discrim->server)) ! || (discrim->ip_mask && !MATCH_IPMASK(user->ip, discrim->ip_addr, discrim->ip_mask))) { ! return 0; } if (discrim->channel && !GetUserMode(discrim->channel, user)) return 0; *************** *** 2952,2960 **** } if (discrim->ip_mask_str) { ! snprintf(ipbuf, sizeof(ipbuf), "%lu.%lu.%lu.%lu", (user->ip>>24)&0xff, (user->ip>>16)&0xff, (user->ip>>8)&0xff, user->ip&0xff); ! if (!match_ircglob(ipbuf, discrim->ip_mask_str)) return 0; } if (discrim->min_clones > 1) { ! struct opserv_hostinfo *ohi = dict_find(opserv_hostinfo_dict, user->hostname, NULL); if (!ohi || (ohi->clients.used < discrim->min_clones)) return 0; } --- 2956,2963 ---- } if (discrim->ip_mask_str) { ! if (!match_ircglob(inet_ntoa(user->ip), discrim->ip_mask_str)) return 0; } if (discrim->min_clones > 1) { ! struct opserv_hostinfo *ohi = dict_find(opserv_hostinfo_dict, inet_ntoa(user->ip), NULL); if (!ohi || (ohi->clients.used < discrim->min_clones)) return 0; } *************** *** 2971,2989 **** /* Try most optimized search methods first */ if (discrim->channel) { ! for (nn=0; ! (nn < discrim->channel->members.used) ! && (matched.used < discrim->limit); ! nn++) { ! struct modeNode *mn = discrim->channel->members.list[nn]; if (((mn->modes & discrim->chan_req_modes) != discrim->chan_req_modes) ! || ((mn->modes & discrim->chan_no_modes) != 0)) { continue; } ! if (discrim_match(discrim, mn->user)) { userList_append(&matched, mn->user); ! } ! } ! } else if (discrim->mask_host && !discrim->mask_host[strcspn(discrim->mask_host, "?*")]) { ! struct opserv_hostinfo *ohi = dict_find(opserv_hostinfo_dict, discrim->mask_host, NULL); if (!ohi) { userList_clean(&matched); --- 2974,2992 ---- /* Try most optimized search methods first */ if (discrim->channel) { ! for (nn=0; ! (nn < discrim->channel->members.used) ! && (matched.used < discrim->limit); ! nn++) { ! struct modeNode *mn = discrim->channel->members.list[nn]; if (((mn->modes & discrim->chan_req_modes) != discrim->chan_req_modes) ! || ((mn->modes & discrim->chan_no_modes) != 0)) { continue; } ! if (discrim_match(discrim, mn->user)) { userList_append(&matched, mn->user); ! } ! } ! } else if (discrim->ip_mask_str && !discrim->ip_mask_str[strcspn(discrim->ip_mask_str, "?*")]) { ! struct opserv_hostinfo *ohi = dict_find(opserv_hostinfo_dict, discrim->ip_mask_str, NULL); if (!ohi) { userList_clean(&matched); *************** *** 3132,3145 **** if (!match->hostname[strspn(match->hostname, "0123456789.")]) { char ipmask[16]; /* raw IP address.. use up to first three octets of IP */ switch (das->discrim->domain_depth) { default: ! snprintf(ipmask, sizeof(ipmask), "%lu.%lu.%lu.*", (match->ip>>24)&255, (match->ip>>16)&255, (match->ip>>8)&255); break; case 2: ! snprintf(ipmask, sizeof(ipmask), "%lu.%lu.*", (match->ip>>24)&255, (match->ip>>16)&255); break; case 1: ! snprintf(ipmask, sizeof(ipmask), "%lu.*", (match->ip>>24)&255); break; } --- 3135,3149 ---- if (!match->hostname[strspn(match->hostname, "0123456789.")]) { char ipmask[16]; + unsigned long matchip = ntohl(match->ip.s_addr); /* raw IP address.. use up to first three octets of IP */ switch (das->discrim->domain_depth) { default: ! snprintf(ipmask, sizeof(ipmask), "%lu.%lu.%lu.*", (matchip>>24)&255, (matchip>>16)&255, (matchip>>8)&255); break; case 2: ! snprintf(ipmask, sizeof(ipmask), "%lu.%lu.*", (matchip>>24)&255, (matchip>>16)&255); break; case 1: ! snprintf(ipmask, sizeof(ipmask), "%lu.*", (matchip>>24)&255); break; } *************** *** 3588,3592 **** else return; ! if (user->ip) { send_channel_notice(opserv_conf.staff_auth_channel, opserv, IDENT_FORMAT" authed to %s account %s", IDENT_DATA(user), type, user->handle_info->handle); --- 3592,3596 ---- else return; ! if (user->ip.s_addr) { send_channel_notice(opserv_conf.staff_auth_channel, opserv, IDENT_FORMAT" authed to %s account %s", IDENT_DATA(user), type, user->handle_info->handle); Index: proto-bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** proto-bahamut.c 29 Jul 2003 02:19:41 -0000 1.42 --- proto-bahamut.c 2 Aug 2003 23:13:22 -0000 1.43 *************** *** 148,152 **** safestrncpy(uNode->info, userinfo, sizeof(uNode->info)); safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); ! uNode->ip = realip; uNode->timestamp = timestamp; modeList_init(&uNode->channels); --- 148,152 ---- safestrncpy(uNode->info, userinfo, sizeof(uNode->info)); safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); ! uNode->ip.s_addr = htonl(realip); uNode->timestamp = timestamp; modeList_init(&uNode->channels); *************** *** 178,183 **** time_t timestamp = now; struct userNode *old_user = GetUserH(nick); if (old_user) timestamp = old_user->timestamp - 1; ! return AddUser(self, nick, nick, self->name, "+oikr", desc, timestamp, (127<<24)|1, 0); } --- 178,184 ---- time_t timestamp = now; struct userNode *old_user = GetUserH(nick); + struct in_addr ipaddr = { INADDR_LOOPBACK }; if (old_user) timestamp = old_user->timestamp - 1; ! return AddUser(self, nick, nick, self->name, "+oikr", desc, timestamp, ipaddr, 0); } *************** *** 186,191 **** time_t timestamp = now; struct userNode *old_user = GetUserH(nick); if (old_user) timestamp = old_user->timestamp - 1; ! return AddUser(self, nick, ident, hostname, "+ir", desc, timestamp, (127<<24)|1, 0); } --- 187,193 ---- time_t timestamp = now; struct userNode *old_user = GetUserH(nick); + struct in_addr ipaddr = { INADDR_LOOPBACK }; if (old_user) timestamp = old_user->timestamp - 1; ! return AddUser(self, nick, ident, hostname, "+ir", desc, timestamp, ipaddr, 0); } *************** *** 251,255 **** putsock("NICK %s %d "FMT_TIME_T" +%s %s %s %s %lu %lu :%s", user->nick, user->uplink->hops+2, user->timestamp, modes, ! user->ident, user->hostname, user->uplink->name, (unsigned long)0, user->ip, user->info); } --- 253,257 ---- putsock("NICK %s %d "FMT_TIME_T" +%s %s %s %s %lu %lu :%s", user->nick, user->uplink->hops+2, user->timestamp, modes, ! user->ident, user->hostname, user->uplink->name, (unsigned long)0, ntohl(user->ip.s_addr), user->info); } Index: proto-common.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-common.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** proto-common.c 22 Jul 2003 18:32:20 -0000 1.32 --- proto-common.c 2 Aug 2003 23:13:22 -0000 1.33 *************** *** 29,32 **** --- 29,38 ---- #include <sys/socket.h> #endif + #ifdef HAVE_NETINET_IN_H + #include <netinet/in.h> + #endif + #ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> + #endif unsigned int lines_processed; *************** *** 541,546 **** } else if (options & GENMASK_STRICT_HOST) { if (options & GENMASK_BYIP) { ! hostname = alloca(32); ! sprintf(hostname, "%lu.%lu.%lu.%lu", (user->ip>>24)&0xFF, (user->ip>>16)&0xFF, (user->ip>>8)&0xFF, user->ip&0xFF); } else { /* leave hostname as is */ --- 547,551 ---- } else if (options & GENMASK_STRICT_HOST) { if (options & GENMASK_BYIP) { ! hostname = inet_ntoa(user->ip); } else { /* leave hostname as is */ *************** *** 552,556 **** masklen = 16; mask = ~0 << masklen; ! masked_ip = user->ip & mask; hostname = alloca(32); if (options & GENMASK_SRVXMASK) { --- 557,561 ---- masklen = 16; mask = ~0 << masklen; ! masked_ip = ntohl(user->ip.s_addr) & mask; hostname = alloca(32); if (options & GENMASK_SRVXMASK) { *************** *** 572,596 **** } else { int cnt; ! /* This heuristic could be made smarter. Is it worth the effort? */ ! for (ii=cnt=0; hostname[ii]; ii++) { ! if (hostname[ii] == '.') cnt++; } ! if (cnt == 1) { ! /* only a two-level domain name; leave hostname */ ! } else if (cnt == 2) { ! for (ii=0; user->hostname[ii] != '.'; ii++) ; ! /* Add 3 to account for the *. and \0. */ hostname = alloca(strlen(user->hostname+ii)+3); sprintf(hostname, "*.%s", user->hostname+ii+1); ! } else { ! for (cnt=3, ii--; cnt; ii--) { ! if (user->hostname[ii] == '.') cnt--; ! } ! /* The loop above will overshoot the dot one character; ! we skip forward two (the one character and the dot) ! when printing, so we only add one for the \0. */ ! hostname = alloca(strlen(user->hostname+ii)+1); ! sprintf(hostname, "*.%s", user->hostname+ii+2); ! } } /* Emit hostmask */ --- 577,601 ---- } else { int cnt; ! /* This heuristic could be made smarter. Is it worth the effort? */ ! for (ii=cnt=0; hostname[ii]; ii++) { ! if (hostname[ii] == '.') cnt++; } ! if (cnt == 1) { ! /* only a two-level domain name; leave hostname */ ! } else if (cnt == 2) { ! for (ii=0; user->hostname[ii] != '.'; ii++) ; ! /* Add 3 to account for the *. and \0. */ hostname = alloca(strlen(user->hostname+ii)+3); sprintf(hostname, "*.%s", user->hostname+ii+1); ! } else { ! for (cnt=3, ii--; cnt; ii--) { ! if (user->hostname[ii] == '.') cnt--; ! } ! /* The loop above will overshoot the dot one character; ! we skip forward two (the one character and the dot) ! when printing, so we only add one for the \0. */ ! hostname = alloca(strlen(user->hostname+ii)+1); ! sprintf(hostname, "*.%s", user->hostname+ii+2); ! } } /* Emit hostmask */ Index: proto-p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-p10.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** proto-p10.c 2 Aug 2003 22:03:19 -0000 1.71 --- proto-p10.c 2 Aug 2003 23:13:22 -0000 1.72 *************** *** 379,383 **** char b64ip[7]; if (!user) return; ! inttobase64(b64ip, user->ip, 6); if (user->modes) { int modelen; --- 379,383 ---- char b64ip[7]; if (!user) return; ! inttobase64(b64ip, ntohl(user->ip.s_addr), 6); if (user->modes) { int modelen; *************** *** 1798,1802 **** safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); safestrncpy(uNode->numeric, numeric, sizeof(uNode->numeric)); ! uNode->ip = base64toint(realip, 6); uNode->timestamp = timestamp; modeList_init(&uNode->channels); --- 1798,1802 ---- safestrncpy(uNode->hostname, hostname, sizeof(uNode->hostname)); safestrncpy(uNode->numeric, numeric, sizeof(uNode->numeric)); ! uNode->ip.s_addr = htonl(base64toint(realip, 6)); uNode->timestamp = timestamp; modeList_init(&uNode->channels); Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -r1.91 -r1.92 *** sockcheck.c 31 Jul 2003 02:08:40 -0000 1.91 --- sockcheck.c 2 Aug 2003 23:13:23 -0000 1.92 *************** *** 29,32 **** --- 29,38 ---- #include <sys/socket.h> #endif + #ifdef HAVE_NETINET_IN_H + #include <netinet/in.h> + #endif + #ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> + #endif /* TODO, 1.2 or later: allow rules like "27374:" "reject:Subseven detected"; *************** *** 52,57 **** time_t last_touched; const char *reason; ! unsigned long addr; ! unsigned char hostname[1]; } *sockcheck_cache_info; --- 58,63 ---- time_t last_touched; const char *reason; ! struct in_addr addr; ! unsigned char hostname[16]; } *sockcheck_cache_info; *************** *** 184,188 **** strcpy(target, "*@"); strcpy(target+2, sci->hostname); ! log_module(PC_LOG, LOG_INFO, "Issuing gline for client at IP %08lx hostname %s: %s", sci->addr, sci->hostname, sci->reason); gline_add("ProxyCheck", target, sockcheck_conf.gline_duration, sci->reason, now, 1); } --- 190,194 ---- strcpy(target, "*@"); strcpy(target+2, sci->hostname); ! log_module(PC_LOG, LOG_INFO, "Issuing gline for client at IP %s hostname %s: %s", inet_ntoa(sci->addr), sci->hostname, sci->reason); gline_add("ProxyCheck", target, sockcheck_conf.gline_duration, sci->reason, now, 1); } *************** *** 276,280 **** break; case 'i': ! exp4 = client->addr->addr; exp_length = sizeof(exp4); expansion = (unsigned char*)&exp4; --- 282,286 ---- break; case 'i': ! exp4 = client->addr->addr.s_addr; exp_length = sizeof(exp4); expansion = (unsigned char*)&exp4; *************** *** 409,413 **** /* do nothing */ if (SOCKCHECK_DEBUG) { ! log_module(PC_LOG, LOG_INFO, "Proxy check passed for client at IP %08lx hostname %s.", client->addr->addr, client->addr->hostname); } break; --- 415,419 ---- /* do nothing */ if (SOCKCHECK_DEBUG) { ! log_module(PC_LOG, LOG_INFO, "Proxy check passed for client at IP %s hostname %s.", inet_ntoa(client->addr->addr), client->addr->hostname); } break; *************** *** 417,421 **** sockcheck_issue_gline(client->addr); if (SOCKCHECK_DEBUG) { ! log_module(PC_LOG, LOG_INFO, "Proxy check rejects client at IP %08lx hostname %s (%s)", client->addr->addr, client->addr->hostname, client->addr->reason); } /* Don't compare test_index != 0 directly, because somebody --- 423,427 ---- sockcheck_issue_gline(client->addr); if (SOCKCHECK_DEBUG) { ! log_module(PC_LOG, LOG_INFO, "Proxy check rejects client at IP %s hostname %s (%s)", inet_ntoa(client->addr->addr), client->addr->hostname, client->addr->reason); } /* Don't compare test_index != 0 directly, because somebody *************** *** 670,674 **** if (!tests) return; client = client_list[idx] = sockcheck_alloc_client(sci); ! log_module(PC_LOG, LOG_INFO, "Proxy-checking client at %08lx (%s) as client %d (%p) of %d.", sci->addr, sci->hostname, idx, client, sockcheck_num_clients); client->test_rep = 0; client->client_index = idx; --- 676,680 ---- if (!tests) return; client = client_list[idx] = sockcheck_alloc_client(sci); ! log_module(PC_LOG, LOG_INFO, "Proxy-checking client at %s (%s) as client %d (%p) of %d.", inet_ntoa(sci->addr), sci->hostname, idx, client, sockcheck_num_clients); client->test_rep = 0; client->client_index = idx; *************** *** 677,689 **** void ! sockcheck_queue_address(unsigned long addr) { sockcheck_cache_info sci; ! unsigned char buff[17]; ! int namelen; if (disable_sockcheck) return; ! namelen = snprintf(buff, sizeof(buff), "%ld.%ld.%ld.%ld", (addr >> 0) & 255, (addr >> 8) & 255, (addr >> 16) & 255, (addr >> 24) & 255); ! sci = dict_find(checked_ip_dict, buff, NULL); if (sci) { switch (sci->decision) { --- 683,693 ---- void ! sockcheck_queue_address(struct in_addr addr) { sockcheck_cache_info sci; ! char *ipstr=inet_ntoa(addr); if (disable_sockcheck) return; ! sci = dict_find(checked_ip_dict, ipstr, NULL); if (sci) { switch (sci->decision) { *************** *** 703,712 **** dict_remove(checked_ip_dict, sci->hostname); } ! sci = calloc(1, sizeof(*sci) + namelen); sci->decision = CHECKING; sci->last_touched = now; sci->reason = NULL; sci->addr = addr; ! memcpy(sci->hostname, buff, namelen); dict_insert(checked_ip_dict, sci->hostname, sci); sci_list_append(&pending_sci_list, sci); --- 707,716 ---- dict_remove(checked_ip_dict, sci->hostname); } ! sci = calloc(1, sizeof(*sci)); sci->decision = CHECKING; sci->last_touched = now; sci->reason = NULL; sci->addr = addr; ! strncpy(sci->hostname, ipstr, sizeof(sci->hostname)); dict_insert(checked_ip_dict, sci->hostname, sci); sci_list_append(&pending_sci_list, sci); *************** *** 994,997 **** --- 998,1002 ---- unsigned int n; unsigned long addr; + struct in_addr ipaddr; char hnamebuf[64]; *************** *** 1000,1007 **** if (un) { ! if ((un->ip == 0) || (un->ip == 0x7f000001)) { send_message(user, cmd->parent->bot, "%s has a spoofed, hidden or localnet IP.", un->nick); } else { ! sprintf(hnamebuf, "%ld.%ld.%ld.%ld", (un->ip >> 24) & 255, (un->ip >> 16) & 255, (un->ip >> 8) & 255, un->ip & 255); sockcheck_queue_address(un->ip); send_message(user, cmd->parent->bot, "$b%s$b is now queued to be proxy-checked.", hnamebuf); --- 1005,1012 ---- if (un) { ! if ((un->ip.s_addr == 0) || (ntohl(un->ip.s_addr) == INADDR_LOOPBACK)) { send_message(user, cmd->parent->bot, "%s has a spoofed, hidden or localnet IP.", un->nick); } else { ! strcpy(hnamebuf, inet_ntoa(un->ip)); sockcheck_queue_address(un->ip); send_message(user, cmd->parent->bot, "$b%s$b is now queued to be proxy-checked.", hnamebuf); *************** *** 1010,1014 **** char *scanhost = argv[n]; if (getipbyname(scanhost, &addr)) { ! sockcheck_queue_address(addr); send_message(user, cmd->parent->bot, "$b%s$b is now queued to be proxy-checked.", scanhost); } else { --- 1015,1020 ---- char *scanhost = argv[n]; if (getipbyname(scanhost, &addr)) { ! ipaddr.s_addr = htonl(addr); ! sockcheck_queue_address(ipaddr); send_message(user, cmd->parent->bot, "$b%s$b is now queued to be proxy-checked.", scanhost); } else { *************** *** 1030,1034 **** if (un) { ! sprintf(hnamebuf, "%ld.%ld.%ld.%ld", (un->ip >> 24) & 255, (un->ip >> 16) & 255, (un->ip >> 8) & 255, un->ip & 255); scanhost = hnamebuf; } else { --- 1036,1040 ---- if (un) { ! strcpy(hnamebuf, inet_ntoa(un->ip)); scanhost = hnamebuf; } else { *************** *** 1082,1087 **** sockcheck_new_user(struct userNode *user) { /* If they have a bum IP, or are bursting in, don't proxy-check or G-line them. */ ! if ((user->ip == 0) || (user->ip == htonl(0x7f000001)) || user->uplink->burst) return 0; ! sockcheck_queue_address(htonl(user->ip)); return 0; } --- 1088,1093 ---- sockcheck_new_user(struct userNode *user) { /* If they have a bum IP, or are bursting in, don't proxy-check or G-line them. */ ! if ((user->ip.s_addr == 0) || (ntohl(user->ip.s_addr) == INADDR_LOOPBACK) || user->uplink->burst) return 0; ! sockcheck_queue_address(user->ip); return 0; } Index: tools.c =================================================================== RCS file: /cvsroot/srvx/services/src/tools.c,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -r1.124 -r1.125 *** tools.c 11 Jul 2003 03:11:52 -0000 1.124 --- tools.c 2 Aug 2003 23:13:23 -0000 1.125 *************** *** 319,325 **** if (isdigit(*glob) && !glob[strspn(glob, "0123456789./*?")]) { /* Looks like an IP-based mask */ ! unsigned char userip[20]; ! sprintf(userip, "%ld.%ld.%ld.%ld", (user->ip >> 24) & 255, (user->ip >> 16) & 255, (user->ip >> 8) & 255, user->ip & 255); ! return match_ircglob(userip, glob); } else { if (hidden_host_suffix && user->handle_info) { --- 319,323 ---- if (isdigit(*glob) && !glob[strspn(glob, "0123456789./*?")]) { /* Looks like an IP-based mask */ ! return match_ircglob(inet_ntoa(user->ip), glob); } else { if (hidden_host_suffix && user->handle_info) { *************** *** 525,529 **** int ! parse_ipmask(const unsigned char *str, unsigned long *addr, unsigned long *mask) { int accum, pos; --- 523,527 ---- int ! parse_ipmask(const unsigned char *str, struct in_addr *addr, unsigned long *mask) { int accum, pos; *************** *** 531,586 **** t_a = t_m = pos = 0; ! if (addr) *addr = t_a; if (mask) *mask = t_m; while (*str) { ! if (!isdigit(*str)) return 0; ! accum = 0; ! do { ! accum = (accum * 10) + *str++ - '0'; ! } while (isdigit(*str)); ! if (accum > 255) return 0; ! t_a = (t_a << 8) | accum; ! t_m = (t_m << 8) | 255; ! pos += 8; ! if (*str == '.') { ! str++; while (*str == '*') { str++; if (*str == '.') { ! t_a <<= 8; ! t_m <<= 8; ! pos += 8; ! str++; ! } else if (*str == 0) { ! t_a <<= 32 - pos; ! t_m <<= 32 - pos; ! pos = 32; ! goto out; ! } else { ! return 0; ! } ! } ! } else if (*str == '/') { ! int start = pos; ! accum = 0; ! do { ! accum = (accum * 10) + *str++ - '0'; ! } while (isdigit(*str)); ! while (pos < start+accum && pos < 32) { ! t_a = (t_a << 1) | 0; ! t_m = (t_m << 1) | 1; ! pos++; ! } ! if (pos != start+accum) return 0; ! } else if (*str == 0) { ! break; ! } else { ! return 0; ! } } ! out: if (pos != 32) return 0; ! *addr = t_a; ! *mask = t_m; return 1; } --- 529,584 ---- t_a = t_m = pos = 0; ! if (addr) addr->s_addr = htonl(t_a); if (mask) *mask = t_m; while (*str) { ! if (!isdigit(*str)) return 0; ! accum = 0; ! do { ! accum = (accum * 10) + *str++ - '0'; ! } while (isdigit(*str)); ! if (accum > 255) return 0; ! t_a = (t_a << 8) | accum; ! t_m = (t_m << 8) | 255; ! pos += 8; ! if (*str == '.') { ! str++; while (*str == '*') { str++; if (*str == '.') { ! t_a <<= 8; ! t_m <<= 8; ! pos += 8; ! str++; ! } else if (*str == 0) { ! t_a <<= 32 - pos; ! t_m <<= 32 - pos; ! pos = 32; ! goto out; ! } else { ! return 0; ! } ! } ! } else if (*str == '/') { ! int start = pos; ! accum = 0; ! do { ! accum = (accum * 10) + *str++ - '0'; ! } while (isdigit(*str)); ! while (pos < start+accum && pos < 32) { ! t_a = (t_a << 1) | 0; ! t_m = (t_m << 1) | 1; ! pos++; ! } ! if (pos != start+accum) return 0; ! } else if (*str == 0) { ! break; ! } else { ! return 0; ! } } ! out: if (pos != 32) return 0; ! if (addr) addr->s_addr = htonl(t_a); ! if (mask) *mask = t_m; return 1; } |
From: Zoot <zo...@us...> - 2003-08-02 22:03:21
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv26283/src Modified Files: opserv.c proto-p10.c hash.h Log Message: Make persistent users (such as reserved nicks) win in nick collisions. Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.330 retrieving revision 1.331 diff -C2 -r1.330 -r1.331 *** opserv.c 31 Jul 2003 02:08:40 -0000 1.330 --- opserv.c 2 Aug 2003 22:03:18 -0000 1.331 *************** *** 2581,2585 **** for (it = dict_first(opserv_reserved_nick_dict); it; it = iter_next(it)) { struct userNode *user = iter_data(it); ! if (!(user->modes & FLAGS_PERSISTENT)) continue; saxdb_start_record(ctx, iter_key(it), 0); saxdb_write_string(ctx, KEY_IDENT, user->ident); --- 2581,2585 ---- for (it = dict_first(opserv_reserved_nick_dict); it; it = iter_next(it)) { struct userNode *user = iter_data(it); ! if (!IsPersistent(user)) continue; saxdb_start_record(ctx, iter_key(it), 0); saxdb_write_string(ctx, KEY_IDENT, user->ident); Index: proto-p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-p10.c,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** proto-p10.c 22 Jul 2003 18:32:20 -0000 1.70 --- proto-p10.c 2 Aug 2003 22:03:19 -0000 1.71 *************** *** 1775,1779 **** ignore_user = 0; if ((oldUser = GetUserH(nick))) { ! if (IsLocal(oldUser) && IsService(oldUser)) { /* The service should collide the new user off. */ oldUser->timestamp = timestamp - 1; --- 1775,1779 ---- ignore_user = 0; if ((oldUser = GetUserH(nick))) { ! if (IsLocal(oldUser) && (IsService(oldUser) || IsPersistent(oldUser))) { /* The service should collide the new user off. */ oldUser->timestamp = timestamp - 1; Index: hash.h =================================================================== RCS file: /cvsroot/srvx/services/src/hash.h,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -r1.104 -r1.105 *** hash.h 12 Jul 2003 02:59:49 -0000 1.104 --- hash.h 2 Aug 2003 22:03:19 -0000 1.105 *************** *** 66,69 **** --- 66,70 ---- #define IsHelperIrcu(x) ((x)->modes & FLAGS_HELPER) #define IsGagged(x) ((x)->modes & FLAGS_GAGGED) + #define IsPersistent(x) ((x)->modes & FLAGS_PERSISTENT) #define IsAway(x) ((x)->modes & FLAGS_AWAY) #define IsStamped(x) ((x)->modes & FLAGS_STAMPED) |
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv20352/src Modified Files: chanserv.c global.c helpserv.c log.c log.h main.c nickserv.c opserv.c sockcheck.c Log Message: remove the essentially pointless "bot" argument to log_register_type() Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.370 retrieving revision 1.371 diff -C2 -r1.370 -r1.371 *** chanserv.c 25 Jul 2003 04:50:16 -0000 1.370 --- chanserv.c 31 Jul 2003 02:08:40 -0000 1.371 *************** *** 7186,7190 **** { chanserv = AddService(nick, "Channel Services"); ! CS_LOG = log_register_type("ChanServ", chanserv, "file:chanserv.log"); conf_register_reload(chanserv_conf_read); --- 7186,7190 ---- { chanserv = AddService(nick, "Channel Services"); ! CS_LOG = log_register_type("ChanServ", "file:chanserv.log"); conf_register_reload(chanserv_conf_read); Index: global.c =================================================================== RCS file: /cvsroot/srvx/services/src/global.c,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** global.c 22 Jul 2003 18:32:19 -0000 1.56 --- global.c 31 Jul 2003 02:08:40 -0000 1.57 *************** *** 698,702 **** { global = AddService(nick, "Global Services"); ! G_LOG = log_register_type("Global", global, "file:global.log"); reg_new_user_func(global_process_user); reg_auth_func(global_process_auth); --- 698,702 ---- { global = AddService(nick, "Global Services"); ! G_LOG = log_register_type("Global", "file:global.log"); reg_new_user_func(global_process_user); reg_auth_func(global_process_auth); Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** helpserv.c 22 Jul 2003 18:32:20 -0000 1.73 --- helpserv.c 31 Jul 2003 02:08:40 -0000 1.74 *************** *** 4075,4079 **** helpserv_enabled = 1; ! HS_LOG = log_register_type("HelpServ", NULL, "file:helpserv.log"); conf_register_reload(helpserv_conf_read); --- 4075,4079 ---- helpserv_enabled = 1; ! HS_LOG = log_register_type("HelpServ", "file:helpserv.log"); conf_register_reload(helpserv_conf_read); Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** log.c 23 Jul 2003 00:01:31 -0000 1.63 --- log.c 31 Jul 2003 02:08:40 -0000 1.64 *************** *** 46,50 **** struct log_type { char *name; - struct userNode *bot; struct logList logs[LOG_NUM_SEVERITIES]; struct logEntry *log_oldest; --- 46,49 ---- *************** *** 358,362 **** logList_open(&logList, iter_data(it)); for (ii = 0; ii < slist->used; ++ii) { ! type = log_register_type(slist->list[ii], NULL, NULL); for (sev = 0; sev < LOG_NUM_SEVERITIES; ++sev) { if (!sevset[sev]) continue; --- 357,361 ---- logList_open(&logList, iter_data(it)); for (ii = 0; ii < slist->used; ++ii) { ! type = log_register_type(slist->list[ii], NULL); for (sev = 0; sev < LOG_NUM_SEVERITIES; ++sev) { if (!sevset[sev]) continue; *************** *** 368,372 **** } else if ((rd2 = iter_data(it)) && (rd2->type == RECDB_OBJECT) ! && (type = log_register_type(iter_key(it), NULL, NULL))) { log_parse_options(type, rd2->d.object); } else { --- 367,371 ---- } else if ((rd2 = iter_data(it)) && (rd2->type == RECDB_OBJECT) ! && (type = log_register_type(iter_key(it), NULL))) { log_parse_options(type, rd2->d.object); } else { *************** *** 406,410 **** struct log_type * ! log_register_type(const char *name, struct userNode *bot, const char *default_log) { struct log_type *type; --- 405,409 ---- struct log_type * ! log_register_type(const char *name, const char *default_log) { struct log_type *type; *************** *** 419,423 **** dict_insert(log_types, type->name, type); } - if (bot && !type->bot) type->bot = bot; if (default_log && !type->default_set) { /* If any severity level was unspecified in the config, use the default. */ --- 418,421 ---- *************** *** 969,975 **** struct logDest_irc *self = (struct logDest_irc*)self_; extern struct userNode *opserv; - struct userNode *bot = type->bot ? type->bot : opserv; ! send_target_message(0, self->target, bot, "%s %s: %s\n", type->name, log_severity_names[sev], message); } --- 967,972 ---- struct logDest_irc *self = (struct logDest_irc*)self_; extern struct userNode *opserv; ! send_target_message(0, self->target, opserv, "%s %s: %s\n", type->name, log_severity_names[sev], message); } *************** *** 996,1000 **** dict_insert(log_dest_types, ldIrc_vtbl.type_name, &ldIrc_vtbl); conf_register_reload(log_conf_read); ! log_default = log_register_type("*", NULL, NULL); reg_exit_func(cleanup_logs); log_inited = 1; --- 993,997 ---- dict_insert(log_dest_types, ldIrc_vtbl.type_name, &ldIrc_vtbl); conf_register_reload(log_conf_read); ! log_default = log_register_type("*", NULL); reg_exit_func(cleanup_logs); log_inited = 1; Index: log.h =================================================================== RCS file: /cvsroot/srvx/services/src/log.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** log.h 15 Jul 2003 21:25:45 -0000 1.26 --- log.h 31 Jul 2003 02:08:40 -0000 1.27 *************** *** 46,50 **** #define AUDIT_HOSTMASK 0x01 ! struct log_type *log_register_type(const char *name, struct userNode *bot, const char *default_log); /* constraint for log_audit: sev one of LOG_COMMAND, LOG_OVERRIDE, LOG_STAFF */ void log_audit(struct log_type *type, enum log_severity sev, struct userNode *user, struct userNode *bot, const char *channel_name, unsigned int flags, const char *command); --- 46,50 ---- #define AUDIT_HOSTMASK 0x01 ! struct log_type *log_register_type(const char *name, const char *default_log); /* constraint for log_audit: sev one of LOG_COMMAND, LOG_OVERRIDE, LOG_STAFF */ void log_audit(struct log_type *type, enum log_severity sev, struct userNode *user, struct userNode *bot, const char *channel_name, unsigned int flags, const char *command); Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -r1.151 -r1.152 *** main.c 22 Jul 2003 18:32:20 -0000 1.151 --- main.c 31 Jul 2003 02:08:40 -0000 1.152 *************** *** 762,766 **** log_init(); ! MAIN_LOG = log_register_type("srvx", NULL, "file:main.log"); if (debug) { log_debug(); --- 762,766 ---- log_init(); ! MAIN_LOG = log_register_type("srvx", "file:main.log"); if (debug) { log_debug(); Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -r1.245 -r1.246 *** nickserv.c 29 Jul 2003 01:50:08 -0000 1.245 --- nickserv.c 31 Jul 2003 02:08:40 -0000 1.246 *************** *** 3352,3356 **** unsigned int i; nickserv = AddService(nick, "Nick Services"); ! NS_LOG = log_register_type("NickServ", nickserv, "file:nickserv.log"); reg_new_user_func(handle_new_user); reg_nick_change_func(handle_nick_change); --- 3352,3356 ---- unsigned int i; nickserv = AddService(nick, "Nick Services"); ! NS_LOG = log_register_type("NickServ", "file:nickserv.log"); reg_new_user_func(handle_new_user); reg_nick_change_func(handle_nick_change); Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.329 retrieving revision 1.330 diff -C2 -r1.329 -r1.330 *** opserv.c 26 Jul 2003 04:12:20 -0000 1.329 --- opserv.c 31 Jul 2003 02:08:40 -0000 1.330 *************** *** 3883,3887 **** { opserv = AddService(nick, "Oper Services"); ! OS_LOG = log_register_type("OpServ", opserv, "file:opserv.log"); conf_register_reload(opserv_conf_read); --- 3883,3887 ---- { opserv = AddService(nick, "Oper Services"); ! OS_LOG = log_register_type("OpServ", "file:opserv.log"); conf_register_reload(opserv_conf_read); Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** sockcheck.c 22 Jul 2003 18:32:20 -0000 1.90 --- sockcheck.c 31 Jul 2003 02:08:40 -0000 1.91 *************** *** 1165,1169 **** sockcheck_init(void) { ! PC_LOG = log_register_type("ProxyCheck", NULL, "file:proxycheck.log"); conf_register_reload(sockcheck_read_conf); reg_exit_func(sockcheck_shutdown); --- 1165,1169 ---- sockcheck_init(void) { ! PC_LOG = log_register_type("ProxyCheck", "file:proxycheck.log"); conf_register_reload(sockcheck_read_conf); reg_exit_func(sockcheck_shutdown); |
From: Entrope <en...@us...> - 2003-07-29 02:19:43
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv24730/src Modified Files: proto-bahamut.c Log Message: fix some minor memory (pseudo-)leaks Index: proto-bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** proto-bahamut.c 29 Jul 2003 01:50:11 -0000 1.41 --- proto-bahamut.c 29 Jul 2003 02:19:41 -0000 1.42 *************** *** 935,938 **** --- 935,940 ---- if (of_list) free(of_list); dict_delete(irc_func_dict); + dict_delete(service_msginfo_dict); + free(mcf_list); for (nn=0; nn<dead_users.used; nn++) free_user(dead_users.list[nn]); userList_clean(&dead_users); |
From: Entrope <en...@us...> - 2003-07-29 02:09:22
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv19534a/src Modified Files: mod-snoop.c modules.c Log Message: make modules.c truly agnostic about supported modules Index: mod-snoop.c =================================================================== RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** mod-snoop.c 22 Jul 2003 18:32:20 -0000 1.13 --- mod-snoop.c 29 Jul 2003 01:51:24 -0000 1.14 *************** *** 44,47 **** --- 44,48 ---- } snoop_cfg; static char timestamp[16]; + const char *snoop_module_deps[] = { NULL }; #define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS) Index: modules.c =================================================================== RCS file: /cvsroot/srvx/services/src/modules.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** modules.c 7 Jul 2003 16:29:33 -0000 1.26 --- modules.c 29 Jul 2003 01:51:24 -0000 1.27 *************** *** 21,25 **** #include "log.h" #include "modules.h" - #include "modules-list.h" enum init_state { --- 21,24 ---- *************** *** 37,57 **** }; ! #ifdef WITH_MODULE_SNOOP ! extern int snoop_init(void); ! const char *snoop_deps[] = { NULL }; ! #endif ! ! #ifdef WITH_MODULE_SERVERSPY ! extern int serverspy_init(void); ! const char *serverspy_deps[] = { NULL }; ! #endif static struct cmodule cmodules[] = { ! #ifdef WITH_MODULE_SNOOP ! { "snoop", snoop_init, snoop_deps, UNINIT }, ! #endif ! #ifdef WITH_MODULE_SERVERSPY ! { "serverspy", serverspy_init, serverspy_deps, UNINIT }, ! #endif /* Placeholder at end of array */ { NULL, NULL, NULL, UNINIT } --- 36,47 ---- }; ! #define WITH_MODULE(x) extern int x##_init(void); extern const char *x##_module_deps[]; ! #include "modules-list.h" ! #undef WITH_MODULE static struct cmodule cmodules[] = { ! #define WITH_MODULE(x) { #x, x##_init, x##_module_deps, UNINIT }, ! #include "modules-list.h" ! #undef WITH_MODULE /* Placeholder at end of array */ { NULL, NULL, NULL, UNINIT } |
From: Entrope <en...@us...> - 2003-07-29 02:09:21
|
Update of /cvsroot/srvx/services In directory sc8-pr-cvs1:/tmp/cvs-serv19534a Modified Files: configure.in Log Message: make modules.c truly agnostic about supported modules Index: configure.in =================================================================== RCS file: /cvsroot/srvx/services/configure.in,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** configure.in 20 Jul 2003 13:18:22 -0000 1.70 --- configure.in 29 Jul 2003 01:51:24 -0000 1.71 *************** *** 313,318 **** EXTRA_MODULE_OBJS="$EXTRA_MODULE_OBJS mod-$module.\$(OBJEXT)" module_list="$module_list $module" ! CNAME=`echo $module | tr a-z A-Z` ! echo "#define WITH_MODULE_$CNAME 1" >> $MODULE_DEFINES done IFS="$OIFS" --- 313,317 ---- EXTRA_MODULE_OBJS="$EXTRA_MODULE_OBJS mod-$module.\$(OBJEXT)" module_list="$module_list $module" ! echo "WITH_MODULE($module)" >> $MODULE_DEFINES done IFS="$OIFS" |
From: Entrope <en...@us...> - 2003-07-29 01:52:31
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv19265/src Modified Files: nickserv.c proto-bahamut.c Log Message: update bahamut code to new log subsystem Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.244 retrieving revision 1.245 diff -C2 -r1.244 -r1.245 *** nickserv.c 23 Jul 2003 02:57:37 -0000 1.244 --- nickserv.c 29 Jul 2003 01:50:08 -0000 1.245 *************** *** 355,359 **** This should be impossible, but it never hurts to expect it. */ if ((hi = dict_find(nickserv_id_dict, id_base64, NULL))) { ! log(NS_LOG, LOG_WARNING, "Duplicated account ID %lu (%s) found belonging to %s while inserting %s.", id, id_base64, hi->handle, handle); id = 0; } --- 355,359 ---- This should be impossible, but it never hurts to expect it. */ if ((hi = dict_find(nickserv_id_dict, id_base64, NULL))) { ! log_module(NS_LOG, LOG_WARNING, "Duplicated account ID %lu (%s) found belonging to %s while inserting %s.", id, id_base64, hi->handle, handle); id = 0; } Index: proto-bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** proto-bahamut.c 22 Jul 2003 18:32:20 -0000 1.40 --- proto-bahamut.c 29 Jul 2003 01:50:11 -0000 1.41 *************** *** 119,128 **** if (!uplink) { ! log(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server does not exist!\n", uplink, nick); return NULL; } if (!is_valid_nick(nick)) { ! log(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): invalid nickname detected.\n", uplink, nick); return NULL; } --- 119,128 ---- if (!uplink) { ! log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server does not exist!", uplink, nick); return NULL; } if (!is_valid_nick(nick)) { ! log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): invalid nickname detected.", uplink, nick); return NULL; } *************** *** 349,353 **** /* Reconnect to the currently selected server. */ cManager.uplink->tries = 0; ! log(MAIN_LOG, LOG_INFO, "Squitting from uplink: %s\n", message); close_socket(); } --- 349,353 ---- /* Reconnect to the currently selected server. */ cManager.uplink->tries = 0; ! log_module(MAIN_LOG, LOG_INFO, "Squitting from uplink: %s", message); close_socket(); } *************** *** 427,435 **** unsigned int len; if (srv) { ! log(MAIN_LOG, LOG_WARNING, "%s tried to send a targeted G-line for %s (not supported by protocol!)\n", gline->issuer, gline->target); return; } if (!(sep = strchr(gline->target, '@'))) { ! log(MAIN_LOG, LOG_ERROR, "%s tried to add G-line with bad mask %s\n", gline->issuer, gline->target); return; } --- 427,435 ---- unsigned int len; if (srv) { ! log_module(MAIN_LOG, LOG_WARNING, "%s tried to send a targeted G-line for %s (not supported by protocol!)", gline->issuer, gline->target); return; } if (!(sep = strchr(gline->target, '@'))) { ! log_module(MAIN_LOG, LOG_ERROR, "%s tried to add G-line with bad mask %s", gline->issuer, gline->target); return; } *************** *** 452,456 **** unsigned int len; if (!(sep = strchr(mask, '@'))) { ! log(MAIN_LOG, LOG_ERROR, "Tried to remove G-line with bad mask %s\n", mask); return; } --- 452,456 ---- unsigned int len; if (!(sep = strchr(mask, '@'))) { ! log_module(MAIN_LOG, LOG_ERROR, "Tried to remove G-line with bad mask %s", mask); return; } *************** *** 599,603 **** uplink_capab |= capabs[mm].mask; } else { ! log(MAIN_LOG, LOG_INFO, "Saw unrecognized/unhandled capability %s. Please notify srvx developers so they can add it.", argv[nn]); } } --- 599,603 ---- uplink_capab |= capabs[mm].mask; } else { ! log_module(MAIN_LOG, LOG_INFO, "Saw unrecognized/unhandled capability %s. Please notify srvx developers so they can add it.", argv[nn]); } } *************** *** 756,760 **** /* normal JOIN */ if (!(cNode = GetChannel(argv[2]))) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find SJOIN target %s\n", argv[2]); return 0; } --- 756,760 ---- /* normal JOIN */ if (!(cNode = GetChannel(argv[2]))) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find SJOIN target %s", argv[2]); return 0; } *************** *** 774,778 **** cNode = GetChannel(argv[2]); } else { ! log(MAIN_LOG, LOG_ERROR, "Unsure how to handle SJOIN when arg 3 is %s\n", argv[3]); return 0; } --- 774,778 ---- cNode = GetChannel(argv[2]); } else { ! log_module(MAIN_LOG, LOG_ERROR, "Unsure how to handle SJOIN when arg 3 is %s", argv[3]); return 0; } *************** *** 798,802 **** if (argc < 2) { ! log(MAIN_LOG, LOG_ERROR, "Illegal MODE from %s (no arguments).\n", origin); return 0; } else if (IsChannelName(argv[1])) { --- 798,802 ---- if (argc < 2) { ! log_module(MAIN_LOG, LOG_ERROR, "Illegal MODE from %s (no arguments).", origin); return 0; } else if (IsChannelName(argv[1])) { *************** *** 806,810 **** if (!(cn = GetChannel(argv[1]))) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find channel %s whose mode is changing\n", argv[1]); return 0; } --- 806,810 ---- if (!(cn = GetChannel(argv[1]))) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find channel %s whose mode is changing", argv[1]); return 0; } *************** *** 824,828 **** return 1; } ! log(MAIN_LOG, LOG_ERROR, "Not sure what MODE %s is affecting (not a channel name and no such user)\n", argv[1]); return 0; } --- 824,828 ---- return 1; } ! log_module(MAIN_LOG, LOG_ERROR, "Not sure what MODE %s is affecting (not a channel name and no such user)", argv[1]); return 0; } *************** *** 832,836 **** if (argc < 5) return 0; if (!(cn = GetChannel(argv[1]))) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find channel %s whose topic is being set\n", argv[1]); return 0; } --- 832,836 ---- if (argc < 5) return 0; if (!(cn = GetChannel(argv[1]))) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find channel %s whose topic is being set", argv[1]); return 0; } *************** *** 856,860 **** if (!(un = GetUserH(origin))) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find user %s sending AWAY\n", origin); return 0; } --- 856,860 ---- if (!(un = GetUserH(origin))) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find user %s sending AWAY", origin); return 0; } *************** *** 877,881 **** if (argc < 3) return 0; if (!(user = GetUserH(argv[1]))) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find kill victim %2\n", argv[1]); return 0; } --- 877,881 ---- if (argc < 3) return 0; if (!(user = GetUserH(argv[1]))) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find kill victim %s", argv[1]); return 0; } *************** *** 949,953 **** desc = conf_get_data("server/description", RECDB_QSTRING); if (!str || !desc) { ! log(MAIN_LOG, LOG_ERROR, "No server/hostname entry in config file.\n"); exit(1); } --- 949,953 ---- desc = conf_get_data("server/description", RECDB_QSTRING); if (!str || !desc) { ! log_module(MAIN_LOG, LOG_ERROR, "No server/hostname entry in config file."); exit(1); } *************** *** 1015,1019 **** } if (!res) { ! log(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s\n", unsplit_string(argv, argc, NULL)); } else if (!recursive) { unsigned int i; --- 1015,1019 ---- } if (!res) { ! log_module(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s", unsplit_string(argv, argc, NULL)); } else if (!recursive) { unsigned int i; *************** *** 1333,1342 **** advance_word; if (!vic) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find user with numeric %s\n", numeric); return 0; } mn = GetUserMode(channel, vic); if (!mn) { ! log(MAIN_LOG, LOG_ERROR, "Unable to find user %s in channel %s\n", vic->nick, channel->name); return 0; } --- 1333,1342 ---- advance_word; if (!vic) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find user with numeric %s", numeric); return 0; } mn = GetUserMode(channel, vic); if (!mn) { ! log_module(MAIN_LOG, LOG_ERROR, "Unable to find user %s in channel %s", vic->nick, channel->name); return 0; } |
From: Entrope <en...@us...> - 2003-07-29 01:50:54
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv19384/src Modified Files: modcmd.h Log Message: add new helper macro Index: modcmd.h =================================================================== RCS file: /cvsroot/srvx/services/src/modcmd.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** modcmd.h 22 Jul 2003 16:33:44 -0000 1.19 --- modcmd.h 29 Jul 2003 01:50:48 -0000 1.20 *************** *** 42,45 **** --- 42,46 ---- #define reply(...) send_message(user, cmd->parent->bot, __VA_ARGS__) #endif + #define modcmd_get_handle_info(USER, NAME) smart_get_handle_info(cmd->parent->bot, USER, NAME) /* Miscellaneous flags controlling a command */ |
From: Entrope <en...@us...> - 2003-07-26 18:43:50
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv2524/src Modified Files: opserv.c Log Message: move LockChannel() to the right line (thanks Reed, Voice and Byte!) Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.328 retrieving revision 1.329 diff -C2 -r1.328 -r1.329 *** opserv.c 22 Jul 2003 18:32:20 -0000 1.328 --- opserv.c 26 Jul 2003 04:12:20 -0000 1.329 *************** *** 2848,2853 **** discrim->channel = AddChannel(argv[i]+j, now, NULL, NULL); } - LockChannel(discrim->channel); } } else if (irccasecmp(argv[i], "numchannels") == 0) { discrim->min_channels = discrim->max_channels = strtoul(argv[++i], NULL, 10); --- 2848,2853 ---- discrim->channel = AddChannel(argv[i]+j, now, NULL, NULL); } } + LockChannel(discrim->channel); } else if (irccasecmp(argv[i], "numchannels") == 0) { discrim->min_channels = discrim->max_channels = strtoul(argv[++i], NULL, 10); |
From: Zoot <zo...@us...> - 2003-07-25 04:50:20
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv8351/src Modified Files: chanserv.c Log Message: Properly ignore CTCP ACTION in ChanServ. Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.369 retrieving revision 1.370 diff -C2 -r1.369 -r1.370 *** chanserv.c 23 Jul 2003 02:58:54 -0000 1.369 --- chanserv.c 25 Jul 2003 04:50:16 -0000 1.370 *************** *** 712,716 **** if(channel->channel_info->options[optCTCPUsers] == 'a') return; if(IsService(user)) return; ! if(!ircncasecmp(text, "\001ACTION ", 8)) return; /* Figure out the minimum level needed to CTCP the channel */ switch(channel->channel_info->options[optCTCPUsers]) { --- 712,716 ---- if(channel->channel_info->options[optCTCPUsers] == 'a') return; if(IsService(user)) return; ! if(!ircncasecmp(text, "ACTION ", 7)) return; /* Figure out the minimum level needed to CTCP the channel */ switch(channel->channel_info->options[optCTCPUsers]) { |
From: Entrope <en...@us...> - 2003-07-23 02:58:57
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv4794/src Modified Files: chanserv.c Log Message: fix mandatory and default flags for the 'note' command Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.368 retrieving revision 1.369 diff -C2 -r1.368 -r1.369 *** chanserv.c 22 Jul 2003 23:55:14 -0000 1.368 --- chanserv.c 23 Jul 2003 02:58:54 -0000 1.369 *************** *** 7283,7287 **** DEFINE_COMMAND(names, 1, MODCMD_REQUIRE_REGCHAN, "flags", "+nolog,+joinable", NULL); ! DEFINE_COMMAND(note, 1, MODCMD_ACCEPT_CHANNEL, "flags", "+joinable", NULL); DEFINE_COMMAND(delnote, 2, MODCMD_REQUIRE_CHANUSER, NULL); --- 7283,7287 ---- DEFINE_COMMAND(names, 1, MODCMD_REQUIRE_REGCHAN, "flags", "+nolog,+joinable", NULL); ! DEFINE_COMMAND(note, 1, MODCMD_REQUIRE_REGCHAN, "flags", "+joinable,+acceptchan", NULL); DEFINE_COMMAND(delnote, 2, MODCMD_REQUIRE_CHANUSER, NULL); |
From: Entrope <en...@us...> - 2003-07-23 02:58:15
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv4734/src Modified Files: modcmd.c Log Message: check user's account stamp before seeing if he is helping Index: modcmd.c =================================================================== RCS file: /cvsroot/srvx/services/src/modcmd.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** modcmd.c 16 Jul 2003 00:54:40 -0000 1.60 --- modcmd.c 23 Jul 2003 02:58:08 -0000 1.61 *************** *** 461,465 **** } else if (IsSuspended(channel->channel_info) && !(flags & MODCMD_IGNORE_CSUSPEND)) { /* allow security-override users to always ignore channel suspensions, but flag it as a staff command */ ! if (!HANDLE_FLAGGED(user->handle_info, HELPING)) { if (options & SVCCMD_NOISY) send_message(user, bot, MCMSG_CHAN_SUSPENDED, channel->name, channel->channel_info->suspended->reason); return 0; --- 461,465 ---- } else if (IsSuspended(channel->channel_info) && !(flags & MODCMD_IGNORE_CSUSPEND)) { /* allow security-override users to always ignore channel suspensions, but flag it as a staff command */ ! if (!user->handle_info || !HANDLE_FLAGGED(user->handle_info, HELPING)) { if (options & SVCCMD_NOISY) send_message(user, bot, MCMSG_CHAN_SUSPENDED, channel->name, channel->channel_info->suspended->reason); return 0; |
From: Entrope <en...@us...> - 2003-07-23 02:57:40
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv4619/src Modified Files: nickserv.c Log Message: send "I recognize you." message before making auth callbacks Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -r1.243 -r1.244 *** nickserv.c 22 Jul 2003 18:32:20 -0000 1.243 --- nickserv.c 23 Jul 2003 02:57:37 -0000 1.244 *************** *** 1459,1465 **** if (hi->passwd[0] != '$') cryptpass(passwd, hi->passwd); - set_user_handle_info(user, hi, 1); nickserv_notice(user, NSMSG_AUTH_SUCCESS); argv[pw_arg] = "****"; return 1; } --- 1459,1465 ---- if (hi->passwd[0] != '$') cryptpass(passwd, hi->passwd); nickserv_notice(user, NSMSG_AUTH_SUCCESS); argv[pw_arg] = "****"; + set_user_handle_info(user, hi, 1); return 1; } |
From: Zoot <zo...@us...> - 2003-07-23 02:12:29
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv10724/src Modified Files: log.c opserv.help Log Message: Fix channel name matching in audit log search and support +/- syntax for levels in discrim creation. Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** log.c 22 Jul 2003 18:32:20 -0000 1.62 --- log.c 23 Jul 2003 00:01:31 -0000 1.63 *************** *** 647,656 **** discrim->severities ^= ~0; } else { ! sev = find_severity(argv[ii]); if (sev == LOG_NUM_SEVERITIES) { send_message(user, service, MSG_INVALID_SEVERITY, argv[ii]); goto fail; } else { ! discrim->severities ^= 1 << sev; } } --- 647,671 ---- discrim->severities ^= ~0; } else { ! int add = 1; ! char *severity; ! ! switch (*argv[ii]) { ! case '-': ! add = 0; ! case '+': ! argv[ii]++; ! default: ! severity = argv[ii]; ! } ! sev = find_severity(severity); if (sev == LOG_NUM_SEVERITIES) { send_message(user, service, MSG_INVALID_SEVERITY, argv[ii]); goto fail; } else { ! if (add) { ! discrim->severities |= 1 << sev; ! } else { ! discrim->severities &= ~(1 << sev); ! } } } *************** *** 682,686 **** || (discrim->masks.channel_name && (!entry->channel_name ! || !irccasecmp(entry->channel_name, discrim->masks.channel_name))) || (discrim->masks.user_nick && !match_ircglob(entry->user_nick, discrim->masks.user_nick)) --- 697,701 ---- || (discrim->masks.channel_name && (!entry->channel_name ! || irccasecmp(entry->channel_name, discrim->masks.channel_name))) || (discrim->masks.user_nick && !match_ircglob(entry->user_nick, discrim->masks.user_nick)) Index: opserv.help =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.help,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** opserv.help 15 Jul 2003 21:24:40 -0000 1.63 --- opserv.help 23 Jul 2003 00:01:31 -0000 1.64 *************** *** 321,325 **** "$bLIMIT$b - Maximum number of results to show.", "$bLEVEL$b - One of COMMAND, OVERRIDE, STAFF or *, to return only some results.", ! "$bTYPE$b - Name of module that generated log (see $bSTATS MODULES$b)."); "REOPEN" ("/msg $O REOPEN", "Close and re-open all the log files.", --- 321,326 ---- "$bLIMIT$b - Maximum number of results to show.", "$bLEVEL$b - One of COMMAND, OVERRIDE, STAFF or *, to return only some results.", ! "$bTYPE$b - Name of module that generated log (see $bSTATS MODULES$b).", ! "By default, all levels of audit log entries are returned. You may exclude levels from the results by using the level criteria and the '-' character in front of the level name."); "REOPEN" ("/msg $O REOPEN", "Close and re-open all the log files.", |
From: Zoot <zo...@us...> - 2003-07-22 23:55:17
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv9767/src Modified Files: chanserv.c Log Message: Remember to set the max_time field in the log search discrim. Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.367 retrieving revision 1.368 diff -C2 -r1.367 -r1.368 *** chanserv.c 22 Jul 2003 16:33:45 -0000 1.367 --- chanserv.c 22 Jul 2003 23:55:14 -0000 1.368 *************** *** 4714,4717 **** --- 4714,4718 ---- if(argc > 2) discrim.masks.command = argv[2]; discrim.limit = limit; + discrim.max_time = INT_MAX; discrim.severities = 1 << LOG_COMMAND; report.reporter = chanserv; |
From: Entrope <en...@us...> - 2003-07-22 18:32:28
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv13619/src Modified Files: global.c globtest.c helpserv.c log.c main.c mod-snoop.c nickserv.c opserv.c proto-bahamut.c proto-common.c proto-p10.c saxdb.c sendmail.c sockcheck.c Log Message: further use UNUSED_ARG() instead of (void)argname; Index: global.c =================================================================== RCS file: /cvsroot/srvx/services/src/global.c,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** global.c 7 Jul 2003 16:29:33 -0000 1.55 --- global.c 22 Jul 2003 18:32:19 -0000 1.56 *************** *** 434,438 **** struct helpfile_table table; unsigned int length, nn; - (void)argc; (void)argv; if(!messageList) --- 434,437 ---- *************** *** 542,546 **** long mask = MESSAGE_RECIPIENT_LUSERS | MESSAGE_RECIPIENT_CHANNELS; unsigned int count; - (void)argc;(void)argv; if(IsOper(user)) --- 541,544 ---- *************** *** 569,577 **** static GLOBAL_FUNC(cmd_version) { - (void)argc;(void)argv; - global_notice(user, MSG_VERSION); global_notice(user, GMSG_VERSION_ID); - return 1; } --- 567,572 ---- *************** *** 602,608 **** static void ! global_process_auth(struct userNode *user, struct handle_info *old_handle) { - (void)old_handle; if(IsHelper(user)) { --- 597,602 ---- static void ! global_process_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle)) { if(IsHelper(user)) { Index: globtest.c =================================================================== RCS file: /cvsroot/srvx/services/src/globtest.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** globtest.c 21 Jul 2003 21:52:52 -0000 1.7 --- globtest.c 22 Jul 2003 18:32:20 -0000 1.8 *************** *** 39,48 **** int ! main(int argc, char *argv[]) { int i, j; - (void)argc; (void)argv; - for (i = 0; glob_yes[i].glob; i++) { for (j=0; glob_yes[i].texts[j]; j++) { --- 39,46 ---- int ! main(UNUSED_ARG(int argc), UNUSED_ARG(char *argv[])) { int i, j; for (i = 0; glob_yes[i].glob; i++) { for (j=0; glob_yes[i].texts[j]; j++) { *************** *** 75,82 **** /* because tools.c likes to log stuff.. */ ! void log(enum log_type lt, enum log_severity ls, char *format, ...) { va_list va; - (void)lt; (void)ls; va_start(va, format); vfprintf(stderr, format, va); --- 73,79 ---- /* because tools.c likes to log stuff.. */ ! void log(UNUSED_ARG(enum log_type lt), UNUSED_ARG(enum log_severity ls), char *format, ...) { va_list va; va_start(va, format); vfprintf(stderr, format, va); Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** helpserv.c 15 Jul 2003 21:25:45 -0000 1.72 --- helpserv.c 22 Jul 2003 18:32:20 -0000 1.73 *************** *** 515,519 **** #define HELPSERV_SYNTAX() helpserv_help(hs, from_opserv, user, argv[0]) ! #define HELPSERV_FUNC(NAME) int NAME(struct userNode *user, struct helpserv_bot *hs, int from_opserv, unsigned int argc, unsigned char *argv[]) typedef HELPSERV_FUNC(helpserv_func_t); #define HELPSERV_OPTION(NAME) HELPSERV_FUNC(NAME) --- 515,519 ---- #define HELPSERV_SYNTAX() helpserv_help(hs, from_opserv, user, argv[0]) ! #define HELPSERV_FUNC(NAME) int NAME(struct userNode *user, UNUSED_ARG(struct helpserv_bot *hs), int from_opserv, UNUSED_ARG(unsigned int argc), UNUSED_ARG(unsigned char *argv[])) typedef HELPSERV_FUNC(helpserv_func_t); #define HELPSERV_OPTION(NAME) HELPSERV_FUNC(NAME) *************** *** 917,921 **** /* Handle messages direct to a HelpServ bot. */ ! static void helpserv_botmsg(struct userNode *user, struct userNode *target, char *text, int server_qualified) { struct helpserv_bot *hs; struct helpserv_cmd *cmd; --- 917,921 ---- /* Handle messages direct to a HelpServ bot. */ ! static void helpserv_botmsg(struct userNode *user, struct userNode *target, char *text, UNUSED_ARG(int server_qualified)) { struct helpserv_bot *hs; struct helpserv_cmd *cmd; *************** *** 925,930 **** const int from_opserv = 0; /* for helpserv_notice */ - (void)server_qualified; - /* Ignore things consisting of empty lines */ if (!*text) return; --- 925,928 ---- *************** *** 1021,1026 **** static HELPSERV_FUNC(cmd_version) { - (void)hs; - helpserv_notice(user, MSG_VERSION); --- 1019,1022 ---- *************** *** 1036,1044 **** } ! static int append_entry(const char *key, void *data, void *extra) { struct helpfile_expansion *exp = extra; int row; - (void)data; row = exp->value.table.length++; exp->value.table.contents[row] = calloc(1, sizeof(char*)); --- 1032,1039 ---- } ! static int append_entry(const char *key, UNUSED_ARG(void *data), void *extra) { struct helpfile_expansion *exp = extra; int row; row = exp->value.table.length++; exp->value.table.contents[row] = calloc(1, sizeof(char*)); *************** *** 1088,1093 **** struct helpfile *old_helpfile = helpserv_helpfile; - (void)argc; (void)argv; (void)hs; /* ignore them! ignore them all! */ - gettimeofday(&start, NULL); helpserv_helpfile_read(); --- 1083,1086 ---- *************** *** 1215,1220 **** const enum helpserv_level lvl_lowest=HlTrial, lvl_highest=HlOwner; - (void)argc; (void)argv; - helpserv_notice(user, HSMSG_USERLIST_HEADER, hs->helpserv->nick); if (dict_size(hs->users) == 0) { --- 1208,1211 ---- *************** *** 1675,1680 **** struct helpserv_request *req; - (void)argc; (void)argv; - if (!(req = hs->unhandled)) { helpserv_notice(user, HSMSG_REQ_NO_UNASSIGNED); --- 1666,1669 ---- *************** *** 2088,2093 **** unsigned int i; - (void)argc; (void)argv; - helpserv_notice(user, HSMSG_BOTLIST_HEADER); --- 2077,2080 ---- *************** *** 3158,3162 **** } ! static int helpserv_bot_read(const char *key, void *data, void *extra) { struct record_data *br = data, *raw_record; struct helpserv_bot *hs; --- 3145,3149 ---- } ! static int helpserv_bot_read(const char *key, void *data, UNUSED_ARG(void *extra)) { struct record_data *br = data, *raw_record; struct helpserv_bot *hs; *************** *** 3168,3173 **** enum persistence_type persisttype; - (void)extra; - users = database_get_data(GET_RECORD_OBJECT(br), KEY_HELPERS, RECDB_OBJECT); if (!users) { --- 3155,3158 ---- *************** *** 3331,3335 **** /* Drop requests that persist until part when a user leaves the chan */ ! static void handle_part(struct userNode *user, struct chanNode *chan, const char *reason) { struct helpserv_botlist *botlist; struct helpserv_userlist *userlist; --- 3316,3320 ---- /* Drop requests that persist until part when a user leaves the chan */ ! static void handle_part(struct userNode *user, struct chanNode *chan, UNUSED_ARG(const char *reason)) { struct helpserv_botlist *botlist; struct helpserv_userlist *userlist; *************** *** 3337,3341 **** unsigned int i; - (void)reason; if ((botlist = dict_find(helpserv_bots_bychan_dict, chan->name, NULL))) { for (i=0; i < botlist->used; i++) { --- 3322,3325 ---- *************** *** 3421,3430 **** * Unassign requests where req->helper persists until the helper parts or * quits. */ ! static void handle_quit(struct userNode *user, struct userNode *killer, const char *why) { struct helpserv_reqlist *reqlist; struct helpserv_userlist *userlist; unsigned int i, n; - (void)killer; (void)why; if (IsLocal(user)) { struct helpserv_bot *hs; --- 3405,3413 ---- * Unassign requests where req->helper persists until the helper parts or * quits. */ ! static void handle_quit(struct userNode *user, UNUSED_ARG(struct userNode *killer), UNUSED_ARG(const char *why)) { struct helpserv_reqlist *reqlist; struct helpserv_userlist *userlist; unsigned int i, n; if (IsLocal(user)) { struct helpserv_bot *hs; *************** *** 4028,4038 **** /* If data != NULL, then don't add to the timeq */ ! static void helpserv_run_stats(void *data) { struct helpserv_bot *hs; struct helpserv_user *hs_user; int i; dict_iterator_t it, it2; - - (void)data; for (it=dict_first(helpserv_bots_dict); it; it=iter_next(it)) { --- 4011,4019 ---- /* If data != NULL, then don't add to the timeq */ ! static void helpserv_run_stats(UNUSED_ARG(void *data)) { struct helpserv_bot *hs; struct helpserv_user *hs_user; int i; dict_iterator_t it, it2; for (it=dict_first(helpserv_bots_dict); it; it=iter_next(it)) { Index: log.c =================================================================== RCS file: /cvsroot/srvx/services/src/log.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** log.c 15 Jul 2003 21:25:45 -0000 1.61 --- log.c 22 Jul 2003 18:32:20 -0000 1.62 *************** *** 777,787 **** static void ! ldNop_reopen(struct logDestination *self_) { ! (void)self_; /* no operation necessary */ } static void ! ldNop_replay(struct logDestination *self_, struct log_type *type, int is_write, const char *line) { ! (void)self_; (void)type; (void)is_write; (void)line; /* no operation necessary */ } --- 777,787 ---- static void ! ldNop_reopen(UNUSED_ARG(struct logDestination *self_)) { ! /* no operation necessary */ } static void ! ldNop_replay(UNUSED_ARG(struct logDestination *self_), UNUSED_ARG(struct log_type *type), UNUSED_ARG(int is_write), UNUSED_ARG(const char *line)) { ! /* no operation necessary */ } *************** *** 821,834 **** static void ! ldFile_audit(struct logDestination *self_, struct log_type *type, struct logEntry *entry) { struct logDest_file *self = (struct logDest_file*)self_; fputs(entry->default_desc, self->output); fputc('\n', self->output); fflush(self->output); - (void)type; } static void ! ldFile_replay(struct logDestination *self_, struct log_type *type, int is_write, const char *line) { struct logDest_file *self = (struct logDest_file*)self_; struct string_buffer sbuf; --- 821,833 ---- static void ! ldFile_audit(struct logDestination *self_, UNUSED_ARG(struct log_type *type), struct logEntry *entry) { struct logDest_file *self = (struct logDest_file*)self_; fputs(entry->default_desc, self->output); fputc('\n', self->output); fflush(self->output); } static void ! ldFile_replay(struct logDestination *self_, UNUSED_ARG(struct log_type *type), int is_write, const char *line) { struct logDest_file *self = (struct logDest_file*)self_; struct string_buffer sbuf; *************** *** 841,845 **** free(sbuf.list); fflush(self->output); - (void)type; } --- 840,843 ---- *************** *** 896,911 **** static void ! ldStd_replay(struct logDestination *self_, struct log_type *type, int is_write, const char *line) { struct logDest_file *self = (struct logDest_file*)self_; - (void)type; - fprintf(self->output, "%s%s\n", is_write ? "W: " : " ", line); } static void ! ldStd_module(struct logDestination *self_, struct log_type *type, enum log_severity sev, const char *message) { struct logDest_file *self = (struct logDest_file*)self_; - (void)type; - fprintf(self->output, "%s: %s\n", log_severity_names[sev], message); } --- 894,905 ---- static void ! ldStd_replay(struct logDestination *self_, UNUSED_ARG(struct log_type *type), int is_write, const char *line) { struct logDest_file *self = (struct logDest_file*)self_; fprintf(self->output, "%s%s\n", is_write ? "W: " : " ", line); } static void ! ldStd_module(struct logDestination *self_, UNUSED_ARG(struct log_type *type), enum log_severity sev, const char *message) { struct logDest_file *self = (struct logDest_file*)self_; fprintf(self->output, "%s: %s\n", log_severity_names[sev], message); } *************** *** 946,950 **** static void ! ldIrc_audit(struct logDestination *self_, struct log_type *type, struct logEntry *entry) { struct logDest_irc *self = (struct logDest_irc*)self_; --- 940,944 ---- static void ! ldIrc_audit(struct logDestination *self_, UNUSED_ARG(struct log_type *type), struct logEntry *entry) { struct logDest_irc *self = (struct logDest_irc*)self_; *************** *** 954,958 **** send_target_message(0, self->target, entry->bot, "%s", strchr(entry->default_desc, ')')+2); } - (void)type; } --- 948,951 ---- Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -r1.150 -r1.151 *** main.c 22 Jul 2003 16:31:30 -0000 1.150 --- main.c 22 Jul 2003 18:32:20 -0000 1.151 *************** *** 79,83 **** static int ! uplink_insert(const char *key, void *data, void *extra) { struct uplinkNode *uplink = malloc(sizeof(struct uplinkNode)); --- 79,83 ---- static int ! uplink_insert(const char *key, void *data, UNUSED_ARG(void *extra)) { struct uplinkNode *uplink = malloc(sizeof(struct uplinkNode)); *************** *** 87,91 **** struct sockaddr_in *sin; unsigned long addr; - (void)extra; if(!uplink) --- 87,90 ---- *************** *** 397,404 **** } ! void sigaction_wait(int x) { int code; - (void)x; waitpid(-1, &code, WNOHANG); } --- 396,402 ---- } ! void sigaction_wait(UNUSED_ARG(int x)) { int code; waitpid(-1, &code, WNOHANG); } Index: mod-snoop.c =================================================================== RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** mod-snoop.c 7 Jul 2003 16:29:33 -0000 1.12 --- mod-snoop.c 22 Jul 2003 18:32:20 -0000 1.13 *************** *** 108,113 **** static void ! snoop_auth(struct userNode *user, struct handle_info *old_handle) { ! (void)old_handle; if (!snoop_cfg.enabled) return; if (user->uplink->burst && !snoop_cfg.show_bursts) return; --- 108,112 ---- static void ! snoop_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle)) { if (!snoop_cfg.enabled) return; if (user->uplink->burst && !snoop_cfg.show_bursts) return; Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -r1.242 -r1.243 *** nickserv.c 8 Jul 2003 14:37:33 -0000 1.242 --- nickserv.c 22 Jul 2003 18:32:20 -0000 1.243 *************** *** 238,242 **** #define NICKSERV_FUNC(NAME) MODCMD_FUNC(NAME) ! #define OPTION_FUNC(NAME) int NAME(struct userNode *user, struct handle_info *hi, unsigned int override, unsigned int argc, unsigned char *argv[]) typedef OPTION_FUNC(option_func_t); --- 238,242 ---- #define NICKSERV_FUNC(NAME) MODCMD_FUNC(NAME) ! #define OPTION_FUNC(NAME) int NAME(struct userNode *user, struct handle_info *hi, UNUSED_ARG(unsigned int override), unsigned int argc, unsigned char *argv[]) typedef OPTION_FUNC(option_func_t); *************** *** 245,249 **** #define NICKSERV_SYNTAX() svccmd_send_help(user, nickserv, cmd) #define NICKSERV_MIN_PARMS(N) do { \ - (void)argv; \ if (argc < N) { \ nickserv_notice(user, MSG_MISSING_PARAMS, argv[0]); \ --- 245,248 ---- *************** *** 332,336 **** static struct handle_info * ! register_handle(const char *handle, const char *passwd, unsigned long int id) { struct handle_info *hi; --- 331,335 ---- static struct handle_info * ! register_handle(const char *handle, const char *passwd, UNUSED_ARG(unsigned long id)) { struct handle_info *hi; *************** *** 360,365 **** } } while(!id); - #else - (void)id; #endif --- 359,362 ---- *************** *** 1566,1570 **** struct handle_info *hi; - (void)argc; (void)argv; hi = user->handle_info; if (hi->cookie) { --- 1563,1566 ---- *************** *** 1708,1712 **** struct nick_info *ni; - (void)argv; if (!is_registerable_nick(user->nick)) { nickserv_notice(user, NSMSG_BAD_NICK, user->nick); --- 1704,1707 ---- *************** *** 1955,1960 **** static OPTION_FUNC(opt_info) { - (void)override; - if (argc > 1) { if ((argv[1][0] == '*') && (argv[1][1] == 0)) { --- 1950,1953 ---- *************** *** 1972,1977 **** static OPTION_FUNC(opt_width) { - (void)override; - if (argc > 1) { unsigned int new_width = strtoul(argv[1], NULL, 0); --- 1965,1968 ---- *************** *** 1991,1996 **** static OPTION_FUNC(opt_tablewidth) { - (void)override; - if (argc > 1) { unsigned int new_width = strtoul(argv[1], NULL, 0); --- 1982,1985 ---- *************** *** 2010,2015 **** static OPTION_FUNC(opt_color) { - (void)override; - if (argc > 1) { if (enabled_string(argv[1])) { --- 1999,2002 ---- *************** *** 2029,2034 **** static OPTION_FUNC(opt_privmsg) { - (void)override; - if (argc > 1) { if (enabled_string(argv[1])) { --- 2016,2019 ---- *************** *** 2049,2053 **** { char *style; - (void)override; if (argc > 1) { --- 2034,2037 ---- *************** *** 2076,2080 **** char *choice; - (void)override; if (argc > 1) { if (enabled_string(argv[1])) { --- 2060,2063 ---- *************** *** 2341,2346 **** static NICKSERV_FUNC(cmd_status) { - (void)argc; (void)argv; /* ignore them! ignore them all! */ - if (nickserv_conf.disable_nicks) { nickserv_notice(user, NSMSG_GLOBAL_STATS_NONICK, --- 2324,2327 ---- *************** *** 2388,2392 **** static NICKSERV_FUNC(cmd_vacation) { - (void)argc; (void)argv; HANDLE_SET_FLAG(user->handle_info, FROZEN); nickserv_notice(user, NSMSG_ON_VACATION); --- 2369,2372 ---- *************** *** 2396,2404 **** static NICKSERV_FUNC(cmd_version) { - (void)argc; (void)argv; - nickserv_notice(user, MSG_VERSION); nickserv_notice(user, NSMSG_VERSION_ID); - return 1; } --- 2376,2381 ---- *************** *** 2840,2846 **** static void ! search_count_func(struct userNode *source, struct handle_info *match) { - (void)source; (void)match; } --- 2817,2822 ---- static void ! search_count_func(UNUSED_ARG(struct userNode *source), UNUSED_ARG(struct handle_info *match)) { } *************** *** 3040,3044 **** static void ! expire_handles(void *data) { dict_iterator_t it, next; --- 3016,3020 ---- static void ! expire_handles(UNUSED_ARG(void *data)) { dict_iterator_t it, next; *************** *** 3046,3050 **** struct handle_info *hi; - (void)data; for (it=dict_first(nickserv_handle_dict); it; it=next) { next = iter_next(it); --- 3022,3025 ---- *************** *** 3316,3322 **** void ! nickserv_remove_user(struct userNode *user, struct userNode *killer, const char *why) { - (void)killer; (void)why; if (user->auth_policer) policer_delete(user->auth_policer); dict_remove(nickserv_allow_auth_dict, user->nick); --- 3291,3296 ---- void ! nickserv_remove_user(struct userNode *user, UNUSED_ARG(struct userNode *killer), UNUSED_ARG(const char *why)) { if (user->auth_policer) policer_delete(user->auth_policer); dict_remove(nickserv_allow_auth_dict, user->nick); Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.327 retrieving revision 1.328 diff -C2 -r1.327 -r1.328 *** opserv.c 20 Jul 2003 13:18:22 -0000 1.327 --- opserv.c 22 Jul 2003 18:32:20 -0000 1.328 *************** *** 217,220 **** --- 217,221 ---- #define OSMSG_REHASH_FAILED "Rehash of configuration database failed, previous configuration is intact." #define OSMSG_REOPEN_COMPLETE "Closed and reopened all log files." + #define OSMSG_RECONNECTING "Reconnecting to my uplink." #define OSMSG_NUMERIC_COLLIDE "That numeric is already in use." #define OSMSG_NAME_COLLIDE "That name is already in use." *************** *** 244,258 **** #define OPSERV_FUNC(NAME) MODCMD_FUNC(NAME) #define OPSERV_SYNTAX() svccmd_send_help(user, opserv, cmd) [...1101 lines suppressed...] ! opserv_define_func("TRACE", cmd_trace, 100, 0, 3); ! opserv_define_func("TRACE PRINT", NULL, 0, 0, 0); ! opserv_define_func("TRACE COUNT", NULL, 0, 0, 0); ! opserv_define_func("TRACE DOMAINS", NULL, 0, 0, 0); ! opserv_define_func("TRACE GLINE", NULL, 600, 0, 0); ! opserv_define_func("TRACE GAG", NULL, 600, 0, 0); ! opserv_define_func("TRACE KILL", NULL, 600, 0, 0); ! opserv_define_func("UNBAN", cmd_unban, 100, 2, 2); ! opserv_define_func("UNGAG", cmd_ungag, 600, 0, 2); ! opserv_define_func("UNGLINE", cmd_ungline, 600, 0, 2); modcmd_register(opserv_module, "GTRACE UNGLINE", NULL, 0, 0, "template", "ungline", NULL); ! opserv_define_func("UNJUPE", cmd_unjupe, 900, 0, 2); ! opserv_define_func("UNRESERVE", cmd_unreserve, 800, 0, 2); ! opserv_define_func("UNWARN", cmd_unwarn, 800, 0, 0); ! opserv_define_func("VERSION", cmd_version, 0, 0, 0); ! opserv_define_func("VOICEALL", cmd_voiceall, 300, 2, 0); ! opserv_define_func("WARN", cmd_warn, 800, 0, 2); ! opserv_define_func("WHOIS", cmd_whois, 0, 0, 2); opserv_reserved_nick_dict = dict_new(); Index: proto-bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** proto-bahamut.c 12 Jul 2003 03:18:33 -0000 1.39 --- proto-bahamut.c 22 Jul 2003 18:32:20 -0000 1.40 *************** *** 42,49 **** struct server * ! AddServer(struct server *uplink, const char *name, int hops, time_t boot, time_t link, const char *numeric, const char *description) { struct server* sNode; - (void)numeric; sNode = calloc(1, sizeof(*sNode)); sNode->uplink = uplink; --- 42,48 ---- struct server * ! AddServer(struct server *uplink, const char *name, int hops, time_t boot, time_t link, UNUSED_ARG(const char *numeric), const char *description) { struct server* sNode; sNode = calloc(1, sizeof(*sNode)); sNode->uplink = uplink; *************** *** 366,371 **** void ! irc_wallchops(struct userNode *from, const char *to, const char *message) { ! (void)from; (void)to; (void)message; } --- 365,369 ---- void ! irc_wallchops(UNUSED_ARG(struct userNode *from), UNUSED_ARG(const char *to), UNUSED_ARG(const char *message)) { } *************** *** 444,451 **** void ! irc_settime(const char *srv_name_mask, time_t new_time) { /* Bahamut has nothing like this, so ignore it. */ - (void)srv_name_mask; } --- 442,448 ---- void ! irc_settime(UNUSED_ARG(const char *srv_name_mask), UNUSED_ARG(time_t new_time)) { /* Bahamut has nothing like this, so ignore it. */ } *************** *** 596,600 **** unsigned int nn, mm; - (void)origin; uplink_capab = 0; for(nn=1; nn<argc; nn++) { --- 593,596 ---- *************** *** 701,705 **** if (argc < 5) return 0; if ((atoi(argv[1]) < 3) || (atoi(argv[2]) > 3)) return 0; - (void)origin; /* TODO: something with the timestamp we get from the other guy */ return 1; --- 697,700 ---- *************** *** 718,722 **** static CMD_FUNC(cmd_burst) { struct server *sender = GetServerH(origin); - (void)argv; if (!sender) return 0; if (argc == 1) return 1; --- 713,716 ---- *************** *** 759,763 **** unsigned char *nick, *nickend; - (void)origin; if ((argc == 3) && (uNode = GetUserH(origin))) { /* normal JOIN */ --- 753,756 ---- *************** *** 837,841 **** static CMD_FUNC(cmd_topic) { struct chanNode *cn; - (void)origin; if (argc < 5) return 0; if (!(cn = GetChannel(argv[1]))) { --- 830,833 ---- *************** *** 863,867 **** struct userNode *un; - (void)argv; if (!(un = GetUserH(origin))) { log(MAIN_LOG, LOG_ERROR, "Unable to find user %s sending AWAY\n", origin); --- 855,858 ---- *************** *** 899,903 **** static CMD_FUNC(cmd_pong) { - (void)origin; if (argc < 3) return 0; if (!strcmp(argv[2], self->name)) { --- 890,893 ---- *************** *** 924,928 **** static CMD_FUNC(cmd_squit) { ! (void)argc; (void)argv; (void)origin; return 0; /* TODO: cmd_squit() */ } --- 914,918 ---- static CMD_FUNC(cmd_squit) { ! return 0; /* TODO: cmd_squit() */ } *************** *** 930,934 **** { struct userNode *target, *dest; - (void)origin; if (argc < 4) return 0; if (!(target = GetUserH(argv[1]))) return 0; --- 920,923 ---- Index: proto-common.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-common.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** proto-common.c 13 Jul 2003 19:11:02 -0000 1.31 --- proto-common.c 22 Jul 2003 18:32:20 -0000 1.32 *************** *** 267,271 **** } ! #define CMD_FUNC(NAME) int NAME(const unsigned char *origin, unsigned int argc, unsigned char *argv[]) typedef CMD_FUNC(cmd_func_t); --- 267,271 ---- } ! #define CMD_FUNC(NAME) int NAME(UNUSED_ARG(const unsigned char *origin), UNUSED_ARG(unsigned int argc), UNUSED_ARG(unsigned char *argv[])) typedef CMD_FUNC(cmd_func_t); *************** *** 275,282 **** * the queue at any given time). */ void ! timed_send_ping(void *data) { - (void)data; - irc_ping(self->name); timeq_add(now + ping_timeout, timed_ping_timeout, 0); --- 275,280 ---- * the queue at any given time). */ void ! timed_send_ping(UNUSED_ARG(void *data)) { irc_ping(self->name); timeq_add(now + ping_timeout, timed_ping_timeout, 0); *************** *** 284,291 **** static void ! timed_ping_timeout(void *data) { - (void)data; - /* Uplink "health" tracking could be accomplished by counting the number of ping timeouts that happen for each uplink. After the --- 282,287 ---- static void ! timed_ping_timeout(UNUSED_ARG(void *data)) { /* Uplink "health" tracking could be accomplished by counting the number of ping timeouts that happen for each uplink. After the *************** *** 300,304 **** if (argc < 2) return 0; - (void)origin; true_pass = cManager.uplink->their_password; if (true_pass && strcmp(true_pass, argv[1])) { --- 296,299 ---- *************** *** 316,320 **** static CMD_FUNC(cmd_dummy) { - (void)origin; (void)argc; (void)argv; /* we don't care about these messages */ return 1; --- 311,314 ---- *************** *** 323,328 **** static CMD_FUNC(cmd_error) { - (void)argc; (void)origin; - if (argv[1]) log_module(MAIN_LOG, LOG_ERROR, "Error: %s", argv[1]); log_module(MAIN_LOG, LOG_ERROR, "Error received from uplink, squitting."); --- 317,320 ---- *************** *** 390,394 **** { struct userNode *user; - (void)argc; (void)argv; if (!(user = GetUserH(origin))) { log_module(MAIN_LOG, LOG_ERROR, "Could not find VERSION origin user %s", origin); --- 382,385 ---- *************** *** 404,408 **** struct string_list *slist; - (void)argc; (void)argv; if (!(user = GetUserH(origin))) { log_module(MAIN_LOG, LOG_ERROR, "Could not find ADMIN origin user %s", origin); --- 395,398 ---- Index: proto-p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto-p10.c,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -r1.69 -r1.70 *** proto-p10.c 21 Jul 2003 21:51:54 -0000 1.69 --- proto-p10.c 22 Jul 2003 18:32:20 -0000 1.70 *************** *** 412,424 **** void ! irc_regnick(struct userNode *user) { - (void)user; } void ! irc_nick(struct userNode *user, const char *old_nick) { - (void)old_nick; putsock("%s " P10_NICK " %s "FMT_TIME_T, user->numeric, user->nick, now); } --- 412,422 ---- void ! irc_regnick(UNUSED_ARG(struct userNode *user)) { } void ! irc_nick(struct userNode *user, UNUSED_ARG(const char *old_nick)) { putsock("%s " P10_NICK " %s "FMT_TIME_T, user->numeric, user->nick, now); } *************** *** 798,802 **** struct server *sender; dict_iterator_t it; - (void)argc; (void)argv; /* we don't care about these */ if (!(sender = GetServerH(origin))) return 0; --- 796,799 ---- *************** *** 819,823 **** { extern time_t burst_begin; - (void)argc; (void)argv; /* we don't care about these */ if (GetServerH(origin) == self->uplink) { --- 816,819 ---- *************** *** 849,853 **** { /* Go back to original IRC length .. and try to reconnect :/ */ - (void)origin; (void)argc; (void)argv; change_nicklen(9); irc_squit(self, "Got erroneous nickname, truncating nicks.", NULL); --- 845,848 ---- *************** *** 920,924 **** static CMD_FUNC(cmd_pong) { - (void)origin; if (argc < 3) return 0; if (!strcmp(argv[2], self->name)) { --- 915,918 ---- *************** *** 982,986 **** time_t in_timestamp; - (void)origin; if (argc < 3) return 0; modes[0] = 0; --- 976,979 ---- *************** *** 1147,1151 **** static struct chanNode *cn; - (void)origin; if (!argv[0]) return 0; /* huh? */ if (argv[2]) { --- 1140,1143 ---- *************** *** 1196,1200 **** { struct userNode *user; - (void)origin; if (argc < 2) return 0; if (!(user = GetUser(argv[1]))) { --- 1188,1191 ---- *************** *** 1240,1244 **** struct server *server; - (void)origin; if (argc < 4) return 0; if (!(server = GetServerH(argv[1]))) return 0; --- 1231,1234 ---- *************** *** 1285,1289 **** struct userNode *uNode; - (void)argv; uNode = GetUserH(origin); if (!uNode) return 1; --- 1275,1278 ---- *************** *** 1312,1316 **** { struct userNode *target, *dest; - (void)origin; if (argc < 4) return 0; if (!(target = GetUserN(argv[1]))) return 0; --- 1301,1304 ---- Index: saxdb.c =================================================================== RCS file: /cvsroot/srvx/services/src/saxdb.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** saxdb.c 7 Jul 2003 16:29:34 -0000 1.29 --- saxdb.c 22 Jul 2003 18:32:20 -0000 1.30 *************** *** 238,242 **** } #else ! #define saxdb_pre_object(DEST) (void)DEST #endif --- 238,242 ---- } #else ! #define saxdb_pre_object(DEST) #endif *************** *** 390,394 **** struct timeval start, stop; - (void)argv; gettimeofday(&start, NULL); saxdb_write_all(); --- 390,393 ---- *************** *** 409,413 **** unsigned int ii; - (void)argv; tbl.length = dict_size(saxdbs) + 1; tbl.width = 5; --- 408,411 ---- Index: sendmail.c =================================================================== RCS file: /cvsroot/srvx/services/src/sendmail.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sendmail.c 7 Jul 2003 16:29:34 -0000 1.12 --- sendmail.c 22 Jul 2003 18:32:20 -0000 1.13 *************** *** 272,276 **** int found = 0; - (void)argv; for (it=dict_first(prohibited_addrs); it; it=iter_next(it)) { reply(MODMSG_PROHIBITED_EMAIL, iter_key(it), (const char*)iter_data(it)); --- 272,275 ---- Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** sockcheck.c 10 Jul 2003 23:04:57 -0000 1.89 --- sockcheck.c 22 Jul 2003 18:32:20 -0000 1.90 *************** *** 934,938 **** static void ! sockcheck_clean_cache(void *data) { dict_t curr_clients; --- 934,938 ---- static void ! sockcheck_clean_cache(UNUSED_ARG(void *data)) { dict_t curr_clients; *************** *** 942,946 **** int max_age; - (void)data; if (SOCKCHECK_DEBUG) { struct string_buffer sb; --- 942,945 ---- |
From: Entrope <en...@us...> - 2003-07-22 18:30:05
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv13139/src Modified Files: helpfile.c Log Message: fix the line-wrapping bug reported by PsyberS Index: helpfile.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpfile.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** helpfile.c 7 Jul 2003 16:29:33 -0000 1.62 --- helpfile.c 22 Jul 2003 18:30:01 -0000 1.63 *************** *** 229,236 **** */ pos--; ! ch = input.list[ipos]; ! while (ch && (ch != ' ') && (pos < MAX_LINE_SIZE)) { line[pos++] = ch; - ipos++; } } --- 229,236 ---- */ pos--; ! for (ch = input.list[--ipos]; ! ch && (ch != ' ') && (pos < MAX_LINE_SIZE); ! ch = input.list[++ipos]) { line[pos++] = ch; } } |