srvx-commits Mailing List for srvx IRC Services (Page 83)
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: Miles P. <pet...@us...> - 2001-09-03 06:00:24
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv16337 Modified Files: Tag: rel-1_0 getopt.c Log Message: some builds of gcc complain.. must be a libc difference on some OS's. Index: getopt.c =================================================================== RCS file: /cvsroot/srvx/services/src/getopt.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -r1.4 -r1.4.2.1 *** getopt.c 2001/02/19 05:05:37 1.4 --- getopt.c 2001/09/03 06:00:22 1.4.2.1 *************** *** 803,807 **** if (!strncmp (p->name, nextchar, nameend - nextchar)) { ! if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ --- 803,807 ---- if (!strncmp (p->name, nextchar, nameend - nextchar)) { ! if ((size_t) (nameend - nextchar) == (size_t) strlen (p->name)) { /* Exact match found. */ |
From: Miles P. <pet...@us...> - 2001-09-02 06:52:09
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv1712 Modified Files: Tag: rel-1_0 chanserv.c Log Message: fix !ping when toys are disabled (for Privilaged anyways) Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.161.2.81 retrieving revision 1.161.2.82 diff -C2 -r1.161.2.81 -r1.161.2.82 *** chanserv.c 2001/09/01 03:03:33 1.161.2.81 --- chanserv.c 2001/09/02 06:52:04 1.161.2.82 *************** *** 4324,4327 **** --- 4324,4333 ---- case 'n': chanserv_notice(user, CSMSG_PING_RESPONSE); break; + case 'd': { + if (IsPrivileged(user)) { + irc_privmsg(chanserv->numeric, channel->name, response); + } + break; + } } } else { |
From: Paul C. <zo...@us...> - 2001-09-01 03:03:36
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv28077/src Modified Files: Tag: rel-1_0 chanserv.c Log Message: Fix the tagging of commands executed with security override so access levels are compared, instead of simply checking for access. Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.161.2.80 retrieving revision 1.161.2.81 diff -C2 -r1.161.2.80 -r1.161.2.81 *** chanserv.c 2001/08/31 16:46:01 1.161.2.80 --- chanserv.c 2001/09/01 03:03:33 1.161.2.81 *************** *** 706,709 **** --- 706,711 ---- } + /* We have to put the PubCmd check here, before channel is + set to the channel in the argument, if any. */ if(channel && channel->channel_info && !(cmd->flags & CMD_PUBLIC_OVERRIDE)) { *************** *** 849,854 **** { /* Make sure the user doesn't have access to the channel ! before flagging the entry. */ ! if(!GetChannelAccess(channel->channel_info, user->handle_info)) { index += sprintf(buffer + index, " [override]"); --- 851,858 ---- { /* Make sure the user doesn't have access to the channel ! before flagging the entry. uData is guaranteed to be ! valid if _CMD_REQUIRE_ACCESS is on due to the check ! above. */ ! if(uData->access < cmd->access) { index += sprintf(buffer + index, " [override]"); |
From: Miles P. <pet...@us...> - 2001-09-01 00:15:35
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv2605 Modified Files: Tag: rel-1_0 opserv.help Log Message: document the gsync command Index: opserv.help =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.help,v retrieving revision 1.24.2.13 retrieving revision 1.24.2.14 diff -C2 -r1.24.2.13 -r1.24.2.14 *** opserv.help 2001/08/16 02:39:18 1.24.2.13 --- opserv.help 2001/09/01 00:15:29 1.24.2.14 *************** *** 149,152 **** --- 149,156 ---- "$bISSUER$b handle Looks for glines issued by the given handle.", "$bAFTER$b interval Looks for glines that expire more than $binterval$b in the future."); + "GSYNC" ("$bGSYNC$b", + "/msg $O GSYNC [server]", + "Requests a list of GLINES from its uplink or the specified server. This can be used in the event srvx is down for period and becomes desynced.", + "$uSee Also:$u refreshg, gline, ungline"); "HELP" ("$bHELP$b", "/msg $O HELP [topic/command]", *************** *** 261,265 **** "/msg $O REFRESHG ", "Re-issues all GLINES in $b$O's$b database. Usually used for newly joining or desynched servers.", ! "$uSee Also:$u gline, ungline"); "REOPEN" ("$bREOPEN$b", "/msg $O REOPEN", --- 265,269 ---- "/msg $O REFRESHG ", "Re-issues all GLINES in $b$O's$b database. Usually used for newly joining or desynched servers.", ! "$uSee Also:$u gline, ungline, gsync"); "REOPEN" ("$bREOPEN$b", "/msg $O REOPEN", |
From: Adrian D. <sai...@us...> - 2001-08-31 17:18:57
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv28948/src Modified Files: Tag: rel-1_0 chanserv.c Log Message: Prevent crash when unregistering an empty chan Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.161.2.79 retrieving revision 1.161.2.80 diff -C2 -r1.161.2.79 -r1.161.2.80 *** chanserv.c 2001/08/21 04:49:19 1.161.2.79 --- chanserv.c 2001/08/31 16:46:01 1.161.2.80 *************** *** 1675,1683 **** } if(channel) /* not suspended */ { DelChannelUser(chanserv, channel, reason, 0); } - unregister_channel(channel->channel_info); chanserv_notice(user, CSMSG_UNREG_SUCCESS, name); --- 1675,1683 ---- } + unregister_channel(channel->channel_info); if(channel) /* not suspended */ { DelChannelUser(chanserv, channel, reason, 0); } chanserv_notice(user, CSMSG_UNREG_SUCCESS, name); |
From: Miles P. <pet...@us...> - 2001-08-30 03:16:53
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv28463 Modified Files: Tag: rel-1_0 main.c Log Message: shave a little extra time off the burst Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.94.2.11 retrieving revision 1.94.2.12 diff -C2 -r1.94.2.11 -r1.94.2.12 *** main.c 2001/08/05 19:14:30 1.94.2.11 --- main.c 2001/08/30 03:16:47 1.94.2.12 *************** *** 470,474 **** } /* run timeq after reading socket input */ ! timeq_run(now); } else if (errno != EINTR){ log(MAIN_LOG, LOG_ERROR, "select(): %s\n", strerror(errno)); --- 470,474 ---- } /* run timeq after reading socket input */ ! if (cManager.uplink->state == CONNECTED) timeq_run(now); } else if (errno != EINTR){ log(MAIN_LOG, LOG_ERROR, "select(): %s\n", strerror(errno)); |
From: Entrope <en...@us...> - 2001-08-29 15:14:44
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv14756/src Modified Files: proto_bahamut.h proto.h chanserv.h chanserv.c Log Message: allow ChanServ to run in out-of-channel mode support auto-invite for users when they auth Index: proto_bahamut.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto_bahamut.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** proto_bahamut.h 2001/08/24 21:05:31 1.6 --- proto_bahamut.h 2001/08/29 15:14:40 1.7 *************** *** 28,31 **** --- 28,32 ---- #define PROTO_USER_MODE_CHARS " h" #define PROTO_CHANNEL_MODE_CHARS " rRcO" + #define CHANSERV_JOINS_CHANNELS 0 struct userNode_proto { Index: proto.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** proto.h 2001/08/24 21:05:31 1.39 --- proto.h 2001/08/29 15:14:40 1.40 *************** *** 79,82 **** --- 79,86 ---- #endif + #ifndef CHANSERV_JOINS_CHANNELS + #define CHANSERV_JOINS_CHANNELS 1 + #endif + /********************/ /* PROTOCOL SPEWING */ Index: chanserv.h =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** chanserv.h 2001/08/19 03:06:09 1.34 --- chanserv.h 2001/08/29 15:14:40 1.35 *************** *** 48,51 **** --- 48,52 ---- optGreet, optToys, + optAutoInvite, optMax }; *************** *** 75,79 **** #define CHANNEL_DEFAULT_FLAGS (CHANNEL_INFO_LINES) ! #define CHANNEL_DEFAULT_OPTIONS "lmoaaanp" #define IsProtected(x) ((x)->flags & CHANNEL_NODELETE) --- 76,80 ---- #define CHANNEL_DEFAULT_FLAGS (CHANNEL_INFO_LINES) ! #define CHANNEL_DEFAULT_OPTIONS "lmoaaanpn" #define IsProtected(x) ((x)->flags & CHANNEL_NODELETE) Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -r1.181 -r1.182 *** chanserv.c 2001/08/24 20:33:45 1.181 --- chanserv.c 2001/08/29 15:14:40 1.182 *************** *** 1176,1179 **** --- 1176,1180 ---- } + #if CHANSERV_JOINS_CHANNELS void chanserv_join(struct chanData *cData) { *************** *** 1181,1189 **** --- 1182,1197 ---- AddChannelOp(1, &cData->bot, cData->channel, cData->bot, 1); } + #else + #define chanserv_join(x) + #endif + #if CHANSERV_JOIN_CHANNELS void chanserv_part(struct chanData *cData, char *reason) { DelChannelUser(cData->bot, cData->channel, reason, 0); } + #else + #define chanserv_part(x, r) + #endif static struct userData* *************** *** 4204,4207 **** --- 4212,4229 ---- } + static OPTION_FUNC(opt_invite) + { + struct valueData values[] = + { + {"Peons and above will be auto-invited", 'p'}, + {"Ops and above will be auto-invited", 'o'}, + {"Masters and above will be auto-invited", 'm'}, + {"Coowners and above will be auto-invited", 'c'}, + {"Owners will be auto-invited", 'w'}, + {"No one will be auto-invited", 'n'} + }; + MULTIPLE_OPTION("Invite ", "auto-invite", optAutoInvite); + } + static CHANSERV_FUNC(cmd_set) { *************** *** 4214,4218 **** opt_topic, opt_greeting, opt_modes, opt_pubcmd, opt_strictop, opt_autoop, opt_enfmodes, opt_enftopic, opt_protect, opt_toys, ! opt_voice, opt_greet, opt_greetusers, opt_userinfo, opt_dynlimit, opt_topicsnarf, opt_nodelete }; --- 4236,4241 ---- opt_topic, opt_greeting, opt_modes, opt_pubcmd, opt_strictop, opt_autoop, opt_enfmodes, opt_enftopic, opt_protect, opt_toys, ! opt_invite, ! opt_voice, opt_greet, opt_greetusers, opt_userinfo, opt_dynlimit, opt_topicsnarf, opt_nodelete }; *************** *** 4608,4626 **** for(channel = user->handle_info->channels; channel; channel = channel->next) { ! struct chanNode *cn = channel->channel->channel; ! if(!cn || IsSuspended(channel->channel) || !GetUserMode(cn, user)) continue; ! if(channel->user->access >= ulMaster) ! { ! channel->channel->visited = now; ! } ! if(validate_auto_op(user, cn)) ! { ! AddChannelOp(1, &user, cn, channel->channel->bot, 1); } - - channel->user->seen = now; - channel->user->present = 1; } } --- 4631,4656 ---- for(channel = user->handle_info->channels; channel; channel = channel->next) { ! struct chanNode *cn; ! if(IsSuspended(channel->channel)) continue; ! if(!(cn = channel->channel->channel)) continue; ! if (GetUserMode(cn, user)) { ! if(channel->user->access >= ulMaster) ! { ! channel->channel->visited = now; ! } ! if(validate_auto_op(user, cn)) ! { ! AddChannelOp(1, &user, cn, channel->channel->bot, 1); ! } ! channel->user->seen = now; ! channel->user->present = 1; ! } else { ! char value = channel->channel->options[optAutoInvite]; ! if((value!='n') && (channel->user->access >= user_level(value))) { ! irc_invite(channel->channel->bot, user, cn); ! } } } } *************** *** 5283,5289 **** --- 5313,5321 ---- dict_insert(sChannels, cData->name, cData); } else { + #if CHANSERV_JOINS_CHANNELS cData->channel = AddChannel(cData->name, now, NULL, NULL, 0); AddChannelUser(cData->bot, cData->channel, 1); cData->channel->channel_info = cData; + #endif } cData->next = channelList; *************** *** 5636,5643 **** --- 5668,5677 ---- if(!suspender) { + #if CHANSERV_JOINS_CHANNELS /* chanserv_join() cannot be used here. The channel has to be created and join manually. */ cNode = AddChannel(key, now, NULL, NULL, 0); AddChannelUser(uNode, cNode, 1); + #endif } else *************** *** 6346,6350 **** --- 6380,6386 ---- DEFINE_COMMAND(unregister, CMD_REQUIRE_REGISTERED | CMD_SUSPEND_OVERRIDE, ulOwner); DEFINE_COMMAND(move, CMD_REQUIRE_PRIVILEGE | CMD_REQUIRE_REGISTERED, ulOwner); + #if CHANSERV_JOINS_CHANNELS DEFINE_COMMAND(opchan, CMD_REQUIRE_PRIVILEGE | CMD_REQUIRE_CHANNEL, ulOwner); + #endif #if TRANSITION DEFINE_COMMAND(switch, CMD_REQUIRE_HANDLE | CMD_REQUIRE_CHANNEL, ulNone); |
From: Entrope <en...@us...> - 2001-08-27 13:53:23
|
Update of /cvsroot/srvx/services/doc In directory usw-pr-cvs1:/tmp/cvs-serv16189 Removed Files: Tag: rel-1_0 AUTHORS HISTORY p10.html Log Message: Remove deprecated files that escaped slaying on the branch --- AUTHORS DELETED --- --- HISTORY DELETED --- --- p10.html DELETED --- |
From: Miles P. <pet...@us...> - 2001-08-26 04:09:25
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv2735 Modified Files: Tag: rel-1_0 AUTHORS Log Message: last commit for tonight, i swear. Index: AUTHORS =================================================================== RCS file: /cvsroot/srvx/services/AUTHORS,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -r1.7.2.1 -r1.7.2.2 *** AUTHORS 2001/03/28 22:41:53 1.7.2.1 --- AUTHORS 2001/08/26 04:09:23 1.7.2.2 *************** *** 1,4 **** ! You can find us on irc.gamesnet.net in #services ! ------------------------------------------------ Project Admins: --- 1,4 ---- ! You can find us on irc.gamesnet.net in #srvx ! -------------------------------------------- Project Admins: |
From: Miles P. <pet...@us...> - 2001-08-26 04:09:25
|
Update of /cvsroot/srvx/services/doc In directory usw-pr-cvs1:/tmp/cvs-serv2735/doc Modified Files: Tag: rel-1_0 AUTHORS Log Message: last commit for tonight, i swear. Index: AUTHORS =================================================================== RCS file: /cvsroot/srvx/services/doc/Attic/AUTHORS,v retrieving revision 1.1.1.1.4.1 retrieving revision 1.1.1.1.4.2 diff -C2 -r1.1.1.1.4.1 -r1.1.1.1.4.2 *** AUTHORS 2001/08/26 04:07:25 1.1.1.1.4.1 --- AUTHORS 2001/08/26 04:09:23 1.1.1.1.4.2 *************** *** 1,4 **** ! You can find us on irc.gamesnet.net in #services ! ------------------------------------------------ Project Admins: --- 1,4 ---- ! You can find us on irc.gamesnet.net in #srvx ! -------------------------------------------- Project Admins: |
From: Miles P. <pet...@us...> - 2001-08-26 04:07:27
|
Update of /cvsroot/srvx/services/doc In directory usw-pr-cvs1:/tmp/cvs-serv2299 Modified Files: Tag: rel-1_0 HISTORY AUTHORS Log Message: update horridly out of date doc directory.. DevilM hasn't been project lead in over a year! (really old AUTHORS file) Index: HISTORY =================================================================== RCS file: /cvsroot/srvx/services/doc/Attic/HISTORY,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.4.1 diff -C2 -r1.1.1.1 -r1.1.1.1.4.1 *** HISTORY 2000/05/25 16:06:59 1.1.1.1 --- HISTORY 2001/08/26 04:07:23 1.1.1.1.4.1 *************** *** 1,2 **** --- 1,31 ---- + 08/08/2001 + - Moved project from gnetservices to srvx on + sourceforge. + + 07/14/2001 + - Released 0.9.7. + + 07/09/2001 + - srvx goes live on GamesNET, finally! + + 03/29/2001 + - Gave the project a name.. srvx. + + 03/21/2000 + - Released 0.9.5. Initial beta testing on + GamesNET begins. + + 01/30/2000 + - Released 0.9. + + 12/05/2000 + - Released 0.7. + + 07/06/2000 + - Released 0.2. + + 06/13/2000 + - Released 0.1. + 04/17/2000 - Released 0.1pre1, program base intact but needs Index: AUTHORS =================================================================== RCS file: /cvsroot/srvx/services/doc/Attic/AUTHORS,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.4.1 diff -C2 -r1.1.1.1 -r1.1.1.1.4.1 *** AUTHORS 2000/05/25 16:06:59 1.1.1.1 --- AUTHORS 2001/08/26 04:07:25 1.1.1.1.4.1 *************** *** 1,11 **** ! Project Lead: ! DevilM (de...@ga...) ! Programmers: ! def (de...@vt...) ! wolfer (hu...@ga...) ! Jedi (je...@ga...) ! Portal (po...@vt...) ! Contributors: ! wik --- 1,25 ---- ! You can find us on irc.gamesnet.net in #services ! ------------------------------------------------ ! Project Admins: ! def (de...@vt...) ! Entrope (en...@cl...) ! Zoot (zo...@pl...) ! Coders: ! Zoot (zo...@pl...) ! Entrope (en...@cl...) ! def (de...@vt...) ! Jedi (je...@tu...) ! Portal (po...@vt...) ! ! Code Contributors: ! SailorFrag[BTEG] (sa...@sa...) ! hunnr (hu...@ga...) ! DevilM ! wik ! ! Documentation: ! Phooeybane (pho...@tf...) ! SailorFrag[BTEG] (sa...@sa...) ! Seldon |
From: Miles P. <pet...@us...> - 2001-08-26 03:43:40
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv29997 Modified Files: Tag: rel-1_0 Makefile.am configure.in INSTALL Log Message: working 'make install' now. it will install the help files and sample conf/sockcheck.db as well as the binary. changed bin_PROGRAMS to noinst_PROGRAMS to prevent binary from being put in 'bin' directory. toplevel Makefile installs it now. Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/Makefile.am,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -C2 -r1.9.2.3 -r1.9.2.4 *** Makefile.am 2001/07/09 15:58:45 1.9.2.3 --- Makefile.am 2001/08/26 03:43:35 1.9.2.4 *************** *** 9,10 **** --- 9,23 ---- srvx: src/srvx cp src/srvx src/*.help . + + install-exec-local: + $(INSTALL) -d -m 755 $(prefix) + $(INSTALL) -m 744 src/srvx $(prefix) + $(INSTALL) -m 644 src/*.help $(prefix) + $(INSTALL) -m 600 srvx.conf.example $(prefix) + $(INSTALL) -m 644 sockcheck.db.example $(prefix) + mv $(prefix)/bin/srvx $(prefix) + @echo + @echo srvx-$(VERSION) has been installed to $(prefix) + @echo Remember to edit srvx.conf.example and sockcheck.db.example + @echo And of course, bin/srvx --help before starting. + @echo Index: configure.in =================================================================== RCS file: /cvsroot/srvx/services/Attic/configure.in,v retrieving revision 1.39.2.16 retrieving revision 1.39.2.17 diff -C2 -r1.39.2.16 -r1.39.2.17 *** configure.in 2001/08/12 22:18:58 1.39.2.16 --- configure.in 2001/08/26 03:43:35 1.39.2.17 *************** *** 10,13 **** --- 10,15 ---- AM_MAINTAINER_MODE + AC_PREFIX_DEFAULT(~/srvx-0.9.7) + dnl Sanity checks. AC_LANG_C Index: INSTALL =================================================================== RCS file: /cvsroot/srvx/services/INSTALL,v retrieving revision 1.15.2.7 retrieving revision 1.15.2.8 diff -C2 -r1.15.2.7 -r1.15.2.8 *** INSTALL 2001/08/10 03:50:12 1.15.2.7 --- INSTALL 2001/08/26 03:43:35 1.15.2.8 *************** *** 46,54 **** 2) Run the configure script (sh configure), it will verify that your ! system will have the resources needed for srvx to compile. 3) On some systems you may need to edit the Makefile in order for it to compile correctly. Includes, and other such things may ! reside in other directories. 4) You may optionally edit config.h incase the configure script made a --- 46,58 ---- 2) Run the configure script (sh configure), it will verify that your ! system will have the resources needed for srvx to compile. If you ! would like to change the path where srvx will be installed to, ! execute configure with the --prefix=/path option. The default path ! is ~/srvx-X.X.X/, with the X's representing the version. 3) On some systems you may need to edit the Makefile in order for it to compile correctly. Includes, and other such things may ! reside in other directories. Most likely the Makefile won't require ! any modifications. 4) You may optionally edit config.h incase the configure script made a *************** *** 59,76 **** section and follow the instructions. ! 6) Copy sockcheck.db.example to sockcheck.db (and edit to add new proxy types, if you wish). ! 7) Copy srvx.conf.example to srvx.conf and edit to suit your needs. Any errors in the config file will be made aware to you once you start the daemon. ! 8) You can now begin using your service bots. You can debug by running it with '-fV', it will not background itself, and it will be fairly verbose. If you would like to run in the foreground ! with no verbosity, use the '-V' flag. If you just want to run it, execute srvx without any flags. ! 9) Once you have srvx started, you'll need to register a NickServ handle. Make sure that you register the first handle - it is automatically granted certain privileges and gives you root-level --- 63,83 ---- section and follow the instructions. ! 6) You may now either type "make install" to install it to your ! installation path, or work from your build directory, either is fine. ! ! 7) Copy sockcheck.db.example to sockcheck.db (and edit to add new proxy types, if you wish). ! 8) Copy srvx.conf.example to srvx.conf and edit to suit your needs. Any errors in the config file will be made aware to you once you start the daemon. ! 9) You can now begin using your service bots. You can debug by running it with '-fV', it will not background itself, and it will be fairly verbose. If you would like to run in the foreground ! with no verbosity, use the '-f' flag. If you just want to run it, execute srvx without any flags. ! 10) Once you have srvx started, you'll need to register a NickServ handle. Make sure that you register the first handle - it is automatically granted certain privileges and gives you root-level |
From: Miles P. <pet...@us...> - 2001-08-26 03:43:39
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv29997/src Modified Files: Tag: rel-1_0 Makefile.am Log Message: working 'make install' now. it will install the help files and sample conf/sockcheck.db as well as the binary. changed bin_PROGRAMS to noinst_PROGRAMS to prevent binary from being put in 'bin' directory. toplevel Makefile installs it now. Index: Makefile.am =================================================================== RCS file: /cvsroot/srvx/services/src/Makefile.am,v retrieving revision 1.26.2.8 retrieving revision 1.26.2.9 diff -C2 -r1.26.2.8 -r1.26.2.9 *** Makefile.am 2001/08/05 04:19:12 1.26.2.8 --- Makefile.am 2001/08/26 03:43:35 1.26.2.9 *************** *** 2,6 **** LIBS = @LIBS@ @RX_LIBS@ ! bin_PROGRAMS = srvx EXTRA_PROGRAMS = checkdb globtest pwcracker EXTRA_DIST = nickserv.help opserv.help chanserv.help --- 2,6 ---- LIBS = @LIBS@ @RX_LIBS@ ! noinst_PROGRAMS = srvx EXTRA_PROGRAMS = checkdb globtest pwcracker EXTRA_DIST = nickserv.help opserv.help chanserv.help |
From: Miles P. <pet...@us...> - 2001-08-25 20:56:42
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv12817 Modified Files: Tag: rel-1_0 sockcheck.c Log Message: only set a reason int he decision if they fail. if connect() fails ont he last test a NULL state is passed and they'll be accepted, no reason to deal with the reason if they are. Index: sockcheck.c =================================================================== RCS file: /cvsroot/srvx/services/src/sockcheck.c,v retrieving revision 1.54.2.26 retrieving revision 1.54.2.27 diff -C2 -r1.54.2.26 -r1.54.2.27 *** sockcheck.c 2001/08/18 23:25:12 1.54.2.26 --- sockcheck.c 2001/08/25 20:56:39 1.54.2.27 *************** *** 603,607 **** client->addr->decision = decision; client->addr->last_touched = tv_now.tv_sec; - client->addr->reason = client->state->template; if (decision == ACCEPT) { /* do nothing */ --- 603,606 ---- *************** *** 610,613 **** --- 609,613 ---- #endif } else if (decision == REJECT) { + client->addr->reason = client->state->template; proxies_detected++; sockcheck_issue_gline(client->addr); |
From: Entrope <en...@us...> - 2001-08-25 03:16:06
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv22356/src Modified Files: Tag: rel-1_0 opserv.c Log Message: when users join +badword channels, /KILL them instead of trying to take over the channel Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.187.2.50 retrieving revision 1.187.2.51 diff -C2 -r1.187.2.50 -r1.187.2.51 *** opserv.c 2001/08/24 03:13:37 1.187.2.50 --- opserv.c 2001/08/25 03:16:03 1.187.2.51 *************** *** 1976,1990 **** newchan->join_policer = policer_new(opserv_conf.join_policer_params, now); if ((newchan->bad_channel = opserv_bad_channel(newchan->name))) { ! AddChannelUser(opserv, newchan, 0); ! AddChannelOp(1, &opserv, newchan, self->numeric, 1); ! newchan->modes |= MODE_SECRET | MODE_INVITEONLY; ! irc_mode(self->numeric, newchan, "+sib *!*@*"); ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! KickChannelUser(mNode->user, newchan, opserv, OSMSG_ILLEGAL_REASON); ! } ! timeq_add(now + opserv_conf.purge_lock_delay, opserv_part_channel, newchan); return; } --- 1976,1999 ---- newchan->join_policer = policer_new(opserv_conf.join_policer_params, now); if ((newchan->bad_channel = opserv_bad_channel(newchan->name))) { ! if (newchan->name[0] == '#') { ! /* We can hack modes and ops and stuff */ ! AddChannelUser(opserv, newchan, 0); ! AddChannelOp(1, &opserv, newchan, self->numeric, 1); ! newchan->modes |= MODE_SECRET | MODE_INVITEONLY; ! irc_mode(self->numeric, newchan, "+sib *!*@*"); ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! KickChannelUser(mNode->user, newchan, opserv, OSMSG_ILLEGAL_REASON); ! } ! timeq_add(now + opserv_conf.purge_lock_delay, opserv_part_channel, newchan); ! } else { ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! DelUser(mNode->user, opserv, true, OSMSG_ILLEGAL_REASON); ! } ! } return; } *************** *** 2012,2017 **** { if (channel->bad_channel && !IsService(user)) { ! opserv_notice(user, OSMSG_ILLEGAL_CHANNEL, channel->name); ! KickChannelUser(user, channel, opserv, OSMSG_ILLEGAL_REASON); } --- 2021,2030 ---- { if (channel->bad_channel && !IsService(user)) { ! if (channel->name[0] == '#') { ! opserv_notice(user, OSMSG_ILLEGAL_CHANNEL, channel->name); ! KickChannelUser(user, channel, opserv, OSMSG_ILLEGAL_REASON); ! } else { ! DelUser(user, opserv, true, OSMSG_ILLEGAL_REASON); ! } } |
From: Miles P. <pet...@us...> - 2001-08-25 02:37:03
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv16273 Modified Files: configure.ac Log Message: tell which protocol we're building for (i like verbosity :) Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** configure.ac 2001/08/24 20:32:34 1.6 --- configure.ac 2001/08/25 02:36:57 1.7 *************** *** 4,8 **** dnl General initialization. ! AC_PREREQ(2.50) AC_INIT([srvx],[1.1.0]) AC_REVISION([$Id$]) --- 4,8 ---- dnl General initialization. ! AC_PREREQ(2.52) AC_INIT([srvx],[1.1.0]) AC_REVISION([$Id$]) *************** *** 231,234 **** --- 231,235 ---- [ AC_MSG_RESULT(no)]) + AC_MSG_CHECKING(which protocol to build) AC_ARG_ENABLE(proto, [ --enable-proto=PROTO IRC dialect to support (one of: ircu_p10, bahamut); default: ircu_p10], *************** *** 239,242 **** --- 240,244 ---- fi AC_DEFINE_UNQUOTED(PROTO_INCLUDE, "proto_${PROTO}.h", [Header file for IRC dialect support]) + AC_MSG_RESULT($PROTO) MY_SUBDIRS="" |
From: Entrope <en...@us...> - 2001-08-24 21:05:33
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv17862/src Modified Files: tools.c proto_ircu_p10.h proto_bahamut.h proto.h Log Message: okay, fix some mode bugs, and next time i'll test before committing Index: tools.c =================================================================== RCS file: /cvsroot/srvx/services/src/tools.c,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -r1.92 -r1.93 *** tools.c 2001/08/24 20:33:45 1.92 --- tools.c 2001/08/24 21:05:31 1.93 *************** *** 88,94 **** } ! static const unsigned char *user_modes = PROTO_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const unsigned char *channel_modes = PROTO_CHANNEL_MODE_CHARS; static unsigned char channel_inverse_modes[256]; --- 88,94 ---- } ! static const unsigned char *user_modes = RFC1459_USER_MODE_CHARS PROTO_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const unsigned char *channel_modes = RFC1459_CHANNEL_MODE_CHARS PROTO_CHANNEL_MODE_CHARS; static unsigned char channel_inverse_modes[256]; *************** *** 96,105 **** --- 96,112 ---- tools_build_inverse_modes(void) { unsigned int nn; + /* Go through and record which bit each character corresponds to. + * Since some modes don't exist in some protocols, the + * corresponding position in the *_modes string is a space; but we + * don't want to give spaces a value, so erase them afterwards. + */ for (nn=0; user_modes[nn]; nn++) { user_inverse_modes[user_modes[nn]] = nn + 1; } + user_inverse_modes[' '] = 0; for (nn=0; channel_modes[nn]; nn++) { channel_inverse_modes[channel_modes[nn]] = nn + 1; } + channel_inverse_modes[' '] = 0; } *************** *** 113,117 **** #define do_user_mode(FLAG) do { if (add) user->modes |= FLAG; else user->modes &= ~FLAG; } while (0) switch (modechar = *mode_change++) { ! case 0: return; case '+': add = 1; break; case '-': add = 0; break; --- 120,124 ---- #define do_user_mode(FLAG) do { if (add) user->modes |= FLAG; else user->modes &= ~FLAG; } while (0) switch (modechar = *mode_change++) { ! case 0: case ' ': return; case '+': add = 1; break; case '-': add = 0; break; *************** *** 146,153 **** make_usermode(struct userNode *user, char *out, unsigned int len) { ! unsigned int nn, jj; len--; /* to allow for \0 at end */ ! for (nn=jj=0; user_modes[nn] && (jj<len); nn++) { ! if (user->modes & (1 << nn)) out[jj++] = user_modes[nn]; } out[jj++] = 0; --- 153,163 ---- make_usermode(struct userNode *user, char *out, unsigned int len) { ! unsigned int nn, jj=0; len--; /* to allow for \0 at end */ ! out[jj++] = '+'; ! for (nn=0; user_modes[nn] && (jj<len); nn++) { ! if ((user_modes[nn] != ' ') && (user->modes & (1 << nn))) { ! out[jj++] = user_modes[nn]; ! } } out[jj++] = 0; *************** *** 167,173 **** while (1) { switch (modechar = *mode_change++) { ! case 0: ! case ' ': ! return; case '+': add = 1; break; case '-': add = 0; break; --- 177,181 ---- while (1) { switch (modechar = *mode_change++) { ! case 0: case ' ': return; case '+': add = 1; break; case '-': add = 0; break; *************** *** 215,222 **** make_chanmode(struct chanNode *channel, char *out, unsigned int len) { ! unsigned int nn, jj; len--; /* to allow for \0 at end */ ! for (nn=jj=0; channel_modes[nn] && (jj<len); nn++) { ! if (channel->modes & (1 << nn)) out[jj++] = channel_modes[nn]; } if (channel->limit || channel->key[0]) { --- 223,233 ---- make_chanmode(struct chanNode *channel, char *out, unsigned int len) { ! unsigned int nn, jj=0; len--; /* to allow for \0 at end */ ! out[jj++] = '+'; ! for (nn=0; channel_modes[nn] && (jj<len); nn++) { ! if ((channel_modes[nn] != ' ') && (channel->modes & (1 << nn))) { ! out[jj++] = channel_modes[nn]; ! } } if (channel->limit || channel->key[0]) { Index: proto_ircu_p10.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto_ircu_p10.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** proto_ircu_p10.h 2001/08/19 01:28:39 1.3 --- proto_ircu_p10.h 2001/08/24 21:05:31 1.4 *************** *** 31,36 **** #define PROTO_HAS_NUMERIC 1 ! #define PROTO_USER_MODES (RFC1459_USER_MODES|FLAGS_DEAF|FLAGS_SERVICE|FLAGS_GLOBAL|FLAGS_HELPER) ! #define PROTO_USER_MODE_CHARS RFC1459_USER_MODE_CHARS"dkgh" struct userNode_proto { --- 31,35 ---- #define PROTO_HAS_NUMERIC 1 ! #define PROTO_USER_MODE_CHARS "dkgh" struct userNode_proto { Index: proto_bahamut.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto_bahamut.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** proto_bahamut.h 2001/08/19 01:28:39 1.5 --- proto_bahamut.h 2001/08/24 21:05:31 1.6 *************** *** 24,32 **** #include "dict.h" - #define PROTO_CHANNEL_MODES (RFC1459_CHANNEL_MODES|MODE_REGISTERED|MODE_REGONLY|MODE_NOCOLOR|MODE_OPERONLY) /* note the spaces in *_MODE_CHARS; they are to cover for modes that ! * Bahamut doesn't support, but exist in successive bits of the mask ! */ ! #define PROTO_CHANNEL_MODE_CHARS RFC1459_CHANNEL_MODE_CHARS" rRcO" struct userNode_proto { --- 24,31 ---- #include "dict.h" /* note the spaces in *_MODE_CHARS; they are to cover for modes that ! * Bahamut doesn't support, but exist in successive bits of the mask */ ! #define PROTO_USER_MODE_CHARS " h" ! #define PROTO_CHANNEL_MODE_CHARS " rRcO" struct userNode_proto { Index: proto.h =================================================================== RCS file: /cvsroot/srvx/services/src/proto.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** proto.h 2001/08/19 03:06:09 1.38 --- proto.h 2001/08/24 21:05:31 1.39 *************** *** 67,83 **** #endif ! #ifndef PROTO_MODENODE_MODES ! #define PROTO_MODENODE_MODES RFC1459_MODENODE_MODES ! #define PROTO_MODENODE_MODE_CHARS RFC1459_MODENODE_MODE_CHARS #endif ! #ifndef PROTO_CHANNEL_MODES ! #define PROTO_CHANNEL_MODES RFC1459_CHANNEL_MODES ! #define PROTO_CHANNEL_MODE_CHARS RFC1459_CHANNEL_MODE_CHARS #endif ! #ifndef PROTO_USER_MODES ! #define PROTO_USER_MODES RFC1459_USER_MODES ! #define PROTO_USER_MODE_CHARS RFC1459_USER_MODE_CHARS #endif --- 67,80 ---- #endif ! #ifndef PROTO_MODENODE_MODE_CHARS ! #define PROTO_MODENODE_MODE_CHARS "" #endif ! #ifndef PROTO_CHANNEL_MODE_CHARS ! #define PROTO_CHANNEL_MODE_CHARS "" #endif ! #ifndef PROTO_USER_MODE_CHARS ! #define PROTO_USER_MODE_CHARS "" #endif |
From: Entrope <en...@us...> - 2001-08-24 20:33:48
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv10154/src Modified Files: tools.h tools.c proto_ircu_p10.c proto_bahamut.c opserv.c main.c chanserv.c Log Message: change make_usermode and make_chanmode to be generic tools Index: tools.h =================================================================== RCS file: /cvsroot/srvx/services/src/tools.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** tools.h 2001/08/19 03:06:09 1.11 --- tools.h 2001/08/24 20:33:45 1.12 *************** *** 35,39 **** void reg_oper_func(oper_func_t handler); ! void tools_cleanup(void); int getusermodes(char *sender); --- 35,39 ---- void reg_oper_func(oper_func_t handler); ! void tools_init(void); int getusermodes(char *sender); *************** *** 84,89 **** void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl); ! int make_chanmode(struct chanNode *chan, char *out, int len); ! int make_usermode(struct userNode *user, char *out, int len); char *intoa(unsigned long addr); --- 84,89 ---- void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl); ! int make_chanmode(struct chanNode *chan, char *out, unsigned int len); ! int make_usermode(struct userNode *user, char *out, unsigned int len); char *intoa(unsigned long addr); Index: tools.c =================================================================== RCS file: /cvsroot/srvx/services/src/tools.c,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -r1.91 -r1.92 *** tools.c 2001/08/19 03:06:09 1.91 --- tools.c 2001/08/24 20:33:45 1.92 *************** *** 88,106 **** } ! static const char *user_modes = PROTO_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const char *channel_modes = PROTO_CHANNEL_MODE_CHARS; static unsigned char channel_inverse_modes[256]; void mod_usermode(struct userNode *user, const char *mode_change) { int add = 1; if (!user || !mode_change || !*mode_change) return; while (1) { #define do_user_mode(FLAG) do { if (add) user->modes |= FLAG; else user->modes &= ~FLAG; } while (0) ! switch (*mode_change++) { ! /* TODO: update this to include the new Bahamut channel modes, ! * but to only support them #if (PROTOCOL_CHANMODE_BITS & MODE_foo) ! */ case 0: return; case '+': add = 1; break; --- 88,116 ---- } ! static const unsigned char *user_modes = PROTO_USER_MODE_CHARS; static unsigned char user_inverse_modes[256]; ! static const unsigned char *channel_modes = PROTO_CHANNEL_MODE_CHARS; static unsigned char channel_inverse_modes[256]; + static void + tools_build_inverse_modes(void) { + unsigned int nn; + for (nn=0; user_modes[nn]; nn++) { + user_inverse_modes[user_modes[nn]] = nn + 1; + } + for (nn=0; channel_modes[nn]; nn++) { + channel_inverse_modes[channel_modes[nn]] = nn + 1; + } + } + void mod_usermode(struct userNode *user, const char *mode_change) { int add = 1; + unsigned char modechar; + if (!user || !mode_change || !*mode_change) return; while (1) { #define do_user_mode(FLAG) do { if (add) user->modes |= FLAG; else user->modes &= ~FLAG; } while (0) ! switch (modechar = *mode_change++) { case 0: return; case '+': add = 1; break; *************** *** 124,133 **** if (add) invis_clients++; else invis_clients--; break; ! case 'w': do_user_mode(FLAGS_WALLOP); break; ! case 's': do_user_mode(FLAGS_SERVNOTICE); break; ! case 'd': do_user_mode(FLAGS_DEAF); break; ! case 'k': do_user_mode(FLAGS_SERVICE); break; ! case 'g': do_user_mode(FLAGS_GLOBAL); break; ! case 'h': do_user_mode(FLAGS_HELPER); break; } #undef do_user_mode --- 134,141 ---- if (add) invis_clients++; else invis_clients--; break; ! default: ! if (user_inverse_modes[modechar]) { ! do_user_mode((1 << (user_inverse_modes[modechar]-1))); ! } } #undef do_user_mode *************** *** 136,142 **** int ! make_usermode(struct userNode *user, char *out, int len) { ! /* TODO */ } --- 144,156 ---- int ! make_usermode(struct userNode *user, char *out, unsigned int len) { ! unsigned int nn, jj; ! len--; /* to allow for \0 at end */ ! for (nn=jj=0; user_modes[nn] && (jj<len); nn++) { ! if (user->modes & (1 << nn)) out[jj++] = user_modes[nn]; ! } ! out[jj++] = 0; ! return 1; } *************** *** 146,149 **** --- 160,164 ---- int add = 1, n; const char *word = mode_change; + unsigned char modechar; if (!mode_change || !*mode_change) return; *************** *** 151,158 **** while (*word == ' ') word++; while (1) { ! /* TODO: update this to include the new Bahamut channel modes, ! * but to only support them #if (PROTOCOL_CHANMODE_BITS & MODE_foo) ! */ ! switch (*mode_change++) { case 0: case ' ': --- 166,170 ---- while (*word == ' ') word++; while (1) { ! switch (modechar = *mode_change++) { case 0: case ' ': *************** *** 160,171 **** case '+': add = 1; break; case '-': add = 0; break; - #define do_chan_mode(FLAG) do { if (add) channel->modes |= FLAG; else channel->modes &= ~FLAG; } while (0) - case 'n': do_chan_mode(MODE_NOPRIVMSGS); break; - case 't': do_chan_mode(MODE_TOPICLIMIT); break; - case 's': do_chan_mode(MODE_SECRET); break; - case 'p': do_chan_mode(MODE_PRIVATE); break; - case 'i': do_chan_mode(MODE_INVITEONLY); break; - case 'm': do_chan_mode(MODE_MODERATED); break; - #undef do_chan_mode case 'k': if (add) { --- 172,175 ---- *************** *** 176,180 **** channel->key[n] = *word++; } - channel->key[n] = 0; } --- 180,183 ---- *************** *** 195,198 **** --- 198,211 ---- channel->limit = 0; } + break; + default: + if ((n = channel_inverse_modes[modechar])) { + if (add) { + channel->modes |= 1 << (n-1); + } else { + channel->modes &= ~(1 << (n-1)); + } + } + break; } } *************** *** 200,206 **** int ! make_chanmode(struct chanMode *chan, char *out, int len) { ! } --- 213,241 ---- int ! make_chanmode(struct chanNode *channel, char *out, unsigned int len) { ! unsigned int nn, jj; ! len--; /* to allow for \0 at end */ ! for (nn=jj=0; channel_modes[nn] && (jj<len); nn++) { ! if (channel->modes & (1 << nn)) out[jj++] = channel_modes[nn]; ! } ! if (channel->limit || channel->key[0]) { ! if (jj < len-2) { ! if (channel->limit) out[jj++] = 'l'; ! if (channel->key[0]) out[jj++] = 'k'; ! if (channel->limit) { ! if (jj < len) out[jj++] = ' '; ! jj += snprintf(out+jj, len-jj, "%d", channel->limit); ! if (jj >= len) jj = len-1; ! } ! if (channel->key[0]) { ! if (jj < len) out[jj++] = ' '; ! jj += snprintf(out+jj, len-jj, "%s", channel->key); ! if (jj >= len) jj = len-1; ! } ! } ! } ! out[jj++] = 0; ! return 1; } *************** *** 208,266 **** verify_chanmode(const char *modes) { ! const char *word = modes; ! int add = -1, res, limit; ! ! res = 1; if (!modes) return 0; if (!*modes) return 1; ! while (*word != ' ' && *word) word++; while (*word == ' ') word++; while (1) { ! switch (*modes++) { case 0: case ' ': ! return (add == -1) ? 0 : 1; ! case '+': ! add = 1; ! break; ! case '-': ! add = 0; ! break; ! case 'n': ! case 't': ! case 's': ! case 'p': ! case 'i': ! case 'm': ! break; ! case 'k': ! if(add && !*word) ! { ! return 0; ! } break; case 'l': ! if(add && !*word) ! { ! return 0; ! } ! ! limit = strtoul(word, NULL, 0); ! ! if(add && (!limit || limit < 0)) ! { ! return 0; ! } ! break; default: ! return 0; } } - - return 0; } --- 243,274 ---- verify_chanmode(const char *modes) { ! const char *word; ! int add = 1; ! unsigned char modechar; if (!modes) return 0; if (!*modes) return 1; ! if ((*modes != '+') && (*modes != '-')) return 0; ! word = modes; while (*word != ' ' && *word) word++; while (*word == ' ') word++; while (1) { ! switch (modechar = *modes++) { case 0: case ' ': ! return 1; ! case '+': add = 1; break; ! case '-': add = 0; break; case 'k': ! if (add && !*word) return 0; break; case 'l': ! if (add && (!*word || (strtoul(word, NULL, 0) <= 0))) return 0; break; default: ! if (!channel_inverse_modes[modechar]) return 0; ! break; } } } *************** *** 873,879 **** } ! void tools_cleanup(void) { if (of_list) free(of_list); } --- 881,895 ---- } ! static void tools_cleanup(void) { if (of_list) free(of_list); } + + void + tools_init(void) + { + tools_build_inverse_modes(); + reg_exit_func(tools_cleanup); + } + Index: proto_ircu_p10.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_ircu_p10.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** proto_ircu_p10.c 2001/08/19 03:06:09 1.19 --- proto_ircu_p10.c 2001/08/24 20:33:45 1.20 *************** *** 316,335 **** inttobase64(b64ip, user->ip, 6); if (user->modes) { ! int modelen = 0; ! char modes[9]; ! ! if (IsOper(user)) modes[modelen++] = 'o'; ! if (IsInvisible(user)) modes[modelen++] = 'i'; ! if (IsWallOp(user)) modes[modelen++] = 'w'; ! if (IsService(user)) modes[modelen++] = 'k'; ! if (IsServNotice(user)) modes[modelen++] = 's'; ! if (IsDeaf(user)) modes[modelen++] = 'd'; ! if (IsGlobal(user)) modes[modelen++] = 'g'; ! if (IsHelper(user)) modes[modelen++] = 'h'; ! modes[modelen] = 0; ! ! /* we don't need to put the + in modes because it's in the format string. */ ! putsock("%s %s %s %d "FMT_TIME_T" %s %s +%s %s %s :%s", user->uplink->proto.numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, modes, b64ip, user->proto.numeric, user->info); } else { --- 316,323 ---- inttobase64(b64ip, user->ip, 6); if (user->modes) { ! char modes[16]; ! make_usermode(user, modes, sizeof(modes)); ! putsock("%s %s %s %d "FMT_TIME_T" %s %s %s %s %s :%s", user->uplink->proto.numeric, CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, user->username, user->hostname, modes, b64ip, user->proto.numeric, user->info); } else { *************** *** 453,495 **** } - int - irc_make_chanmode(struct chanNode *chan, char *out) - { - int pos = 0; - - if (!chan->modes) { - out[0] = 0; - return 0; - } - - out[pos++] = '+'; - #define do_chan_mode(MODE,CHAR) if (chan->modes & MODE) out[pos++] = CHAR - do_chan_mode(MODE_PRIVATE, 'p'); - do_chan_mode(MODE_SECRET, 's'); - do_chan_mode(MODE_MODERATED, 'm'); - do_chan_mode(MODE_TOPICLIMIT, 't'); - do_chan_mode(MODE_INVITEONLY, 'i'); - do_chan_mode(MODE_NOPRIVMSGS, 'n'); - #undef do_chan_mode - if (chan->key[0]) out[pos++] = 'k'; - if (chan->limit) out[pos++] = 'l'; - if (chan->key[0]) { - int len = strlen(chan->key); - out[pos++] = ' '; - memcpy(out+pos, chan->key, len); - pos += len; - } - if (chan->limit) { - out[pos++] = ' '; - pos += sprintf(out+pos, "%d", chan->limit); - } - out[pos++] = 0; - return pos; - } - void irc_burst(struct chanNode *chan) { ! char burst_line[512]; int pos, base_len, len; struct modeNode *mn; --- 441,448 ---- } void irc_burst(struct chanNode *chan) { ! char burst_line[510]; int pos, base_len, len; struct modeNode *mn; *************** *** 499,503 **** base_len = sprintf(burst_line, "%s %s %s " FMT_TIME_T " ", self->proto.numeric, CMD_BURST, chan->name, chan->timestamp); ! len = irc_make_chanmode(chan, burst_line+base_len); pos = base_len + len - 1; burst_line[pos++] = ' '; --- 452,456 ---- base_len = sprintf(burst_line, "%s %s %s " FMT_TIME_T " ", self->proto.numeric, CMD_BURST, chan->name, chan->timestamp); ! len = make_chanmode(chan, burst_line+base_len, sizeof(burst_line)-base_len); pos = base_len + len - 1; burst_line[pos++] = ' '; *************** *** 579,585 **** irc_mode(struct userNode *from, struct chanNode *target, const char *modes) { ! struct userMode *mn; const char *src; ! src = ((mn = GetUserMode(target)) && (mn->modes & MODE_CHANOP)) ? from->proto.numeric : self->proto.numeric; putsock("%s %s %s %s "FMT_TIME_T, src, CMD_MODE, target->name, modes, target->timestamp); } --- 532,542 ---- irc_mode(struct userNode *from, struct chanNode *target, const char *modes) { ! struct modeNode *mn; const char *src; ! if ((mn = GetUserMode(target, from)) && (mn->modes & MODE_CHANOP)) { ! src = from->proto.numeric; ! } else { ! src = self->proto.numeric; ! } putsock("%s %s %s %s "FMT_TIME_T, src, CMD_MODE, target->name, modes, target->timestamp); } *************** *** 616,620 **** irc_stats(struct userNode *from, struct server *target, char type) { ! putsock("%s STATS %c :%s", from->numeric, type, target->numeric); } --- 573,577 ---- irc_stats(struct userNode *from, struct server *target, char type) { ! putsock("%s STATS %c :%s", from->proto.numeric, type, target->proto.numeric); } Index: proto_bahamut.c =================================================================== RCS file: /cvsroot/srvx/services/src/proto_bahamut.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** proto_bahamut.c 2001/08/19 03:06:09 1.9 --- proto_bahamut.c 2001/08/24 20:33:45 1.10 *************** *** 214,233 **** irc_user(struct userNode *user) { ! int modelen; ! char modes[9]; ! modelen = 0; ! if (IsOper(user)) modes[modelen++] = 'o'; ! if (IsInvisible(user)) modes[modelen++] = 'i'; ! if (IsWallOp(user)) modes[modelen++] = 'w'; ! if (IsService(user)) modes[modelen++] = 'k'; ! if (IsServNotice(user)) modes[modelen++] = 's'; ! if (IsDeaf(user)) modes[modelen++] = 'd'; ! if (IsGlobal(user)) modes[modelen++] = 'g'; ! if (IsHelper(user)) modes[modelen++] = 'h'; ! modes[modelen] = 0; ! /* we don't need to put the + in modes because it is in this format string. */ ! putsock("%s %s %d "FMT_TIME_T" +%s %s %s %s %lu :%s", CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, modes, user->username, user->hostname, user->uplink->name, user->ip, user->info); --- 214,222 ---- irc_user(struct userNode *user) { ! char modes[16]; ! make_usermode(user, modes, sizeof(modes)); ! putsock("%s %s %d "FMT_TIME_T" %s %s %s %s %lu :%s", CMD_NICK, user->nick, user->uplink->hops+1, user->timestamp, modes, user->username, user->hostname, user->uplink->name, user->ip, user->info); *************** *** 343,381 **** } - int - irc_make_chanmode(struct chanNode *chan, char *out) - { - int pos = 0; - - if (!chan->modes) { - out[0] = 0; - return 0; - } - - out[pos++] = '+'; - #define do_chan_mode(MODE,CHAR) if (chan->modes & MODE) out[pos++] = CHAR - do_chan_mode(MODE_PRIVATE, 'p'); - do_chan_mode(MODE_SECRET, 's'); - do_chan_mode(MODE_MODERATED, 'm'); - do_chan_mode(MODE_TOPICLIMIT, 't'); - do_chan_mode(MODE_INVITEONLY, 'i'); - do_chan_mode(MODE_NOPRIVMSGS, 'n'); - #undef do_chan_mode - if (chan->key[0]) out[pos++] = 'k'; - if (chan->limit) out[pos++] = 'l'; - if (chan->key[0]) { - int len = strlen(chan->key); - out[pos++] = ' '; - memcpy(out+pos, chan->key, len); - pos += len; - } - if (chan->limit) { - out[pos++] = ' '; - pos += sprintf(out+pos, "%d", chan->limit); - } - out[pos++] = 0; - return pos; - } - void irc_quit(struct userNode *user, const char *message) --- 332,335 ---- *************** *** 547,551 **** (void)key; (void)extra; base_len = snprintf(burst_line, sizeof(burst_line), ":%s SJOIN "FMT_TIME_T" %s ", self->name, channel->timestamp, channel->name); ! pos = base_len + irc_make_chanmode(channel, burst_line+base_len) - 1; burst_line[pos++] = ' '; burst_line[pos++] = ':'; --- 501,505 ---- (void)key; (void)extra; base_len = snprintf(burst_line, sizeof(burst_line), ":%s SJOIN "FMT_TIME_T" %s ", self->name, channel->timestamp, channel->name); ! pos = base_len + make_chanmode(channel, burst_line+base_len, sizeof(burst_line)-base_len) - 1; burst_line[pos++] = ' '; burst_line[pos++] = ':'; Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.208 retrieving revision 1.209 diff -C2 -r1.208 -r1.209 *** opserv.c 2001/08/19 03:06:09 1.208 --- opserv.c 2001/08/24 20:33:45 1.209 *************** *** 144,147 **** --- 144,148 ---- #define OSMSG_WHOIS_HOST "Host : %s@%s" #define OSMSG_WHOIS_IP "Real IP : %ld.%ld.%ld.%ld" + #define OSMSG_WHOIS_MODES "Modes : %s" #define OSMSG_WHOIS_INFO "Info : %s" #define OSMSG_WHOIS_NUMERIC "Numeric : %s" *************** *** 530,534 **** opserv_notice(user, "%s", buffer); strcpy(buffer, "Modes: "); ! irc_make_chanmode(channel, buffer+strlen(buffer)); opserv_notice(user, "%s", buffer); if (channel->topic_time > 1) { --- 531,535 ---- opserv_notice(user, "%s", buffer); strcpy(buffer, "Modes: "); ! make_chanmode(channel, buffer+strlen(buffer), sizeof(buffer)-strlen(buffer)); opserv_notice(user, "%s", buffer); if (channel->topic_time > 1) { *************** *** 668,672 **** OPSERV_NEED_CHANNEL(); (void)argc; ! if (irc_make_chanmode(channel, buffer)) { channel->modes = 0; buffer[0] = '-'; --- 669,673 ---- OPSERV_NEED_CHANNEL(); (void)argc; ! if (make_chanmode(channel, buffer, sizeof(buffer))) { channel->modes = 0; buffer[0] = '-'; *************** *** 1220,1224 **** unsigned long ip; char buffer[128]; - int bpos, herelen; OPSERV_MIN_PARMS(2, false); --- 1221,1224 ---- *************** *** 1233,1249 **** opserv_notice(user, OSMSG_WHOIS_IP, (ip >> 24) & 255, (ip >> 16) & 255, (ip >> 8) & 255, ip & 255); if (target->modes) { ! bpos = 0; ! #define buffer_cat(str) (herelen = strlen(str), memcpy(buffer+bpos, str, herelen), bpos += herelen) ! buffer_cat("Modes : +"); ! if (IsInvisible(target)) buffer_cat("i"); ! if (IsWallOp(target)) buffer_cat("w"); ! if (IsOper(target)) buffer_cat("o"); ! if (IsGlobal(target)) buffer_cat("g"); ! if (IsServNotice(target)) buffer_cat("s"); ! if (IsHelper(target)) buffer_cat("h"); ! if (IsService(target)) buffer_cat("k"); ! if (IsDeaf(target)) buffer_cat("d"); ! buffer[bpos] = 0; ! if (buffer[11]) opserv_notice(user, buffer); } opserv_notice(user, OSMSG_WHOIS_INFO, target->info); --- 1233,1238 ---- opserv_notice(user, OSMSG_WHOIS_IP, (ip >> 24) & 255, (ip >> 16) & 255, (ip >> 8) & 255, ip & 255); if (target->modes) { ! make_usermode(target, buffer, sizeof(buffer)); ! opserv_notice(user, OSMSG_WHOIS_MODES, buffer); } opserv_notice(user, OSMSG_WHOIS_INFO, target->info); Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** main.c 2001/08/19 03:06:09 1.108 --- main.c 2001/08/24 20:33:45 1.109 *************** *** 539,544 **** reg_exit_func(main_cleanup); reg_exit_func(conf_close); - reg_exit_func(tools_cleanup); tmp = conf_server_ping_freq(); if (tmp != -1) ping_freq = tmp; --- 539,544 ---- reg_exit_func(main_cleanup); reg_exit_func(conf_close); + tools_init(); tmp = conf_server_ping_freq(); if (tmp != -1) ping_freq = tmp; Index: chanserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/chanserv.c,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -r1.180 -r1.181 *** chanserv.c 2001/08/19 03:06:09 1.180 --- chanserv.c 2001/08/24 20:33:45 1.181 *************** *** 3255,3259 **** (void)argc;(void)argv; ! irc_make_chanmode(channel, modes); chanserv_notice(user, CSMSG_PEEK_INFO, channel->name); --- 3255,3259 ---- (void)argc;(void)argv; ! make_chanmode(channel, modes, sizeof(modes)); chanserv_notice(user, CSMSG_PEEK_INFO, channel->name); |
From: Entrope <en...@us...> - 2001-08-24 20:32:47
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv9947/src Modified Files: config.h.in Log Message: check for arpa/inet.h Index: config.h.in =================================================================== RCS file: /cvsroot/srvx/services/src/config.h.in,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** config.h.in 2001/08/19 03:06:09 1.23 --- config.h.in 2001/08/24 20:32:44 1.24 *************** *** 16,19 **** --- 16,22 ---- #undef HAVE_ALLOCA_H + /* Define if you have the <arpa/inet.h> header file. */ + #undef HAVE_ARPA_INET_H + /* Define if you have the `bcopy' function. */ #undef HAVE_BCOPY |
From: Entrope <en...@us...> - 2001-08-24 20:32:37
|
Update of /cvsroot/srvx/services In directory usw-pr-cvs1:/tmp/cvs-serv9893 Modified Files: configure.ac Log Message: check for arpa/inet.h and complain if src/proto_${PROTO}.h is missing Index: configure.ac =================================================================== RCS file: /cvsroot/srvx/services/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** configure.ac 2001/08/19 03:06:09 1.5 --- configure.ac 2001/08/24 20:32:34 1.6 *************** *** 86,90 **** dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(ctype.h errno.h fcntl.h malloc.h math.h netdb.h netinet/in.h pthread.h setjmp.h signal.h stdarg.h stdio.h stdlib.h sys/resource.h sys/timeb.h sys/times.h string.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h time.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi --- 86,90 ---- dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi ! AC_CHECK_HEADERS(arpa/inet.h ctype.h errno.h fcntl.h malloc.h math.h netdb.h netinet/in.h pthread.h setjmp.h signal.h stdarg.h stdio.h stdlib.h sys/resource.h sys/timeb.h sys/times.h string.h sys/param.h sys/poll.h sys/socket.h sys/time.h sys/types.h time.h unistd.h getopt.h memory.h regex.h alloca.h dlfcn.h,,) dnl portability stuff, hurray! -Jedi *************** *** 235,238 **** --- 235,241 ---- [PROTO="$enableval"], [PROTO=ircu_p10]) + if test ! -f "${srcdir}/src/proto_${PROTO}.h" ; then + AC_MSG_ERROR([Missing file ${srcdir}/src/proto_${PROTO}.h; do we really support protocol ${PROTO}?]) + fi AC_DEFINE_UNQUOTED(PROTO_INCLUDE, "proto_${PROTO}.h", [Header file for IRC dialect support]) |
From: Miles P. <pet...@us...> - 2001-08-24 03:13:42
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv7312 Modified Files: Tag: rel-1_0 opserv.c Log Message: since services will probably run in a common timezone (in relation to its users), we should just use localtime() instead of gmtime() Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.187.2.49 retrieving revision 1.187.2.50 diff -C2 -r1.187.2.49 -r1.187.2.50 *** opserv.c 2001/08/21 01:27:32 1.187.2.49 --- opserv.c 2001/08/24 03:13:37 1.187.2.50 *************** *** 544,548 **** OPSERV_NEED_CHANNEL(); (void)argc; opserv_notice(user, "%s Statistics", channel->name); ! strftime(buffer, sizeof(buffer), "Created on: %a %b %d %H:%M:%S %Y", gmtime(&channel->timestamp)); opserv_notice(user, "%s", buffer); strcpy(buffer, "Modes: "); --- 544,548 ---- OPSERV_NEED_CHANNEL(); (void)argc; opserv_notice(user, "%s Statistics", channel->name); ! strftime(buffer, sizeof(buffer), "Created on: %a %b %d %H:%M:%S %Y", localtime(&channel->timestamp)); opserv_notice(user, "%s", buffer); strcpy(buffer, "Modes: "); *************** *** 550,554 **** opserv_notice(user, "%s", buffer); if (channel->topic_time > 1) { ! strftime(buffer, sizeof(buffer), "Topic: `%%s$o' set by %%s (%a %b %d %H:%M:%S %Y)", gmtime(&channel->topic_time)); opserv_notice(user, buffer, channel->topic, channel->topic_nick); } else { --- 550,554 ---- opserv_notice(user, "%s", buffer); if (channel->topic_time > 1) { ! strftime(buffer, sizeof(buffer), "Topic: `%%s$o' set by %%s (%a %b %d %H:%M:%S %Y)", localtime(&channel->topic_time)); opserv_notice(user, buffer, channel->topic, channel->topic_nick); } else { *************** *** 560,564 **** for (n = 0; n < channel->banlist.used; n++) { ban = channel->banlist.list[n]; ! strftime(buffer, sizeof(buffer), "%%s by %%s (%a %b %d %H:%M:%S %Y)", gmtime(&ban->set)); opserv_notice(user, buffer, ban->ban, ban->who); } --- 560,564 ---- for (n = 0; n < channel->banlist.used; n++) { ban = channel->banlist.list[n]; ! strftime(buffer, sizeof(buffer), "%%s by %%s (%a %b %d %H:%M:%S %Y)", localtime(&ban->set)); opserv_notice(user, buffer, ban->ban, ban->who); } *************** *** 3221,3225 **** gtrace_print_func(struct gline *gline, void *extra) { ! char *when_text = asctime(gmtime(&gline->expires)); when_text[strlen(when_text)-1] = 0; /* strip lame \n */ opserv_notice(extra, OSMSG_GTRACE_FORMAT, gline->target, gline->issuer, when_text, gline->reason); --- 3221,3225 ---- gtrace_print_func(struct gline *gline, void *extra) { ! char *when_text = asctime(localtime(&gline->expires)); when_text[strlen(when_text)-1] = 0; /* strip lame \n */ opserv_notice(extra, OSMSG_GTRACE_FORMAT, gline->target, gline->issuer, when_text, gline->reason); |
From: Entrope <en...@us...> - 2001-08-23 01:50:30
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv7921/src Modified Files: Tag: rel-1_0 gline.c Log Message: fix overzealous expiration of glines Index: gline.c =================================================================== RCS file: /cvsroot/srvx/services/src/gline.c,v retrieving revision 1.6.2.9 retrieving revision 1.6.2.10 diff -C2 -r1.6.2.9 -r1.6.2.10 *** gline.c 2001/08/22 04:28:24 1.6.2.9 --- gline.c 2001/08/23 01:50:25 1.6.2.10 *************** *** 91,108 **** gline_expire(void *data) { ! void *argh, *wraa; (void)data; pthread_mutex_lock(&gline_mutex); while (heap_size(gline_heap)) { ! heap_peek(gline_heap, &argh, &wraa); ! if (TIME_T_CAST(argh) <= now) { ! heap_pop(gline_heap); ! free_gline(wraa); ! } } ! heap_peek(gline_heap, &argh, &wraa); ! if (wraa) { ! timeq_add(TIME_T_CAST(argh), gline_expire, NULL); } pthread_mutex_unlock(&gline_mutex); --- 91,109 ---- gline_expire(void *data) { ! time_t stopped; ! void *wraa; (void)data; pthread_mutex_lock(&gline_mutex); + stopped = 0; while (heap_size(gline_heap)) { ! heap_peek(gline_heap, 0, &wraa); ! stopped = ((struct gline*)wraa)->expires; ! if (stopped > now) break; ! heap_pop(gline_heap); ! free_gline(wraa); } ! if (heap_size(gline_heap)) { ! timeq_add(stopped, gline_expire, NULL); } pthread_mutex_unlock(&gline_mutex); |
From: Entrope <en...@us...> - 2001-08-23 01:49:21
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv7736/src Modified Files: Tag: rel-1_0 proto.c Log Message: simplify tacking key on to end of channel modes Index: proto.c =================================================================== RCS file: /cvsroot/srvx/services/src/Attic/proto.c,v retrieving revision 1.68.2.10 retrieving revision 1.68.2.11 diff -C2 -r1.68.2.10 -r1.68.2.11 *** proto.c 2001/08/22 04:21:34 1.68.2.10 --- proto.c 2001/08/23 01:49:17 1.68.2.11 *************** *** 513,526 **** do_chan_mode(MODE_LIMIT, 'l'); #undef do_chan_mode ! if (chan->modes & MODE_KEY) { ! int len = strlen(chan->key); ! out[pos++] = ' '; ! memcpy(out+pos, chan->key, len); ! pos += len; ! } ! if (chan->modes & MODE_LIMIT) { ! out[pos++] = ' '; ! pos += sprintf(out+pos, "%d", chan->limit); ! } out[pos++] = 0; return pos; --- 513,518 ---- do_chan_mode(MODE_LIMIT, 'l'); #undef do_chan_mode ! if (chan->modes & MODE_KEY) pos += sprintf(out+pos, " %s", chan->key); ! if (chan->modes & MODE_LIMIT) pos += sprintf(out+pos, " %d", chan->limit); out[pos++] = 0; return pos; |
From: Entrope <en...@us...> - 2001-08-22 04:28:27
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv16138/src Modified Files: Tag: rel-1_0 nickserv.c gline.c Log Message: fix a few potential buffer overflows Index: nickserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/nickserv.c,v retrieving revision 1.138.2.43 retrieving revision 1.138.2.44 diff -C2 -r1.138.2.43 -r1.138.2.44 *** nickserv.c 2001/08/16 03:29:03 1.138.2.43 --- nickserv.c 2001/08/22 04:28:24 1.138.2.44 *************** *** 1651,1655 **** struct nick_info *ni; struct record_data *rd; ! char num[11], flags[33]; unsigned int i, flen; --- 1651,1655 ---- struct nick_info *ni; struct record_data *rd; ! char num[12], flags[33]; unsigned int i, flen; Index: gline.c =================================================================== RCS file: /cvsroot/srvx/services/src/gline.c,v retrieving revision 1.6.2.8 retrieving revision 1.6.2.9 diff -C2 -r1.6.2.8 -r1.6.2.9 *** gline.c 2001/08/19 00:39:06 1.6.2.8 --- gline.c 2001/08/22 04:28:24 1.6.2.9 *************** *** 228,232 **** struct gline *ent = data; dict_t node = alloc_object(); ! char expstr[10]; (void)key; snprintf(expstr, sizeof(expstr), FMT_TIME_T, ent->expires); --- 228,232 ---- struct gline *ent = data; dict_t node = alloc_object(); ! char expstr[12]; (void)key; snprintf(expstr, sizeof(expstr), FMT_TIME_T, ent->expires); |
From: Adrian D. <sai...@us...> - 2001-08-22 04:21:37
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv14876 Modified Files: Tag: rel-1_0 proto.c Log Message: Prevent buffer overflow Index: proto.c =================================================================== RCS file: /cvsroot/srvx/services/src/Attic/proto.c,v retrieving revision 1.68.2.9 retrieving revision 1.68.2.10 diff -C2 -r1.68.2.9 -r1.68.2.10 *** proto.c 2001/08/16 02:39:18 1.68.2.9 --- proto.c 2001/08/22 04:21:34 1.68.2.10 *************** *** 278,282 **** va_start(arg_list, text); pos = vsnprintf(buffer, MAXLEN - 2, text, arg_list); ! if (pos < 0) pos = MAXLEN - 2; /* buffer[pos++] = '\r'; */ buffer[pos++] = '\n'; --- 278,282 ---- va_start(arg_list, text); pos = vsnprintf(buffer, MAXLEN - 2, text, arg_list); ! if (pos < 0 || pos > (MAXLEN - 2)) pos = MAXLEN - 2; /* buffer[pos++] = '\r'; */ buffer[pos++] = '\n'; |