srvx-commits Mailing List for srvx IRC Services (Page 23)
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: Entrope <en...@us...> - 2002-11-22 02:20:39
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11885/src
Modified Files:
chanserv.c
Log Message:
simplify netride detection code
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.308
retrieving revision 1.309
diff -C2 -r1.308 -r1.309
*** chanserv.c 14 Nov 2002 02:22:35 -0000 1.308
--- chanserv.c 22 Nov 2002 02:20:35 -0000 1.309
***************
*** 5961,5965 ****
struct banData *bData;
struct handle_info *handle;
! unsigned int ii, modes;
char *greeting;
char info[MAXLEN];
--- 5961,5965 ----
struct banData *bData;
struct handle_info *handle;
! unsigned int modes;
char *greeting;
char info[MAXLEN];
***************
*** 5996,6019 ****
if(user->uplink->burst)
{
for(ii = 0; ii < channel->banlist.used; ii++)
{
if(user_matches_glob(user, channel->banlist.list[ii]->ban, 1))
{
! break;
}
}
}
- else
- {
- ii = channel->banlist.used;
- }
! if(ii<channel->banlist.used)
! {
! /* Riding a netburst. Naughty. */
! KickChannelUser(user, channel, chanserv, CSMSG_NETRIDE_DETECTED);
! return 1;
! }
! else if(channel->banlist.used < MAXBANS)
{
/* Not joining through a ban. */
--- 5996,6012 ----
if(user->uplink->burst)
{
+ unsigned int ii;
for(ii = 0; ii < channel->banlist.used; ii++)
{
if(user_matches_glob(user, channel->banlist.list[ii]->ban, 1))
{
! /* Riding a netburst. Naughty. */
! KickChannelUser(user, channel, chanserv, CSMSG_NETRIDE_DETECTED);
! return 1;
}
}
}
! if(channel->banlist.used < MAXBANS)
{
/* Not joining through a ban. */
|
|
From: Adrian D. <sai...@us...> - 2002-11-16 19:12:25
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv11984
Modified Files:
Tag: rel-1_1-branch
chanserv.c
Log Message:
Fix misspelling that's been on the gamesnet running copy for a while
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.232.2.12
retrieving revision 1.232.2.13
diff -C2 -r1.232.2.12 -r1.232.2.13
*** chanserv.c 16 Nov 2002 19:08:41 -0000 1.232.2.12
--- chanserv.c 16 Nov 2002 19:12:18 -0000 1.232.2.13
***************
*** 278,282 ****
#define CSMSG_KICK_DONE "Kicked $b%s$b from %s."
! #define CSMSG_NO_BANS "No channel bans found om $b%s$b."
#define CSMSG_BANS_REMOVED "Removed all channel bans from $b%s$b."
--- 278,282 ----
#define CSMSG_KICK_DONE "Kicked $b%s$b from %s."
! #define CSMSG_NO_BANS "No channel bans found on $b%s$b."
#define CSMSG_BANS_REMOVED "Removed all channel bans from $b%s$b."
|
|
From: Adrian D. <sai...@us...> - 2002-11-16 19:08:45
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv10048
Modified Files:
Tag: rel-1_1-branch
chanserv.c
Log Message:
clvl allows helpers with access >= master in nodelete chans to clvl anyone to anything
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.232.2.11
retrieving revision 1.232.2.12
diff -C2 -r1.232.2.11 -r1.232.2.12
*** chanserv.c 23 Oct 2002 16:22:45 -0000 1.232.2.11
--- chanserv.c 16 Nov 2002 19:08:41 -0000 1.232.2.12
***************
*** 2702,2706 ****
struct userData *actor;
enum userLevel access, new_access = ulNone;
! int privileged = IsHelping(user);
REQUIRE_PARAMS(3);
--- 2702,2706 ----
struct userData *actor;
enum userLevel access, new_access = ulNone;
! int privileged = IsHelping(user) && ((user->handle_info->opserv_level > 0) || !IsProtected(channel->channel_info));
REQUIRE_PARAMS(3);
|
|
From: Entrope <en...@us...> - 2002-11-14 02:22:39
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv1377/src
Modified Files:
chanserv.c hash.c hash.h helpserv.c opserv.c proto-bahamut.c
proto-p10.c proto.h
Log Message:
clean up AddChannel() and mod_chanmode() interfaces
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -C2 -r1.307 -r1.308
*** chanserv.c 12 Nov 2002 02:28:41 -0000 1.307
--- chanserv.c 14 Nov 2002 02:22:35 -0000 1.308
***************
*** 1833,1837 ****
if(new_channel)
{
! channel = AddChannel(argv[1], now, NULL, NULL, 0, NULL);
AddChannelUser(chanserv, channel);
}
--- 1833,1837 ----
if(new_channel)
{
! channel = AddChannel(argv[1], now, NULL, NULL);
AddChannelUser(chanserv, channel);
}
***************
*** 1845,1849 ****
parse_mode_lock(&CHANSERV_DEFAULT_MODES, 1, cData);
! mod_chanmode(channel, chanserv, CHANSERV_DEFAULT_MODES, NULL, 0);
irc_mode(chanserv, channel, CHANSERV_DEFAULT_MODES);
--- 1845,1849 ----
parse_mode_lock(&CHANSERV_DEFAULT_MODES, 1, cData);
! mod_chanmode(channel, chanserv, CHANSERV_DEFAULT_MODES);
irc_mode(chanserv, channel, CHANSERV_DEFAULT_MODES);
***************
*** 1961,1965 ****
}
! target = AddChannel(argv[1], now, NULL, NULL, 0, NULL);
AddChannelUser(chanserv, target);
new_channel = 1;
--- 1961,1965 ----
}
! target = AddChannel(argv[1], now, NULL, NULL);
AddChannelUser(chanserv, target);
new_channel = 1;
***************
*** 3237,3240 ****
--- 3237,3241 ----
}
+ if(mask) free(mask);
return 1;
}
***************
*** 3310,3314 ****
}
! mod_chanmode(channel, chanserv, change, NULL, 0);
irc_mode(chanserv, channel, change);
--- 3311,3315 ----
}
! mod_chanmode(channel, chanserv, change);
irc_mode(chanserv, channel, change);
***************
*** 3897,3901 ****
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes, NULL, 0);
irc_mode(chanserv, channel, modes);
}
--- 3898,3902 ----
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes);
irc_mode(chanserv, channel, modes);
}
***************
*** 3909,3913 ****
changes = unsplit_string(argv + 1, argc - 1, NULL);
! if(!verify_mod_chanmode(channel, chanserv, changes, NULL, 0, 0))
{
chanserv_notice(user, MSG_INVALID_MODES, changes);
--- 3910,3914 ----
changes = unsplit_string(argv + 1, argc - 1, NULL);
! if(!verify_mod_chanmode(channel, chanserv, changes, 0))
{
chanserv_notice(user, MSG_INVALID_MODES, changes);
***************
*** 3923,3927 ****
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes, NULL, 0);
irc_mode(chanserv, channel, modes);
--- 3924,3928 ----
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes);
irc_mode(chanserv, channel, modes);
***************
*** 4668,4672 ****
if(!suspended->expires || (now < suspended->expires)) suspended->revoked = now;
dict_remove(sChannels, suspended->name);
! channel = AddChannel(suspended->name, now, NULL, NULL, 0, NULL);
AddChannelUser(chanserv, channel);
AddChannelOp(1, &chanserv, channel, chanserv, 1);
--- 4669,4673 ----
if(!suspended->expires || (now < suspended->expires)) suspended->revoked = now;
dict_remove(sChannels, suspended->name);
! channel = AddChannel(suspended->name, now, NULL, NULL);
AddChannelUser(chanserv, channel);
AddChannelOp(1, &chanserv, channel, chanserv, 1);
***************
*** 5141,5145 ****
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes, NULL, 0);
irc_mode(chanserv, channel, modes);
}
--- 5142,5146 ----
create_mode_lock(modes, channel->channel_info);
! mod_chanmode(channel, chanserv, modes);
irc_mode(chanserv, channel, modes);
}
***************
*** 5939,5943 ****
char modes[MODELEN];
create_mode_lock(modes, cData);
! mod_chanmode(channel, chanserv, modes, NULL, 0);
irc_mode(chanserv, channel, modes);
}
--- 5940,5944 ----
char modes[MODELEN];
create_mode_lock(modes, cData);
! mod_chanmode(channel, chanserv, modes);
irc_mode(chanserv, channel, modes);
}
***************
*** 6299,6303 ****
create_mode_lock(correct, channel->channel_info);
! mod_chanmode(channel, chanserv, correct, NULL, 0);
irc_mode(chanserv, channel, correct);
--- 6300,6304 ----
create_mode_lock(correct, channel->channel_info);
! mod_chanmode(channel, chanserv, correct);
irc_mode(chanserv, channel, correct);
***************
*** 6410,6414 ****
if(str)
{
! chanserv_conf.debug_channel = AddChannel(str, now, "+tinms", NULL, 0, NULL);
AddChannelUser(chanserv, chanserv_conf.debug_channel);
AddChannelOp(1, &chanserv, chanserv_conf.debug_channel, chanserv, 0);
--- 6411,6415 ----
if(str)
{
! chanserv_conf.debug_channel = AddChannel(str, now, "+tinms", NULL);
AddChannelUser(chanserv, chanserv_conf.debug_channel);
AddChannelOp(1, &chanserv, chanserv_conf.debug_channel, chanserv, 0);
***************
*** 6421,6425 ****
if(str)
{
! chanserv_conf.support_channel = AddChannel(str, now, "+nt", NULL, 0, NULL);
AddChannelUser(chanserv, chanserv_conf.support_channel);
AddChannelOp(1, &chanserv, chanserv_conf.support_channel, chanserv, 0);
--- 6422,6426 ----
if(str)
{
! chanserv_conf.support_channel = AddChannel(str, now, "+nt", NULL);
AddChannelUser(chanserv, chanserv_conf.support_channel);
AddChannelOp(1, &chanserv, chanserv_conf.support_channel, chanserv, 0);
***************
*** 6763,6767 ****
else
{
! cNode = AddChannel(key, now, NULL, NULL, 0, NULL);
if(!cNode)
{
--- 6764,6768 ----
else
{
! cNode = AddChannel(key, now, NULL, NULL);
if(!cNode)
{
***************
*** 6807,6811 ****
{
assert(cNode);
! mod_chanmode(cNode, chanserv, str, NULL, 0);
}
}
--- 6808,6812 ----
{
assert(cNode);
! mod_chanmode(cNode, chanserv, str);
}
}
Index: hash.c
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -C2 -r1.166 -r1.167
*** hash.c 12 Nov 2002 02:28:41 -0000 1.166
--- hash.c 14 Nov 2002 02:22:35 -0000 1.167
***************
*** 292,296 ****
static void
! wipeout_channel(struct chanNode *cNode, time_t new_time, const char *modes, const char *key, int limit) {
struct userList reops;
unsigned int orig_limit;
--- 292,296 ----
static void
! wipeout_channel(struct chanNode *cNode, time_t new_time, const char *modes) {
struct userList reops;
unsigned int orig_limit;
***************
*** 304,308 ****
strcpy(orig_key, cNode->key);
cNode->modes = 0;
! mod_chanmode(cNode, NULL, modes, key, limit);
cNode->timestamp = new_time;
--- 304,308 ----
strcpy(orig_key, cNode->key);
cNode->modes = 0;
! mod_chanmode(cNode, NULL, modes);
cNode->timestamp = new_time;
***************
*** 343,347 ****
}
modebuf[nn] = 0;
! mod_chanmode(cNode, NULL, modebuf, 0, 0);
irc_mode(reops.list[0], cNode, modebuf);
}
--- 343,347 ----
}
modebuf[nn] = 0;
! mod_chanmode(cNode, NULL, modebuf);
irc_mode(reops.list[0], cNode, modebuf);
}
***************
*** 351,355 ****
struct chanNode *
! AddChannel(const char *name, time_t time_, const char *modes, const char *key, int limit, char *banlist)
{
struct chanNode *cNode;
--- 351,355 ----
struct chanNode *
! AddChannel(const char *name, time_t time_, const char *modes, char *banlist)
{
struct chanNode *cNode;
***************
*** 371,375 ****
} else {
if (cNode->timestamp > time_) {
! wipeout_channel(cNode, time_, modes, key, limit);
rel_age = 1;
} else if (cNode->timestamp == time_) {
--- 371,375 ----
} else {
if (cNode->timestamp > time_) {
! wipeout_channel(cNode, time_, modes);
rel_age = 1;
} else if (cNode->timestamp == time_) {
Index: hash.h
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.h,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -r1.95 -r1.96
*** hash.h 12 Nov 2002 02:28:41 -0000 1.95
--- hash.h 14 Nov 2002 02:22:35 -0000 1.96
***************
*** 212,216 ****
#define IsChannelName(x) ((*(x) == '#' || *(x) == '+') && !strpbrk((x)+1,"\a,"))
! struct chanNode* AddChannel(const char *name, time_t time_, const char *modes, const char *key, int limit, char *banlist);
void DelChannel(struct chanNode* channel);
--- 212,216 ----
#define IsChannelName(x) ((*(x) == '#' || *(x) == '+') && !strpbrk((x)+1,"\a,"))
! struct chanNode* AddChannel(const char *name, time_t time_, const char *modes, char *banlist);
void DelChannel(struct chanNode* channel);
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** helpserv.c 12 Nov 2002 02:28:41 -0000 1.51
--- helpserv.c 14 Nov 2002 02:22:35 -0000 1.52
***************
*** 2004,2008 ****
if (!(hs->helpchan = GetChannel(newchan))) {
! hs->helpchan = AddChannel(newchan, now, NULL, NULL, 0, NULL);
AddChannelUser(hs->helpserv, hs->helpchan);
AddChannelOp(1, &hs->helpserv, hs->helpchan, hs->helpserv, 0);
--- 2004,2008 ----
if (!(hs->helpchan = GetChannel(newchan))) {
! hs->helpchan = AddChannel(newchan, now, NULL, NULL);
AddChannelUser(hs->helpserv, hs->helpchan);
AddChannelOp(1, &hs->helpserv, hs->helpchan, hs->helpserv, 0);
***************
*** 2336,2340 ****
if (!(hs->helpchan = GetChannel(help_channel))) {
! hs->helpchan = AddChannel(help_channel, now, NULL, NULL, 0, NULL);
AddChannelUser(hs->helpserv, hs->helpchan);
AddChannelOp(1, &hs->helpserv, hs->helpchan, hs->helpserv, 0);
--- 2336,2340 ----
if (!(hs->helpchan = GetChannel(help_channel))) {
! hs->helpchan = AddChannel(help_channel, now, NULL, NULL);
AddChannelUser(hs->helpserv, hs->helpchan);
AddChannelOp(1, &hs->helpserv, hs->helpchan, hs->helpserv, 0);
***************
*** 2475,2479 ****
new_target = GetChannel(target);
if (!new_target) {
! new_target = AddChannel(target, now, NULL, NULL, 0, NULL);
AddChannelUser(hs->helpserv, new_target);
}
--- 2475,2479 ----
new_target = GetChannel(target);
if (!new_target) {
! new_target = AddChannel(target, now, NULL, NULL);
AddChannelUser(hs->helpserv, new_target);
}
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -C2 -r1.290 -r1.291
*** opserv.c 14 Nov 2002 00:50:23 -0000 1.290
--- opserv.c 14 Nov 2002 02:22:35 -0000 1.291
***************
*** 949,953 ****
return 0;
}
! channel = AddChannel(argv[1], now, "", "", 0, 0);
}
if (GetUserMode(channel, opserv)) {
--- 949,953 ----
return 0;
}
! channel = AddChannel(argv[1], now, NULL, NULL);
}
if (GetUserMode(channel, opserv)) {
***************
*** 1105,1109 ****
/* Pass 1 as the last argument to allow opers to fiddle with +bov
modes. */
! if(!verify_mod_chanmode(channel, opserv, changes, NULL, 0, 1)) {
opserv_notice(user, MSG_INVALID_MODES, changes);
return 0;
--- 1105,1109 ----
/* Pass 1 as the last argument to allow opers to fiddle with +bov
modes. */
! if(!verify_mod_chanmode(channel, opserv, changes, 1)) {
opserv_notice(user, MSG_INVALID_MODES, changes);
return 0;
***************
*** 2194,2198 ****
if (!irccasecmp(argv[1], "JOIN")) {
if (!channel
! && !(channel = AddChannel(argv[3], now, "", "", 0, NULL))) {
opserv_notice(user, MSG_CHANNEL_UNKNOWN, argv[3]);
return 0;
--- 2194,2198 ----
if (!irccasecmp(argv[1], "JOIN")) {
if (!channel
! && !(channel = AddChannel(argv[3], now, NULL, NULL))) {
opserv_notice(user, MSG_CHANNEL_UNKNOWN, argv[3]);
return 0;
***************
*** 3636,3639 ****
--- 3636,3640 ----
(void)old_handle;
if (!opserv_conf.staff_auth_channel) return;
+ if (user->uplink->burst) return;
if (!user->handle_info) return;
else if (user->handle_info->opserv_level) type = "OPER";
***************
*** 3886,3890 ****
str = database_get_data(conf_node, KEY_DEBUG_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.debug_channel = AddChannel(str, now, "+tinms", NULL, 0, NULL);
AddChannelUser(opserv, opserv_conf.debug_channel)->modes |= MODE_CHANOP;
} else {
--- 3887,3891 ----
str = database_get_data(conf_node, KEY_DEBUG_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.debug_channel = AddChannel(str, now, "+tinms", NULL);
AddChannelUser(opserv, opserv_conf.debug_channel)->modes |= MODE_CHANOP;
} else {
***************
*** 3893,3897 ****
str = database_get_data(conf_node, KEY_ALERT_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.alert_channel = AddChannel(str, now, "+tns", NULL, 0, NULL);
AddChannelUser(opserv, opserv_conf.alert_channel)->modes |= MODE_CHANOP;
} else {
--- 3894,3898 ----
str = database_get_data(conf_node, KEY_ALERT_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.alert_channel = AddChannel(str, now, "+tns", NULL);
AddChannelUser(opserv, opserv_conf.alert_channel)->modes |= MODE_CHANOP;
} else {
***************
*** 3900,3904 ****
str = database_get_data(conf_node, KEY_STAFF_AUTH_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.staff_auth_channel = AddChannel(str, now, "+timns", NULL, 0, NULL);
AddChannelUser(opserv, opserv_conf.staff_auth_channel)->modes |= MODE_CHANOP;
} else {
--- 3901,3905 ----
str = database_get_data(conf_node, KEY_STAFF_AUTH_CHANNEL, RECDB_QSTRING);
if (str) {
! opserv_conf.staff_auth_channel = AddChannel(str, now, "+timns", NULL);
AddChannelUser(opserv, opserv_conf.staff_auth_channel)->modes |= MODE_CHANOP;
} else {
Index: proto-bahamut.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** proto-bahamut.c 12 Nov 2002 02:28:42 -0000 1.27
--- proto-bahamut.c 14 Nov 2002 02:22:36 -0000 1.28
***************
*** 740,750 ****
if (argc < 5) return 0;
if (argv[3][0] == '+') {
! const char *key = NULL, *modes;
! unsigned int limit = 0;
! for (modes = argv[3]; *modes; modes++) {
! if (*modes == 'k') key = argv[next++];
! else if (*modes == 'l') limit = atoi(argv[next++]);
}
! cNode = AddChannel(argv[2], atoi(argv[1]), argv[3], key, limit, 0);
} else if (argv[3][0] == '0') {
cNode = GetChannel(argv[2]);
--- 740,750 ----
if (argc < 5) return 0;
if (argv[3][0] == '+') {
! char modes[MAXLEN], *pos;
! int n_modes;
! for (pos = argv[3], n_modes = 1; *pos; pos++) {
! if ((*pos == 'k') || (*pos == 'l')) n_modes++;
}
! unsplit_string(argv+3, n_modes, modes);
! cNode = AddChannel(argv[2], atoi(argv[1]), modes, NULL);
} else if (argv[3][0] == '0') {
cNode = GetChannel(argv[2]);
***************
*** 795,799 ****
modes = unsplit_string(argv + 3, argc - 3, NULL);
! return mod_chanmode(cn, un, modes, NULL, 0);
} else if ((un = GetUserH(argv[1]))) {
mod_usermode(un, argv[2]);
--- 795,799 ----
modes = unsplit_string(argv + 3, argc - 3, NULL);
! return mod_chanmode(cn, un, modes);
} else if ((un = GetUserH(argv[1]))) {
mod_usermode(un, argv[2]);
***************
*** 1128,1132 ****
}
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit, int member)
{
const char *start = modes, *word = modes;
--- 1128,1132 ----
}
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, int member)
{
const char *start = modes, *word = modes;
***************
*** 1215,1223 ****
success:
! return mod_chanmode(channel, who, start, key, limit);
}
int
! mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit)
{
const char *word = modes;
--- 1215,1223 ----
success:
! return mod_chanmode(channel, who, start);
}
int
! mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes)
{
const char *word = modes;
***************
*** 1259,1276 ****
case 'l':
if (add) {
! channel->modes |= MODE_LIMIT;
! if(limit) {
! channel->limit = limit;
! } else {
! if(!*word) {
! return 0;
! }
! channel->limit = strtoul(word, NULL, 0);
! advance_word;
! }
!
! if(!channel->limit) {
! channel->modes &= ~MODE_LIMIT;
! }
} else {
/* Old limit not given for MODE -l */
--- 1259,1267 ----
case 'l':
if (add) {
! if(!*word) return 0;
! channel->limit = strtoul(word, NULL, 0);
! advance_word;
! if(channel->limit) channel->modes |= MODE_LIMIT;
! else channel->modes &= ~MODE_LIMIT;
} else {
/* Old limit not given for MODE -l */
***************
*** 1280,1311 ****
case 'k':
if (add) {
channel->modes |= MODE_KEY;
! if(key) {
! safestrncpy(channel->key, key, sizeof(channel->key));
! } else {
! unsigned int n;
!
! if(!*word) {
! return 0;
! }
! for (n=0; (*word != ' ' && *word) && (n < sizeof(channel->key)-1); n++) {
! channel->key[n] = *word++;
! }
! channel->key[n] = 0;
! advance_word;
! }
} else {
/* Gobble up the key to preserve the alignment between
letters and arguments. */
! if(!key)
! {
! if(!*word) {
! return 0;
! }
! advance_word;
! }
!
channel->modes &= ~MODE_KEY;
}
break;
case 'o':
--- 1271,1289 ----
case 'k':
if (add) {
+ unsigned int n;
+
+ if(!*word) return 0;
+ for (n=0; (*word != ' ' && *word) && (n < sizeof(channel->key)-1); n++) {
+ channel->key[n] = *word++;
+ }
channel->modes |= MODE_KEY;
! channel->key[n] = 0;
} else {
/* Gobble up the key to preserve the alignment between
letters and arguments. */
! if(!*word) return 0;
channel->modes &= ~MODE_KEY;
}
+ advance_word;
break;
case 'o':
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** proto-p10.c 12 Nov 2002 02:28:42 -0000 1.44
--- proto-p10.c 14 Nov 2002 02:22:36 -0000 1.45
***************
*** 859,863 ****
* bad-word channel checking.
*/
! cn = AddChannel(name, cd->when, "", "", 0, NULL);
if (cn) {
struct modeNode *mn = AddChannelUser(cd->user, cn);
--- 859,863 ----
* bad-word channel checking.
*/
! cn = AddChannel(name, cd->when, NULL, NULL);
if (cn) {
struct modeNode *mn = AddChannelUser(cd->user, cn);
***************
*** 946,952 ****
{
extern int rel_age;
! char *members = "", *banlist = NULL;
! const char *key = NULL, *modes = NULL;
! unsigned int limit = 0, next = 3, res = 1;
struct chanNode *cNode;
struct userNode *un;
--- 946,951 ----
{
extern int rel_age;
! char modes[MAXLEN], *members = "", *banlist = NULL;
! unsigned int next = 3, res = 1;
struct chanNode *cNode;
struct userNode *un;
***************
*** 961,971 ****
case '+': {
const char *pos;
! modes = argv[next++];
! for (pos=modes; *pos; pos++) {
! if (*pos == 'k') key = argv[next++];
! else if (*pos == 'l') limit = atoi(argv[next++]);
}
}
- break;
case '%': banlist = argv[next++]+1; break;
default: members = argv[next++]; break;
--- 960,971 ----
case '+': {
const char *pos;
! int n_modes;
! for (pos=argv[next], n_modes = 1; *pos; pos++) {
! if ((*pos == 'k') || (*pos == 'l')) n_modes++;
}
+ unsplit_string(argv+next, n_modes, modes);
+ next++;
+ break;
}
case '%': banlist = argv[next++]+1; break;
default: members = argv[next++]; break;
***************
*** 978,982 ****
irc_burst(cNode);
}
! cNode = AddChannel(argv[1], (time_t)atoi(argv[2]), modes, key, limit, banlist);
/* Burst channel members in now. */
--- 978,982 ----
irc_burst(cNode);
}
! cNode = AddChannel(argv[1], (time_t)atoi(argv[2]), modes, banlist);
/* Burst channel members in now. */
***************
*** 1040,1044 ****
modes = unsplit_string(argv + 2, argc - 2, NULL);
! return mod_chanmode(cn, un, modes, NULL, 0);
}
--- 1040,1044 ----
modes = unsplit_string(argv + 2, argc - 2, NULL);
! return mod_chanmode(cn, un, modes);
}
***************
*** 1067,1071 ****
modes = unsplit_string(argv + 2, argc - 2, NULL);
! return mod_chanmode(cn, un, modes, NULL, 0);
}
--- 1067,1071 ----
modes = unsplit_string(argv + 2, argc - 2, NULL);
! return mod_chanmode(cn, un, modes);
}
***************
*** 1206,1210 ****
if ((cn = GetChannel(target_list))) {
AddChannelUser(user, cn);
! } else if ((cn = AddChannel(target_list, 0, "", "", 0, NULL))) {
struct modeNode *mn = AddChannelUser(user, cn);
if (mn) mn->modes = MODE_CHANOP;
--- 1206,1210 ----
if ((cn = GetChannel(target_list))) {
AddChannelUser(user, cn);
! } else if ((cn = AddChannel(target_list, 0, NULL, NULL))) {
struct modeNode *mn = AddChannelUser(user, cn);
if (mn) mn->modes = MODE_CHANOP;
***************
*** 1923,1927 ****
}
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit, int member)
{
const char *start = modes, *word = modes;
--- 1923,1927 ----
}
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, int member)
{
const char *start = modes, *word = modes;
***************
*** 2011,2020 ****
success:
! return mod_chanmode(channel, who, start, key, limit);
}
int
! mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit)
{
const char *word = modes;
--- 2011,2020 ----
success:
! return mod_chanmode(channel, who, start);
}
int
! mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes)
{
const char *word = modes;
***************
*** 2057,2074 ****
case 'l':
if (add) {
! channel->modes |= MODE_LIMIT;
! if(limit) {
! channel->limit = limit;
! } else {
! if(!*word) {
! return 0;
! }
! channel->limit = strtoul(word, NULL, 0);
! advance_word;
! }
!
! if(!channel->limit) {
! channel->modes &= ~MODE_LIMIT;
! }
} else {
/* Old limit not given for MODE -l */
--- 2057,2065 ----
case 'l':
if (add) {
! if(!*word) return 0;
! channel->limit = strtoul(word, NULL, 0);
! advance_word;
! if(channel->limit) channel->modes |= MODE_LIMIT;
! else channel->modes &= ~MODE_LIMIT;
} else {
/* Old limit not given for MODE -l */
***************
*** 2078,2109 ****
case 'k':
if (add) {
channel->modes |= MODE_KEY;
! if(key) {
! safestrncpy(channel->key, key, sizeof(channel->key));
! } else {
! unsigned int n;
!
! if(!*word) {
! return 0;
! }
! for (n=0; (*word != ' ' && *word) && (n < sizeof(channel->key)-1); n++) {
! channel->key[n] = *word++;
! }
! channel->key[n] = 0;
! advance_word;
! }
} else {
! /* Gobble up the key to preserve the alignment between
! letters and arguments. */
! if(!key)
! {
! if(!*word) {
! return 0;
! }
! advance_word;
! }
!
channel->modes &= ~MODE_KEY;
}
break;
case 'o':
--- 2069,2085 ----
case 'k':
if (add) {
+ unsigned int n;
+
+ if(!*word) return 0;
channel->modes |= MODE_KEY;
! for (n=0; (*word != ' ' && *word) && (n < sizeof(channel->key)-1); n++) {
! channel->key[n] = *word++;
! }
! channel->key[n] = 0;
} else {
! if(!*word) return 0;
channel->modes &= ~MODE_KEY;
}
+ advance_word;
break;
case 'o':
Index: proto.h
===================================================================
RCS file: /cvsroot/srvx/services/src/proto.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** proto.h 21 Oct 2002 03:49:14 -0000 1.68
--- proto.h 14 Nov 2002 02:22:36 -0000 1.69
***************
*** 180,185 ****
/* Channel modes */
int irc_make_chanmode(struct chanNode *chan, char *out);
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit, int member);
! int mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, const char *key, int limit);
/* (most protocols will want to make an AddUser helper function) */
--- 180,185 ----
/* Channel modes */
int irc_make_chanmode(struct chanNode *chan, char *out);
! int verify_mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes, int member);
! int mod_chanmode(struct chanNode *channel, struct userNode *who, const char *modes);
/* (most protocols will want to make an AddUser helper function) */
|
|
From: Entrope <en...@us...> - 2002-11-14 02:21:16
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv820/src
Modified Files:
chanserv.help
Log Message:
document the createnote, removenote commands
Index: chanserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.help,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** chanserv.help 5 Nov 2002 03:08:38 -0000 1.43
--- chanserv.help 14 Nov 2002 02:21:13 -0000 1.44
***************
*** 135,138 ****
--- 135,147 ----
"You may use *Account instead of Nick as the name argument; the * makes $C use the name of a account directly (useful if the user is not online).",
"$uSee Also:$u clvl, access, users");
+ "CREATENOTE" ("/msg $S CREATENOTE <typename> <set-access> [access-arg] <view-access> <max-length>",
+ "Defines a new note type. $btypename$b is the name of the note type. $bset-access$b is one of:",
+ " $bPRIVILEGED$b with required $baccess-arg$b being the minimum OpServ level to set",
+ " $bCHANNEL $b with required $baccess-arg$b being the channel access level to set",
+ " $bSETTER $b (with no access-arg) to allow anyone who can !set to set",
+ "$bview-access$b is one of $bPRIVILEGED$b, $bCHANNEL_USERS$b, or $bALL$b, that determines who can see the note (if it is set).",
+ "$bmax-length$b is the maximum length for this kind of note.",
+ "If the note type already exists, it is modified with the new values you specify.",
+ "$uSee Also:$u removenote");
"CSUSPEND" ("/msg $C CSUSPEND <#channel> <duration> <reason>",
"This command will temporarily remove $b$C$b from a channel and suspend its registration.",
***************
*** 262,265 ****
--- 271,277 ----
"In addition, $bregister$b will only allow one user to own a certain number of channels without the $bforce$b argument.",
"$uSee Also:$u addowner, noregister, unregister");
+ "REMOVENOTE" ("/msg $S REMOVENOTE <typename> [FORCE]",
+ "Permanently deletes a note type. Without the argument $bFORCE$b, it will only delete an unused note type. With the argument $bFORCE$b, it will delete the note from all channels and then delete the note type.",
+ "$uSee Also:$u createnote");
"SAY" ("/msg $C SAY <#channel> <text>",
"Makes $b$C$b send a message to the specified channel.",
|
|
From: Entrope <en...@us...> - 2002-11-14 00:51:10
|
Update of /cvsroot/srvx/services
In directory usw-pr-cvs1:/tmp/cvs-serv18272
Modified Files:
srvx.conf.example
Log Message:
add a comment about what the "hidden_host" does (and does not) do
Index: srvx.conf.example
===================================================================
RCS file: /cvsroot/srvx/services/srvx.conf.example,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** srvx.conf.example 9 Nov 2002 03:44:50 -0000 1.33
--- srvx.conf.example 14 Nov 2002 00:51:07 -0000 1.34
***************
*** 243,246 ****
--- 243,249 ----
"network" "GenericNET";
"hidden_host" "users.Generic.NET"; // set this if you enabled ircd/Undernet's +x mode
+ /* hidden_host should match the F:HIDDEN_HOST: line in your ircu's ircd.conf;
+ * srvx does not set the host suffix for users, but must know it when making
+ * things like bans, where it should not show the user's real hostname. */
"numeric" "10"; // hint: If you get collisions on link, CHANGE THIS.
"max_users" "256"; // You can save a little memory by setting this to a lower value.
|
|
From: Entrope <en...@us...> - 2002-11-14 00:50:42
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv18023/src
Modified Files:
expnhelp.c
Log Message:
explain why the user probably has an exec() failure in expnhelp
Index: expnhelp.c
===================================================================
RCS file: /cvsroot/srvx/services/src/expnhelp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** expnhelp.c 15 Aug 2002 02:49:26 -0000 1.5
--- expnhelp.c 14 Nov 2002 00:50:39 -0000 1.6
***************
*** 78,81 ****
--- 78,82 ----
execvp("m4", new_argv->list);
fprintf(stderr, "Error in exec: %s (%d)\n", strerror(errno), errno);
+ fprintf(stderr, "Maybe you do not have the 'm4' program installed?\n");
return 1;
}
|
|
From: Entrope <en...@us...> - 2002-11-14 00:50:25
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv17837/src
Modified Files:
opserv.c
Log Message:
fix another little memory leak
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.289
retrieving revision 1.290
diff -C2 -r1.289 -r1.290
*** opserv.c 12 Nov 2002 02:28:42 -0000 1.289
--- opserv.c 14 Nov 2002 00:50:23 -0000 1.290
***************
*** 2381,2384 ****
--- 2381,2385 ----
matched = 0;
}
+ free(discrim);
free(dupmask);
return matched;
|
|
From: Entrope <en...@us...> - 2002-11-14 00:50:13
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv17729/src
Modified Files:
saxdb.c
Log Message:
make ?write access match OpServ's old ?write (and ?writeall, both old and new)
Index: saxdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/saxdb.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** saxdb.c 4 Nov 2002 04:28:22 -0000 1.20
--- saxdb.c 14 Nov 2002 00:50:10 -0000 1.21
***************
*** 430,434 ****
saxdb_register("mondo", saxdb_mondo_reader, saxdb_mondo_writer);
saxdb_module = module_register("saxdb", MAIN_LOG, "saxdb.help", saxdb_expand_help);
! modcmd_register(saxdb_module, "write", cmd_write, 2, MODCMD_REQUIRE_AUTHED, "flags", "+oper", NULL);
modcmd_register(saxdb_module, "writeall", cmd_writeall, 0, MODCMD_REQUIRE_AUTHED, "access", "800", NULL);
}
--- 430,434 ----
saxdb_register("mondo", saxdb_mondo_reader, saxdb_mondo_writer);
saxdb_module = module_register("saxdb", MAIN_LOG, "saxdb.help", saxdb_expand_help);
! modcmd_register(saxdb_module, "write", cmd_write, 2, MODCMD_REQUIRE_AUTHED, "access", "800", NULL);
modcmd_register(saxdb_module, "writeall", cmd_writeall, 0, MODCMD_REQUIRE_AUTHED, "access", "800", NULL);
}
|
|
From: Entrope <en...@us...> - 2002-11-14 00:49:50
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv17448/src
Modified Files:
mod-snoop.c
Log Message:
have a macro to update "timestamp" instead of lots of different variables
don't show PARTs for a dying user
Index: mod-snoop.c
===================================================================
RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** mod-snoop.c 12 Nov 2002 02:28:41 -0000 1.7
--- mod-snoop.c 14 Nov 2002 00:49:47 -0000 1.8
***************
*** 46,54 ****
#define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS)
static void
snoop_nick_change(struct userNode *user, const char *new_nick) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
SNOOP("$bNICK$b change %s -> %s", user->nick, new_nick);
}
--- 46,55 ----
#define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS)
+ #define UPDATE_TIMESTAMP() strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now))
static void
snoop_nick_change(struct userNode *user, const char *new_nick) {
if (!snoop_cfg.enabled) return;
! UPDATE_TIMESTAMP();
SNOOP("$bNICK$b change %s -> %s", user->nick, new_nick);
}
***************
*** 60,64 ****
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
if (chan->members.used == 1) {
SNOOP("$bCREATE$b %s by %s", chan->name, user->nick);
--- 61,65 ----
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
! UPDATE_TIMESTAMP();
if (chan->members.used == 1) {
SNOOP("$bCREATE$b %s by %s", chan->name, user->nick);
***************
*** 72,76 ****
snoop_part(struct userNode *user, struct chanNode *chan, const char *reason) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
SNOOP("$bPART$b %s by %s (%s)", chan->name, user->nick, reason ? reason : "");
}
--- 73,78 ----
snoop_part(struct userNode *user, struct chanNode *chan, const char *reason) {
if (!snoop_cfg.enabled) return;
! if (user->dead) return;
! UPDATE_TIMESTAMP();
SNOOP("$bPART$b %s by %s (%s)", chan->name, user->nick, reason ? reason : "");
}
***************
*** 79,83 ****
snoop_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *chan) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
SNOOP("$bKICK$b %s from %s by %s", victim->nick, chan->name, kicker->nick);
}
--- 81,85 ----
snoop_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *chan) {
if (!snoop_cfg.enabled) return;
! UPDATE_TIMESTAMP();
SNOOP("$bKICK$b %s from %s by %s", victim->nick, chan->name, kicker->nick);
}
***************
*** 87,91 ****
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
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,
--- 89,93 ----
if (!snoop_cfg.enabled) return 0;
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,
***************
*** 97,101 ****
snoop_del_user(struct userNode *user, struct userNode *killer, const char *why) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
if (killer) {
SNOOP("$bKILL$b %s (%s@%s, on %s) by %s (%s)", user->nick, user->ident, user->hostname, user->uplink->name, killer->nick, why);
--- 99,103 ----
snoop_del_user(struct userNode *user, struct userNode *killer, const char *why) {
if (!snoop_cfg.enabled) return;
! UPDATE_TIMESTAMP();
if (killer) {
SNOOP("$bKILL$b %s (%s@%s, on %s) by %s (%s)", user->nick, user->ident, user->hostname, user->uplink->name, killer->nick, why);
***************
*** 110,114 ****
if (!snoop_cfg.enabled) return;
if (user->handle_info) {
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
SNOOP("$bAUTH$b %s as %s", user->nick, user->handle_info->handle);
}
--- 112,116 ----
if (!snoop_cfg.enabled) return;
if (user->handle_info) {
! UPDATE_TIMESTAMP();
SNOOP("$bAUTH$b %s as %s", user->nick, user->handle_info->handle);
}
***************
*** 131,138 ****
snoop_cfg.channel = AddChannel(str, now, "+sntim", NULL, 0, NULL);
if (!snoop_cfg.channel) return;
- str = database_get_data(node, "show_bursts", RECDB_QSTRING);
- snoop_cfg.show_bursts = str ? enabled_string(str) : 0;
AddChannelUser(snoop_cfg.bot, snoop_cfg.channel);
AddChannelOp(1, &snoop_cfg.bot, snoop_cfg.channel, snoop_cfg.bot, 1);
snoop_cfg.enabled = 1;
}
--- 133,140 ----
snoop_cfg.channel = AddChannel(str, now, "+sntim", NULL, 0, NULL);
if (!snoop_cfg.channel) return;
AddChannelUser(snoop_cfg.bot, snoop_cfg.channel);
AddChannelOp(1, &snoop_cfg.bot, snoop_cfg.channel, snoop_cfg.bot, 1);
+ str = database_get_data(node, "show_bursts", RECDB_QSTRING);
+ snoop_cfg.show_bursts = str ? enabled_string(str) : 0;
snoop_cfg.enabled = 1;
}
|
|
From: Entrope <en...@us...> - 2002-11-12 20:19:00
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv14505/src
Modified Files:
modcmd.c
Log Message:
set effective flags after copying rule flags from one command to another
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** modcmd.c 31 Oct 2002 03:40:08 -0000 1.37
--- modcmd.c 12 Nov 2002 20:18:56 -0000 1.38
***************
*** 249,252 ****
--- 249,263 ----
static void
+ modcmd_set_effective_flags(struct svccmd *cmd) {
+ int flags = cmd->flags | cmd->command->flags;
+ if (cmd->min_opserv_level > 0) flags |= MODCMD_REQUIRE_OPER;
+ if (cmd->min_channel_access > ulNone) flags |= MODCMD_REQUIRE_CHANUSER;
+ if (flags & MODCMD_REQUIRE_CHANUSER) flags |= MODCMD_REQUIRE_REGCHAN;
+ if (flags & MODCMD_REQUIRE_JOINABLE) flags |= MODCMD_REQUIRE_CHANNEL;
+ if (flags & (MODCMD_REQUIRE_STAFF|MODCMD_REQUIRE_HELPING)) flags |= MODCMD_REQUIRE_AUTHED;
+ cmd->effective_flags = flags;
+ }
+
+ static void
svccmd_copy_rules(struct svccmd *dest, struct svccmd *src) {
dest->flags |= src->flags;
***************
*** 262,265 ****
--- 273,277 ----
dest->min_channel_access = src->min_channel_access;
}
+ modcmd_set_effective_flags(dest);
}
***************
*** 359,373 ****
return 0;
}
- }
-
- static void
- modcmd_set_effective_flags(struct svccmd *cmd) {
- int flags = cmd->flags | cmd->command->flags;
- if (cmd->min_opserv_level > 0) flags |= MODCMD_REQUIRE_OPER;
- if (cmd->min_channel_access > ulNone) flags |= MODCMD_REQUIRE_CHANUSER;
- if (flags & MODCMD_REQUIRE_CHANUSER) flags |= MODCMD_REQUIRE_REGCHAN;
- if (flags & MODCMD_REQUIRE_JOINABLE) flags |= MODCMD_REQUIRE_CHANNEL;
- if (flags & (MODCMD_REQUIRE_STAFF|MODCMD_REQUIRE_HELPING)) flags |= MODCMD_REQUIRE_AUTHED;
- cmd->effective_flags = flags;
}
--- 371,374 ----
|
|
From: Entrope <en...@us...> - 2002-11-12 19:09:25
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv427/src
Modified Files:
nickserv.help.m4
Log Message:
remove now-redundant command names in help file entries
Index: nickserv.help.m4
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.help.m4,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** nickserv.help.m4 11 Nov 2002 04:59:56 -0000 1.13
--- nickserv.help.m4 12 Nov 2002 19:09:23 -0000 1.14
***************
*** 36,47 ****
"$b$N$b can tell you what account a user is authenticated to using the $bUSERINFO$b command. Any problems with account registration or $b$N$b should be directed to the normal support channel.");
! "OUNREGISTER" ("$bOUNREGISTER$b",
! "/msg $N OUNREGISTER <nick|*account>",
"Un-registers the specified account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister");
! "UNREGISTER" ("$bUNREGISTER$b",
! "/msg $n UNREGISTER <password>",
"Un-registers the account you are authenticated as.",
"$uSee Also:$u register");},
--- 36,45 ----
"$b$N$b can tell you what account a user is authenticated to using the $bUSERINFO$b command. Any problems with account registration or $b$N$b should be directed to the normal support channel.");
! "OUNREGISTER" ("/msg $N OUNREGISTER <nick|*account>",
"Un-registers the specified account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister");
! "UNREGISTER" ("/msg $n UNREGISTER <password>",
"Un-registers the account you are authenticated as.",
"$uSee Also:$u register");},
***************
*** 53,95 ****
" RECLAIM Reclaim a nick registered to you.");
! "NICKINFO" ("$bNICKINFO$b",
! "/msg $N NICKINFO <nick>",
"Displays information on the nick specified.",
"$uSee Also:$u accountinfo, userinfo");
! "REGNICK" ("$bREGNICK$b",
! "/msg $N REGNICK ",
"Registers your current nick to the account you are authenticated to.",
"$uSee Also:$u register, unregister, unregnick");
! "OUNREGISTER" ("$bOUNREGISTER$b",
! "/msg $N OUNREGISTER <nick|*account>",
"Un-registers the specified account, and any nicks that have been registered to that account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister, oregnick, ounregnick");
! "OREGNICK" ("$bOREGNICK$b",
! "/msg $N OREGNICK [<nick> <nick|*account>]",
"Registers specified nick to the specified account. If nick and account are not specified, then $boregnick$b registers your current nick to the account you are authenticated to.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister, ounregister, ounregnick");
! "OUNREGNICK" ("$bOUNREGNICK$b",
! "/msg $N OUNREGNICK <nick>",
"Un-registers a nick that was previously registered to an account.",
"$uSee Also:$u oregister, oregnick, ounregister");
! "UNREGISTER" ("$bUNREGISTER$b",
! "/msg $N@$s UNREGISTER <password>",
"Un-registers the account you are authenticated with, and any nicks that have been registered to that account.",
"$uSee Also:$u register, regnick, unregnick");
! "UNREGNICK" ("$bUNREGNICK$b",
! "/msg $N UNREGNICK [nick]",
"Un-registers a nick that was previously registered to your account. If you do not specify a nick, your current nick will be un-registered.",
"$uSee Also:$u register, regnick, unregister");
! "RECLAIM" ("$bRECLAIM$b",
! "/msg $N RECLAIM <nick>",
"Reclaims the specified nick. You must be authenticated to the account that registered the nick.",
"Depending on configuration, this may do nothing, may ask the user nicely, may force a nick change on them, or may /KILL (disconnect) the target user.");})
--- 51,85 ----
" RECLAIM Reclaim a nick registered to you.");
! "NICKINFO" ("/msg $N NICKINFO <nick>",
"Displays information on the nick specified.",
"$uSee Also:$u accountinfo, userinfo");
! "REGNICK" ("/msg $N REGNICK ",
"Registers your current nick to the account you are authenticated to.",
"$uSee Also:$u register, unregister, unregnick");
! "OUNREGISTER" ("/msg $N OUNREGISTER <nick|*account>",
"Un-registers the specified account, and any nicks that have been registered to that account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister, oregnick, ounregnick");
! "OREGNICK" ("/msg $N OREGNICK [<nick> <nick|*account>]",
"Registers specified nick to the specified account. If nick and account are not specified, then $boregnick$b registers your current nick to the account you are authenticated to.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oregister, ounregister, ounregnick");
! "OUNREGNICK" ("/msg $N OUNREGNICK <nick>",
"Un-registers a nick that was previously registered to an account.",
"$uSee Also:$u oregister, oregnick, ounregister");
! "UNREGISTER" ("/msg $N@$s UNREGISTER <password>",
"Un-registers the account you are authenticated with, and any nicks that have been registered to that account.",
"$uSee Also:$u register, regnick, unregnick");
! "UNREGNICK" ("/msg $N UNREGNICK [nick]",
"Un-registers a nick that was previously registered to your account. If you do not specify a nick, your current nick will be un-registered.",
"$uSee Also:$u register, regnick, unregister");
! "RECLAIM" ("/msg $N RECLAIM <nick>",
"Reclaims the specified nick. You must be authenticated to the account that registered the nick.",
"Depending on configuration, this may do nothing, may ask the user nicely, may force a nick change on them, or may /KILL (disconnect) the target user.");})
***************
*** 103,126 ****
" EMAIL POLICY This network's policy on account email addresses.");
! "AUTHCOOKIE" ("$bAUTHCOOKIE$b",
! "/msg $N AUTHCOOKIE <account>",
"Requests that $N send you email with a cookie that allows you to auth to your account if you do not have a matching hostmask. (For example, if your ISP changed your IP or hostname.)",
"Once you receive the cookie in email, you can use the $bcookie$b command to log in.",
"$uSee Also:$u cookie, delcookie");
! "RESETPASS" ("$bRESETPASS$b",
! "/msg $N@$s RESETPASS <account> <newpassword>",
"Requests that $N send you email with a cookie that will change your password (in case you have forgotten it). Once you receive the cookie in email, use the $bcookie$b command to actually change your password.",
"$bYour password will not be changed, and you will not be able to use it to log in, until you confirm the change using the $ucookie$u command.$b",
"$uSee Also:$u cookie, delcookie");
! "DELCOOKIE" ("$bDELCOOKIE$b",
! "/msg $N DELCOOKIE",
"Requests that $N cancel your authcookie or resetpass cookie.",
"(Since set-email cookies and registration cookies send email to unverified addresses, to prevent mail flooding, they cannot be cancelled.)",
"$uSee Also:$u authcookie, resetpass, cookie");
! "COOKIE" ("$bCOOKIE$b",
! "/msg $N@$s COOKIE <account> <cookie>",
"Completes the maintenance action (for example, activating an account or changing your password) for which a cookie was issued. The cookie will then be forgotten.",
"$uSee Also:$u authcookie, resetpass, set, delcookie");
--- 93,112 ----
" EMAIL POLICY This network's policy on account email addresses.");
! "AUTHCOOKIE" ("/msg $N AUTHCOOKIE <account>",
"Requests that $N send you email with a cookie that allows you to auth to your account if you do not have a matching hostmask. (For example, if your ISP changed your IP or hostname.)",
"Once you receive the cookie in email, you can use the $bcookie$b command to log in.",
"$uSee Also:$u cookie, delcookie");
! "RESETPASS" ("/msg $N@$s RESETPASS <account> <newpassword>",
"Requests that $N send you email with a cookie that will change your password (in case you have forgotten it). Once you receive the cookie in email, use the $bcookie$b command to actually change your password.",
"$bYour password will not be changed, and you will not be able to use it to log in, until you confirm the change using the $ucookie$u command.$b",
"$uSee Also:$u cookie, delcookie");
! "DELCOOKIE" ("/msg $N DELCOOKIE",
"Requests that $N cancel your authcookie or resetpass cookie.",
"(Since set-email cookies and registration cookies send email to unverified addresses, to prevent mail flooding, they cannot be cancelled.)",
"$uSee Also:$u authcookie, resetpass, cookie");
! "COOKIE" ("/msg $N@$s COOKIE <account> <cookie>",
"Completes the maintenance action (for example, activating an account or changing your password) for which a cookie was issued. The cookie will then be forgotten.",
"$uSee Also:$u authcookie, resetpass, set, delcookie");
***************
*** 140,154 ****
" HELP Get help on $b$N$b.");
! "ADDMASK" ("$bADDMASK$b",
! "/msg $N ADDMASK [user@host]",
"Adds the specified user@host to the account you are authenticated to with $b$N$b. If no mask is given, it uses your current mask.",
"$uSee Also:$u auth, delmask");
! "ALLOWAUTH" ("$bALLOWAUTH$b",
! "/msg $N ALLOWAUTH <nick> [account]",
"Allows the specified nick to $bauth$b to the specified account. $bAllowauth$b does NOT add the hostmask of that nick to the specified account.",
"If no account is given, it will cancel the allowauth for the user (assuming the user has an allowauth).",
"$uSee Also:$u addmask, auth");
! "AUTH" ("$bAUTH$b",
! "/msg $N@$s AUTH [account] <password>",
"Authenticates yourself with $b$N$b to the specified account. You must use $bauth$b before you have any access to network services, including channels that are registered with $b$C$b.",
"If you omit the account, it uses your current nick as your account name.",
--- 126,137 ----
" HELP Get help on $b$N$b.");
! "ADDMASK" ("/msg $N ADDMASK [user@host]",
"Adds the specified user@host to the account you are authenticated to with $b$N$b. If no mask is given, it uses your current mask.",
"$uSee Also:$u auth, delmask");
! "ALLOWAUTH" ("/msg $N ALLOWAUTH <nick> [account]",
"Allows the specified nick to $bauth$b to the specified account. $bAllowauth$b does NOT add the hostmask of that nick to the specified account.",
"If no account is given, it will cancel the allowauth for the user (assuming the user has an allowauth).",
"$uSee Also:$u addmask, auth");
! "AUTH" ("/msg $N@$s AUTH [account] <password>",
"Authenticates yourself with $b$N$b to the specified account. You must use $bauth$b before you have any access to network services, including channels that are registered with $b$C$b.",
"If you omit the account, it uses your current nick as your account name.",
***************
*** 157,167 ****
{ "$uSee Also:$u pass"})
);
! "DELMASK" ("$bDELMASK$b",
! "/msg $N DELMASK <user@host>",
"Removes a hostmask from the account you are authenticated on.",
"An account must have at least one hostmask; you cannot remove the last mask for an account.",
"$uSee Also:$u addmask");
! "ACCOUNTINFO" ("$bACCOUNTINFO$b",
! "/msg $N ACCOUNTINFO <nick|*account>",
"Displays infomation on the specified account, including the date the account was registered, the last time that person was seen, the account's $b$N$b info, its flags, its hostmask(s), its channels, and the account's current nickname.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
--- 140,148 ----
{ "$uSee Also:$u pass"})
);
! "DELMASK" ("/msg $N DELMASK <user@host>",
"Removes a hostmask from the account you are authenticated on.",
"An account must have at least one hostmask; you cannot remove the last mask for an account.",
"$uSee Also:$u addmask");
! "ACCOUNTINFO" ("/msg $N ACCOUNTINFO <nick|*account>",
"Displays infomation on the specified account, including the date the account was registered, the last time that person was seen, the account's $b$N$b info, its flags, its hostmask(s), its channels, and the account's current nickname.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
***************
*** 181,203 ****
"$bn$b No-delete (will never be unregistered for inactivity)",
"$uSee Also:$u accountinfo, set");
! "OADDMASK" ("$bOADDMASK$b",
! "/msg $N OADDMASK <nick|*account> <user@host>",
"Adds a hostmask to the specified account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u odelmask");
! "ODELMASK" ("$bODELMASK$b",
! "/msg $N ODELMASK <nick|*account> <user@host>",
"Removes a hostmask from the specified account.",
"An account must have at least one hostmask; you cannot remove the last mask for an account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oaddmask");
! "OREGISTER" ("$bOREGISTER$b",
! "/msg $N@$s OREGISTER <account> <password> <user@host|nick>",
"Registers an account with $b$N$b using the specified account, password, and user@host. If then nick of an online user is specified, then that user's user@host is used.",
ifdef({/services/nickserv/disable_nicks},
{ "$uSee Also:$u ounregister"},
{ "$uSee Also:$u oregnick, ounregister, ounregnick"}));
! "OSET" ("$bOSET$b",
! "/msg $N OSET <nick|*account> [<setting> <value>]",
"Changes an account's settings for srvx. In addition to the normal $bset$b settings, you may set:",
"$bPASSWORD$b: Sets user's password.",
--- 162,180 ----
"$bn$b No-delete (will never be unregistered for inactivity)",
"$uSee Also:$u accountinfo, set");
! "OADDMASK" ("/msg $N OADDMASK <nick|*account> <user@host>",
"Adds a hostmask to the specified account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u odelmask");
! "ODELMASK" ("/msg $N ODELMASK <nick|*account> <user@host>",
"Removes a hostmask from the specified account.",
"An account must have at least one hostmask; you cannot remove the last mask for an account.",
"You may use *Account instead of Nick as the name argument; the * makes $N use the name of an account directly (useful if the user is not online).",
"$uSee Also:$u oaddmask");
! "OREGISTER" ("/msg $N@$s OREGISTER <account> <password> <user@host|nick>",
"Registers an account with $b$N$b using the specified account, password, and user@host. If then nick of an online user is specified, then that user's user@host is used.",
ifdef({/services/nickserv/disable_nicks},
{ "$uSee Also:$u ounregister"},
{ "$uSee Also:$u oregnick, ounregister, ounregnick"}));
! "OSET" ("/msg $N OSET <nick|*account> [<setting> <value>]",
"Changes an account's settings for srvx. In addition to the normal $bset$b settings, you may set:",
"$bPASSWORD$b: Sets user's password.",
***************
*** 209,217 ****
{ "$uSee Also:$u accountinfo, account flags, set, userinfo"},
{ "$uSee Also:$u accountinfo, account flags, nickinfo, set, userinfo"}));
! "PASS" ("$bPASS$b",
! "/msg $N@$s PASS <oldpass> <newpass>",
"Changes your $b$N$b password.",
"$uSee Also:$u auth");
! "REGISTER" ("$bREGISTER$b",
ifdef({/services/nickserv/email_enabled},
{ifdef({/services/nickserv/email_required},
--- 186,193 ----
{ "$uSee Also:$u accountinfo, account flags, set, userinfo"},
{ "$uSee Also:$u accountinfo, account flags, nickinfo, set, userinfo"}));
! "PASS" ("/msg $N@$s PASS <oldpass> <newpass>",
"Changes your $b$N$b password.",
"$uSee Also:$u auth");
! "REGISTER" (
ifdef({/services/nickserv/email_enabled},
{ifdef({/services/nickserv/email_required},
***************
*** 228,233 ****
{ "$uSee Also:$u auth, unregister"},
{ "$uSee Also:$u auth, regnick, unregister, unregnick"}));
! "SET" ("$bSET$b",
! "/msg $N SET [<setting> [value]]",
"Changes your account settings for srvx. Settings are:",
"$bANNOUNCEMENTS$b: Indicates whether you wish to receive community announcements via the $G service.",
--- 204,208 ----
{ "$uSee Also:$u auth, unregister"},
{ "$uSee Also:$u auth, regnick, unregister, unregnick"}));
! "SET" ("/msg $N SET [<setting> [value]]",
"Changes your account settings for srvx. Settings are:",
"$bANNOUNCEMENTS$b: Indicates whether you wish to receive community announcements via the $G service.",
***************
*** 244,277 ****
{ "$uSee Also:$u accountinfo, userinfo"},
{ "$uSee Also:$u accountinfo, nickinfo, userinfo"}));
! "STATUS" ("$bSTATUS$b",
! "/msg $N STATUS",
ifdef({/services/nickserv/disable_nicks},
{ "Displays information about the status of $b$N$b, including the total number of accounts in its database."},
{ "Displays information about the status of $b$N$b, including the total number of accounts and nicks that are registered in its database, and how many nicks are registered to your account (if you are authenticated to one)."}));
! "USERINFO" ("$bUSERINFO$b",
! "/msg $N USERINFO <nick>",
"Shows what account the nick specified is authenticated to.",
"$uSee Also:$u auth, accountinfo");
! "VERSION" ("$bVERSION$b",
! "/msg $N VERSION",
"Sends you the srvx version and some additional version information that is specific to $b$N$b.");
! "WRITE" ("$bWRITE$b",
! "/msg $N WRITE",
"Writes the $b$N$b database to disk.");
! "GHOST" ("$bGHOST$b",
! "/msg $N GHOST <nick>",
"This disconnects an old client that is authed to your account. This is $bnot$b the same thing as nick ownership; the user $bmust$b be authenticated to the same account you are.",
"$uSee Also:$u auth");
! "RENAME" ("$bRENAME$b",
! "/msg $N RENAME <nick|*old-account> <new-account>",
"Renames an account.",
"This command is only accessible to helpers and IRC operators.",
"$uSee Also:$u merge");
! "VACATION" ("$bVACATION$b",
! "/msg $N VACATION",
"Marks your account as \"on vacation\" until the next time you authenticate to $N.",
"While you are \"on vacation\", your account will not be deleted for inactivity.");
! "SEARCH" ("$bSEARCH$b",
! "/msg $N SEARCH <action> <criteria> <value> [<criteria> <value>]...",
"Searches for accounts matching the critera, and then does something to them.",
"$uSee Also:$u search action, search criteria");
--- 219,244 ----
{ "$uSee Also:$u accountinfo, userinfo"},
{ "$uSee Also:$u accountinfo, nickinfo, userinfo"}));
! "STATUS" ("/msg $N STATUS",
ifdef({/services/nickserv/disable_nicks},
{ "Displays information about the status of $b$N$b, including the total number of accounts in its database."},
{ "Displays information about the status of $b$N$b, including the total number of accounts and nicks that are registered in its database, and how many nicks are registered to your account (if you are authenticated to one)."}));
! "USERINFO" ("/msg $N USERINFO <nick>",
"Shows what account the nick specified is authenticated to.",
"$uSee Also:$u auth, accountinfo");
! "VERSION" ("/msg $N VERSION",
"Sends you the srvx version and some additional version information that is specific to $b$N$b.");
! "WRITE" ("/msg $N WRITE",
"Writes the $b$N$b database to disk.");
! "GHOST" ("/msg $N GHOST <nick>",
"This disconnects an old client that is authed to your account. This is $bnot$b the same thing as nick ownership; the user $bmust$b be authenticated to the same account you are.",
"$uSee Also:$u auth");
! "RENAME" ("/msg $N RENAME <nick|*old-account> <new-account>",
"Renames an account.",
"This command is only accessible to helpers and IRC operators.",
"$uSee Also:$u merge");
! "VACATION" ("/msg $N VACATION",
"Marks your account as \"on vacation\" until the next time you authenticate to $N.",
"While you are \"on vacation\", your account will not be deleted for inactivity.");
! "SEARCH" ("/msg $N SEARCH <action> <criteria> <value> [<criteria> <value>]...",
"Searches for accounts matching the critera, and then does something to them.",
"$uSee Also:$u search action, search criteria");
***************
*** 297,307 ****
" ACCESS - An $O access constraint (<nnn, <=nnn, =nnn, >=nnn or >nnn)",
"$uSee Also:$u search, search action");
! "MERGE" ("$bMERGE$b",
! "/msg $N MERGE <from-nick|*from-account> <to-nick|*to-account>",
"Merge access from $bfrom-account$b into $bto-account$b. This includes hostmasks, registered nicks, authed users, access in channels, and OpServ access (if any). If $bto-account$b has equal or greater access than $bfrom-account$b (or more a general hostmask, etc), $bto-account$b keeps that information.",
"This command is only accessible to helpers and IRC operators.",
"$uSee Also:$u rename");
! "MERGEDB" ("$bMERGEDB$b",
! "/msg $N MERGE <dbfilename>",
"Merge contents of $bdbfilename$b into in-memory database. Any accounts in both will be $bOVERWRITTEN$b with the information from $bdbfilename$b, although authed users will be authed to the new account.",
"This command is only accessible to IRC operators.",
--- 264,272 ----
" ACCESS - An $O access constraint (<nnn, <=nnn, =nnn, >=nnn or >nnn)",
"$uSee Also:$u search, search action");
! "MERGE" ("/msg $N MERGE <from-nick|*from-account> <to-nick|*to-account>",
"Merge access from $bfrom-account$b into $bto-account$b. This includes hostmasks, registered nicks, authed users, access in channels, and OpServ access (if any). If $bto-account$b has equal or greater access than $bfrom-account$b (or more a general hostmask, etc), $bto-account$b keeps that information.",
"This command is only accessible to helpers and IRC operators.",
"$uSee Also:$u rename");
! "MERGEDB" ("/msg $N MERGE <dbfilename>",
"Merge contents of $bdbfilename$b into in-memory database. Any accounts in both will be $bOVERWRITTEN$b with the information from $bdbfilename$b, although authed users will be authed to the new account.",
"This command is only accessible to IRC operators.",
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv24537/src
Modified Files:
chanserv.c hash.c hash.h helpserv.c mod-snoop.c nickserv.c
opserv.c proto-bahamut.c proto-p10.c
Log Message:
make PART and QUIT/KILL messages available to callbacks
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -C2 -r1.306 -r1.307
*** chanserv.c 11 Nov 2002 04:55:29 -0000 1.306
--- chanserv.c 12 Nov 2002 02:28:41 -0000 1.307
***************
*** 6206,6210 ****
static void
! handle_part(struct userNode *user, struct chanNode *channel)
{
struct chanData *cData;
--- 6206,6210 ----
static void
! handle_part(struct userNode *user, struct chanNode *channel, const char *reason)
{
struct chanData *cData;
***************
*** 6212,6215 ****
--- 6212,6216 ----
struct handle_info *handle;
+ (void)reason;
cData = channel->channel_info;
if(!cData || IsSuspended(cData) || IsLocal(user)) return;
Index: hash.c
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -C2 -r1.165 -r1.166
*** hash.c 23 Oct 2002 12:37:53 -0000 1.165
--- hash.c 12 Nov 2002 02:28:41 -0000 1.166
***************
*** 542,548 ****
free(mNode);
! for (n=0; n<pf_used; n++) pf_list[n](user, channel);
! if (!deleting && channel->members.used == 0) DelChannel(channel);
}
--- 542,548 ----
free(mNode);
! for (n=0; n<pf_used; n++) pf_list[n](user, channel, reason);
! if (!deleting && !channel->members.used) DelChannel(channel);
}
Index: hash.h
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -r1.94 -r1.95
*** hash.h 23 Oct 2002 12:37:53 -0000 1.94
--- hash.h 12 Nov 2002 02:28:41 -0000 1.95
***************
*** 25,30 ****
#include "dict.h"
! #define MODE_CHANOP 0x0001 /* +o */
! #define MODE_VOICE 0x0002 /* +v */
#define MODE_PRIVATE 0x0004 /* +p */
#define MODE_SECRET 0x0008 /* +s */
--- 25,30 ----
#include "dict.h"
! #define MODE_CHANOP 0x0001 /* +o USER */
! #define MODE_VOICE 0x0002 /* +v USER */
#define MODE_PRIVATE 0x0004 /* +p */
#define MODE_SECRET 0x0008 /* +s */
***************
*** 191,195 ****
typedef int (*new_user_func_t) (struct userNode *user);
void reg_new_user_func(new_user_func_t handler);
! typedef void (*del_user_func_t) (struct userNode *user);
void reg_del_user_func(del_user_func_t handler);
void unreg_del_user_func(del_user_func_t handler);
--- 191,195 ----
typedef int (*new_user_func_t) (struct userNode *user);
void reg_new_user_func(new_user_func_t handler);
! typedef void (*del_user_func_t) (struct userNode *user, struct userNode *killer, const char *why);
void reg_del_user_func(del_user_func_t handler);
void unreg_del_user_func(del_user_func_t handler);
***************
*** 217,221 ****
struct modeNode* AddChannelUser(struct userNode* user, struct chanNode* channel);
! typedef void (*part_func_t) (struct userNode *user, struct chanNode *chan);
void reg_part_func(part_func_t handler);
void unreg_part_func(part_func_t handler);
--- 217,221 ----
struct modeNode* AddChannelUser(struct userNode* user, struct chanNode* channel);
! typedef void (*part_func_t) (struct userNode *user, struct chanNode *chan, const char *reason);
void reg_part_func(part_func_t handler);
void unreg_part_func(part_func_t handler);
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** helpserv.c 11 Nov 2002 05:31:07 -0000 1.50
--- helpserv.c 12 Nov 2002 02:28:41 -0000 1.51
***************
*** 3253,3257 ****
/* Drop requests that persist until part when a user leaves the chan */
! static void handle_part(struct userNode *user, struct chanNode *chan) {
struct helpserv_botlist *botlist;
struct helpserv_userlist *userlist;
--- 3253,3257 ----
/* 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;
***************
*** 3259,3262 ****
--- 3259,3263 ----
unsigned int i;
+ (void)reason;
if ((botlist = dict_find(helpserv_bots_bychan_dict, chan->name, NULL))) {
for (i=0; i < botlist->used; i++) {
***************
*** 3341,3349 ****
* Unassign requests where req->helper persists until the helper parts or
* quits. */
! static void handle_quit(struct userNode *user) {
struct helpserv_reqlist *reqlist;
struct helpserv_userlist *userlist;
unsigned int i, n;
if (IsLocal(user)) {
struct helpserv_bot *hs;
--- 3342,3351 ----
* 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;
Index: mod-snoop.c
===================================================================
RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** mod-snoop.c 7 Nov 2002 01:41:17 -0000 1.6
--- mod-snoop.c 12 Nov 2002 02:28:41 -0000 1.7
***************
*** 36,39 ****
--- 36,40 ----
#include "nickserv.h"
+ extern time_t now;
static struct {
struct chanNode *channel;
***************
*** 42,52 ****
unsigned int enabled : 1;
} snoop_cfg;
! #define SNOOP(FORMAT...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, FORMAT)
static void
snoop_nick_change(struct userNode *user, const char *new_nick) {
if (!snoop_cfg.enabled) return;
! SNOOP("NICK change %s -> %s", user->nick, new_nick);
}
--- 43,55 ----
unsigned int enabled : 1;
} snoop_cfg;
+ static char timestamp[16];
! #define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS)
static void
snoop_nick_change(struct userNode *user, const char *new_nick) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! SNOOP("$bNICK$b change %s -> %s", user->nick, new_nick);
}
***************
*** 57,64 ****
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
if (chan->members.used == 1) {
! SNOOP("CREATE %s by %s", chan->name, user->nick);
} else {
! SNOOP("JOIN %s by %s", chan->name, user->nick);
}
return 0;
--- 60,68 ----
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
+ strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
if (chan->members.used == 1) {
! SNOOP("$bCREATE$b %s by %s", chan->name, user->nick);
} else {
! SNOOP("$bJOIN$b %s by %s", chan->name, user->nick);
}
return 0;
***************
*** 66,72 ****
static void
! snoop_part(struct userNode *user, struct chanNode *chan) {
if (!snoop_cfg.enabled) return;
! SNOOP("PART %s by %s", chan->name, user->nick);
}
--- 70,77 ----
static void
! snoop_part(struct userNode *user, struct chanNode *chan, const char *reason) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! SNOOP("$bPART$b %s by %s (%s)", chan->name, user->nick, reason ? reason : "");
}
***************
*** 74,78 ****
snoop_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *chan) {
if (!snoop_cfg.enabled) return;
! SNOOP("KICK %s from %s by %s", victim->nick, chan->name, kicker->nick);
}
--- 79,84 ----
snoop_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *chan) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! SNOOP("$bKICK$b %s from %s by %s", victim->nick, chan->name, kicker->nick);
}
***************
*** 81,85 ****
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
! SNOOP("NICK %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);
--- 87,92 ----
if (!snoop_cfg.enabled) return 0;
if (user->uplink->burst && !snoop_cfg.show_bursts) return 0;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! 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);
***************
*** 88,94 ****
static void
! snoop_del_user(struct userNode *user) {
if (!snoop_cfg.enabled) return;
! SNOOP("QUIT %s %s@%s from %s", user->nick, user->ident, user->hostname, user->uplink->name);
}
--- 95,106 ----
static void
! snoop_del_user(struct userNode *user, struct userNode *killer, const char *why) {
if (!snoop_cfg.enabled) return;
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! if (killer) {
! SNOOP("$bKILL$b %s (%s@%s, on %s) by %s (%s)", user->nick, user->ident, user->hostname, user->uplink->name, killer->nick, why);
! } else {
! SNOOP("$bQUIT$b %s (%s@%s, on %s) (%s)", user->nick, user->ident, user->hostname, user->uplink->name, why);
! }
}
***************
*** 98,102 ****
if (!snoop_cfg.enabled) return;
if (user->handle_info) {
! SNOOP("AUTH %s as %s", user->nick, user->handle_info->handle);
}
}
--- 110,115 ----
if (!snoop_cfg.enabled) return;
if (user->handle_info) {
! strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now));
! SNOOP("$bAUTH$b %s as %s", user->nick, user->handle_info->handle);
}
}
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -C2 -r1.215 -r1.216
*** nickserv.c 11 Nov 2002 05:31:07 -0000 1.215
--- nickserv.c 12 Nov 2002 02:28:41 -0000 1.216
***************
*** 3214,3219 ****
void
! nickserv_remove_user(struct userNode *user)
{
if (user->auth_policer) policer_delete(user->auth_policer);
dict_remove(nickserv_allow_auth_dict, user->nick);
--- 3214,3220 ----
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);
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -C2 -r1.288 -r1.289
*** opserv.c 7 Nov 2002 00:30:17 -0000 1.288
--- opserv.c 12 Nov 2002 02:28:42 -0000 1.289
***************
*** 1776,1783 ****
static void
! opserv_user_cleanup(struct userNode *user)
{
struct opserv_hostinfo *ohi;
if (IsLocal(user)) {
/* Try to remove it from the reserved nick dict without
--- 1776,1784 ----
static void
! opserv_user_cleanup(struct userNode *user, struct userNode *killer, const char *why)
{
struct opserv_hostinfo *ohi;
+ (void)killer; (void)why;
if (IsLocal(user)) {
/* Try to remove it from the reserved nick dict without
Index: proto-bahamut.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** proto-bahamut.c 23 Oct 2002 12:37:54 -0000 1.26
--- proto-bahamut.c 12 Nov 2002 02:28:42 -0000 1.27
***************
*** 186,190 ****
DelChannelUser(user, user->channels.list[--nn]->channel, false, 0);
}
! for (nn=duf_used; nn>0; ) duf_list[--nn](user);
user->uplink->clients--;
dict_remove(user->uplink->users, user->nick);
--- 186,190 ----
DelChannelUser(user, user->channels.list[--nn]->channel, false, 0);
}
! for (nn=duf_used; nn>0; ) duf_list[--nn](user, killer, why);
user->uplink->clients--;
dict_remove(user->uplink->users, user->nick);
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** proto-p10.c 31 Oct 2002 03:43:02 -0000 1.43
--- proto-p10.c 12 Nov 2002 02:28:42 -0000 1.44
***************
*** 1812,1822 ****
unsigned int n;
/* remove user from all channels */
for (n=user->channels.used; n>0;) {
DelChannelUser(user, user->channels.list[--n]->channel, false, 0);
}
/* Call these in reverse order so ChanServ can update presence
information before NickServ nukes the handle_info. */
! for (n = duf_used; n > 0; ) duf_list[--n](user);
user->uplink->clients--;
--- 1812,1828 ----
unsigned int n;
+ /* mark them as dead, in case anybody cares */
+ user->dead = 1;
+
/* remove user from all channels */
for (n=user->channels.used; n>0;) {
DelChannelUser(user, user->channels.list[--n]->channel, false, 0);
}
+
/* Call these in reverse order so ChanServ can update presence
information before NickServ nukes the handle_info. */
! for (n = duf_used; n > 0; ) {
! duf_list[--n](user, killer, why);
! }
user->uplink->clients--;
***************
*** 1844,1848 ****
* a list of clients that get freed after processing each line.
*/
- user->dead = 1;
userList_append(&dead_users, user);
}
--- 1850,1853 ----
|
|
From: Adrian D. <sai...@us...> - 2002-11-11 05:31:12
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv27109
Modified Files:
helpserv.c nickserv.c nickserv.h
Log Message:
Notify helpers if a user they are helping is given an allowauth or handle merge
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** helpserv.c 10 Nov 2002 02:01:27 -0000 1.49
--- helpserv.c 11 Nov 2002 05:31:07 -0000 1.50
***************
*** 215,218 ****
--- 215,221 ----
#define HSMSG_NOTIFY_HAND_AUTH "The user for request ID#%lu, $b%s$b, has authenticated to account $b%s$b."
#define HSMSG_NOTIFY_HAND_UNREG "The account for request ID#%lu, $b%s$b, has been unregistered by $b%s$b."
+ #define HSMSG_NOTIFY_HAND_MERGE "The account for request ID#%lu, $b%s$b, has been merged with $b%s$b by %s."
+ #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_REQ_DROP "Request ID#%lu has been $bdropped$b because %s."
***************
*** 3872,3888 ****
}
}
- } else if (!user) {
- /* This is probably a merge. Move everything over to the new user's handle. */
- /* FIXME: There should be a better way to check for this */
-
- if (req->user->handle_info) {
- req->handle = req->user->handle_info;
-
- if (!(req->parent_hand_list = dict_find(helpserv_reqs_byhand_dict, req->handle->handle, NULL))) {
- req->parent_hand_list = helpserv_reqlist_alloc();
- dict_insert(helpserv_reqs_byhand_dict, req->handle->handle, req->parent_hand_list);
- }
- helpserv_reqlist_append(req->parent_hand_list, req);
- }
}
}
--- 3875,3878 ----
***************
*** 3891,3894 ****
--- 3881,3934 ----
}
+ static void handle_nickserv_merge(struct userNode *user, struct handle_info *handle_to, struct handle_info *handle_from) {
+ struct helpserv_reqlist *reqlist_from, *reqlist_to;
+ unsigned int i;
+
+ reqlist_to = dict_find(helpserv_reqs_byhand_dict, handle_to->handle, NULL);
+
+ if ((reqlist_from = dict_find(helpserv_reqs_byhand_dict, handle_from->handle, NULL))) {
+ for (i=0; i < reqlist_from->used; i++) {
+ struct helpserv_request *req=reqlist_from->list[i];
+
+ if (!reqlist_to) {
+ reqlist_to = helpserv_reqlist_alloc();
+ dict_insert(helpserv_reqs_byhand_dict, handle_to->handle, reqlist_to);
+ }
+ req->parent_hand_list = reqlist_to;
+ helpserv_reqlist_append(reqlist_to, req);
+ }
+ dict_remove(helpserv_reqs_byhand_dict, handle_from->handle);
+ }
+
+ if (reqlist_to) {
+ for (i=0; i < reqlist_to->used; i++) {
+ struct helpserv_request *req=reqlist_to->list[i];
+
+ if (req->helper && (req->hs->notify >= NOTIFY_HANDLE)) {
+ helpserv_notify(req->helper, HSMSG_NOTIFY_HAND_MERGE, req->id, handle_to->handle, handle_from->handle, user->nick);
+ }
+ }
+ }
+ }
+
+ static void handle_nickserv_allowauth(struct userNode *user, struct userNode *target, struct handle_info *handle) {
+ struct helpserv_reqlist *reqlist;
+ unsigned int i;
+
+ if ((reqlist = dict_find(helpserv_reqs_bynick_dict, target->nick, NULL))) {
+ for (i=0; i < reqlist->used; i++) {
+ struct helpserv_request *req=reqlist->list[i];
+
+ if (req->helper && (req->hs->notify >= NOTIFY_HANDLE)) {
+ if (handle) {
+ helpserv_notify(req->helper, HSMSG_NOTIFY_ALLOWAUTH, req->id, target->nick, user->nick, handle->handle);
+ } else {
+ helpserv_notify(req->helper, HSMSG_NOTIFY_UNALLOWAUTH, req->id, target->nick, user->nick);
+ }
+ }
+ }
+ }
+ }
+
static time_t helpserv_next_stats(time_t after_when) {
struct tm *timeinfo=localtime(&after_when);
***************
*** 4058,4061 ****
--- 4098,4103 ----
reg_handle_rename_func(handle_nickserv_rename);
reg_unreg_func(handle_nickserv_unreg);
+ reg_allowauth_func(handle_nickserv_allowauth);
+ reg_handle_merge_func(handle_nickserv_merge);
reg_exit_func(helpserv_db_cleanup);
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.214
retrieving revision 1.215
diff -C2 -r1.214 -r1.215
*** nickserv.c 6 Nov 2002 23:53:01 -0000 1.214
--- nickserv.c 11 Nov 2002 05:31:07 -0000 1.215
***************
*** 1420,1432 ****
}
static NICKSERV_FUNC(cmd_allowauth)
{
struct userNode *target;
struct handle_info *hi;
NICKSERV_MIN_PARMS(2);
if (!(target = GetUserH(argv[1]))) {
! nickserv_notice(user, MSG_NICK_UNKNOWN, argv[1]);
! return 0;
}
if (argc == 2) hi = NULL;
--- 1420,1451 ----
}
+ static allowauth_func_t *allowauth_func_list;
+ static unsigned int allowauth_func_size = 0, allowauth_func_used = 0;
+
+ void
+ reg_allowauth_func(allowauth_func_t func)
+ {
+ if (allowauth_func_used == allowauth_func_size) {
+ if (allowauth_func_size) {
+ allowauth_func_size <<= 1;
+ allowauth_func_list = realloc(allowauth_func_list, allowauth_func_size*sizeof(allowauth_func_t));
+ } else {
+ allowauth_func_size = 8;
+ allowauth_func_list = malloc(allowauth_func_size*sizeof(allowauth_func_t));
+ }
+ }
+ allowauth_func_list[allowauth_func_used++] = func;
+ }
+
static NICKSERV_FUNC(cmd_allowauth)
{
struct userNode *target;
struct handle_info *hi;
+ unsigned int n;
NICKSERV_MIN_PARMS(2);
if (!(target = GetUserH(argv[1]))) {
! nickserv_notice(user, MSG_NICK_UNKNOWN, argv[1]);
! return 0;
}
if (argc == 2) hi = NULL;
***************
*** 1436,1454 ****
}
if (hi) {
! if (hi->opserv_level > user->handle_info->opserv_level) {
! nickserv_notice(user, MSG_USER_OUTRANKED, hi->handle);
! return 0;
! }
! dict_insert(nickserv_allow_auth_dict, strdup(target->nick), hi);
! nickserv_notice(user, NSMSG_AUTH_ALLOWED, target->nick, hi->handle);
! nickserv_notice(target, NSMSG_AUTH_ALLOWED_MSG, hi->handle, hi->handle);
if (nickserv_conf.email_enabled) nickserv_notice(target, NSMSG_AUTH_ALLOWED_EMAIL);
} else {
! if (dict_remove(nickserv_allow_auth_dict, target->nick)) {
! nickserv_notice(user, NSMSG_AUTH_NORMAL_ONLY, target->nick);
! } else {
! nickserv_notice(user, NSMSG_AUTH_UNSPECIAL, target->nick);
! }
}
return 1;
}
--- 1455,1474 ----
}
if (hi) {
! if (hi->opserv_level > user->handle_info->opserv_level) {
! nickserv_notice(user, MSG_USER_OUTRANKED, hi->handle);
! return 0;
! }
! dict_insert(nickserv_allow_auth_dict, strdup(target->nick), hi);
! nickserv_notice(user, NSMSG_AUTH_ALLOWED, target->nick, hi->handle);
! nickserv_notice(target, NSMSG_AUTH_ALLOWED_MSG, hi->handle, hi->handle);
if (nickserv_conf.email_enabled) nickserv_notice(target, NSMSG_AUTH_ALLOWED_EMAIL);
} else {
! if (dict_remove(nickserv_allow_auth_dict, target->nick)) {
! nickserv_notice(user, NSMSG_AUTH_NORMAL_ONLY, target->nick);
! } else {
! nickserv_notice(user, NSMSG_AUTH_UNSPECIAL, target->nick);
! }
}
+ for (n=0; n<allowauth_func_used; n++) allowauth_func_list[n](user, target, hi);
return 1;
}
***************
*** 2408,2411 ****
--- 2428,2449 ----
}
+ static handle_merge_func_t *handle_merge_func_list;
+ static unsigned int handle_merge_func_size = 0, handle_merge_func_used = 0;
+
+ void
+ reg_handle_merge_func(handle_merge_func_t func)
+ {
+ if (handle_merge_func_used == handle_merge_func_size) {
+ if (handle_merge_func_size) {
+ handle_merge_func_size <<= 1;
+ handle_merge_func_list = realloc(handle_merge_func_list, handle_merge_func_size*sizeof(handle_merge_func_t));
+ } else {
+ handle_merge_func_size = 8;
+ handle_merge_func_list = malloc(handle_merge_func_size*sizeof(handle_merge_func_t));
+ }
+ }
+ handle_merge_func_list[handle_merge_func_used++] = func;
+ }
+
static NICKSERV_FUNC(cmd_merge)
{
***************
*** 2413,2417 ****
struct userNode *last_user;
struct chanList *cList, *cListNext;
! unsigned int ii, jj;
char buffer[MAXLEN];
--- 2451,2455 ----
struct userNode *last_user;
struct chanList *cList, *cListNext;
! unsigned int ii, jj, n;
char buffer[MAXLEN];
***************
*** 2425,2428 ****
--- 2463,2468 ----
}
+ for (n=0; n<handle_merge_func_used; n++) handle_merge_func_list[n](user, hi_to, hi_from);
+
/* Append "from" handle's nicks to "to" handle's nick list. */
if (hi_to->nicks) {
***************
*** 3224,3227 ****
--- 3264,3269 ----
if (unreg_func_list) free(unreg_func_list);
if (rf_list) free(rf_list);
+ if (allowauth_func_list) free(allowauth_func_list);
+ if (handle_merge_func_list) free(handle_merge_func_list);
if (nickserv_conf.valid_handle_regex_set) regfree(&nickserv_conf.valid_handle_regex);
if (nickserv_conf.valid_nick_regex_set) regfree(&nickserv_conf.valid_nick_regex);
Index: nickserv.h
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** nickserv.h 21 Oct 2002 02:31:09 -0000 1.39
--- nickserv.h 11 Nov 2002 05:31:08 -0000 1.40
***************
*** 135,137 ****
--- 135,146 ----
void reg_unreg_func(unreg_func_t func);
+ /* Called just before a handle is merged */
+ typedef void (*handle_merge_func_t)(struct userNode *user, struct handle_info *handle_to, struct handle_info *handle_from);
+ void reg_handle_merge_func(handle_merge_func_t);
+
+ /* Called after an allowauth. handle is null if allowauth authorization was
+ * removed */
+ typedef void (*allowauth_func_t)(struct userNode *user, struct userNode *target, struct handle_info *handle);
+ void reg_allowauth_func(allowauth_func_t func);
+
#endif
|
|
From: Adrian D. <sai...@us...> - 2002-11-11 05:00:00
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv19903
Modified Files:
nickserv.help.m4
Log Message:
Def style is the default, despite what the help file said
Index: nickserv.help.m4
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.help.m4,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** nickserv.help.m4 5 Nov 2002 03:08:38 -0000 1.12
--- nickserv.help.m4 11 Nov 2002 04:59:56 -0000 1.13
***************
*** 237,241 ****
"$bINFO$b: Your infoline for $b$N$b (which can be viewed with the $baccountinfo$b command).",
"$bPRIVMSG$b: If set, $b$N$b and $b$C$b will send text to you using PRIVMSGs rather than NOTICEs.",
! "$bSTYLE$b: The style you want srvx to use for channel userlists it sends you. $bSTYLE$b can be either $bDef$b or $bZoot$b (default).",
"$bTABLEWIDTH$b: Sets the width for wrapping table-formatted text. (Use 0 for the default.)",
"$bWIDTH$b: The width you want srvx to wrap text it sends you. (Use 0 for the default.)",
--- 237,241 ----
"$bINFO$b: Your infoline for $b$N$b (which can be viewed with the $baccountinfo$b command).",
"$bPRIVMSG$b: If set, $b$N$b and $b$C$b will send text to you using PRIVMSGs rather than NOTICEs.",
! "$bSTYLE$b: The style you want srvx to use for channel userlists it sends you. $bSTYLE$b can be either $bDef$b (default) or $bZoot$b.",
"$bTABLEWIDTH$b: Sets the width for wrapping table-formatted text. (Use 0 for the default.)",
"$bWIDTH$b: The width you want srvx to wrap text it sends you. (Use 0 for the default.)",
|
|
From: Zoot <zo...@us...> - 2002-11-11 04:55:34
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv18811/src
Modified Files:
chanserv.c
Log Message:
When updating a ChanServ permanent or timed ban's reason, update the owner also.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.305
retrieving revision 1.306
diff -C2 -r1.305 -r1.306
*** chanserv.c 11 Nov 2002 04:20:03 -0000 1.305
--- chanserv.c 11 Nov 2002 04:55:29 -0000 1.306
***************
*** 2961,2972 ****
{
int exact = !irccasecmp(bData->mask, ban);
/* The ban is redundant; there is already a ban
with the same effect in place. */
-
if(exact)
{
if(bData->reason) free(bData->reason);
bData->reason = strdup(reason);
!
chanserv_notice(user, CSMSG_REASON_CHANGE, ban);
if(!bData->expires)
--- 2961,2972 ----
{
int exact = !irccasecmp(bData->mask, ban);
+
/* The ban is redundant; there is already a ban
with the same effect in place. */
if(exact)
{
if(bData->reason) free(bData->reason);
bData->reason = strdup(reason);
! safestrncpy(bData->owner, (user->handle_info ? user->handle_info->handle : user->nick), sizeof(bData->owner));
chanserv_notice(user, CSMSG_REASON_CHANGE, ban);
if(!bData->expires)
|
|
From: Zoot <zo...@us...> - 2002-11-11 04:20:06
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv8520/src
Modified Files:
chanserv.c
Log Message:
Truncate long kick messages in ChanServ so that the kicker's nick cannot be hidden.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.304
retrieving revision 1.305
diff -C2 -r1.304 -r1.305
*** chanserv.c 11 Nov 2002 03:20:09 -0000 1.304
--- chanserv.c 11 Nov 2002 04:20:03 -0000 1.305
***************
*** 2842,2845 ****
--- 2842,2852 ----
{
reason = unsplit_string(argv + offset, argc - offset, NULL);
+ if(strlen(reason) > (TOPICLEN - (NICKLEN + 3)))
+ {
+ /* Truncate the reason to a length of TOPICLEN, as
+ the ircd does; however, leave room for an ellipsis
+ and the kicker's nick. */
+ sprintf(reason + (TOPICLEN - (NICKLEN + 6)), "...");
+ }
}
|
|
From: Zoot <zo...@us...> - 2002-11-11 03:20:13
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv25421/src
Modified Files:
chanserv.c
Log Message:
Display the search pattern (if any) supplied by the user when listing channel users.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.303
retrieving revision 1.304
diff -C2 -r1.303 -r1.304
*** chanserv.c 9 Nov 2002 01:30:45 -0000 1.303
--- chanserv.c 11 Nov 2002 03:20:09 -0000 1.304
***************
*** 245,249 ****
/* Channel userlist */
! #define CSMSG_ACCESS_HEADER "%s $b%ss:$b"
#define CSMSG_USER_HEADER "$b%-*s%-*s%s$b"
#define CSMSG_USER_DATA "$b%-*s%-*s$b%s"
--- 245,250 ----
/* Channel userlist */
! #define CSMSG_ACCESS_SEARCH_HDR "%s $b%ss$b matching %s:"
! #define CSMSG_ACCESS_HEADER "%s $b%ss$b:"
#define CSMSG_USER_HEADER "$b%-*s%-*s%s$b"
#define CSMSG_USER_DATA "$b%-*s%-*s$b%s"
***************
*** 3465,3469 ****
static void
! zoot_list(struct userNode *user, struct chanNode *channel, struct listData *list)
{
struct userData **users, *found;
--- 3466,3470 ----
static void
! zoot_list(char *search, struct userNode *user, struct chanNode *channel, struct listData *list)
{
struct userData **users, *found;
***************
*** 3490,3494 ****
if(list->highest == list->lowest)
{
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, accessNames[display]);
chanserv_notice(user, "$bNone.$b");
return;
--- 3491,3502 ----
if(list->highest == list->lowest)
{
! if(search)
! {
! chanserv_notice(user, CSMSG_ACCESS_SEARCH_HDR, channel->name, accessNames[display], search);
! }
! else
! {
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, accessNames[display]);
! }
chanserv_notice(user, "$bNone.$b");
return;
***************
*** 3497,3501 ****
}
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, accessNames[display]);
chanserv_notice(user, CSMSG_USER_HEADER, 0, "", list->handleLength+2, "Account:", "Last Seen:");
--- 3505,3516 ----
}
! if(search)
! {
! chanserv_notice(user, CSMSG_ACCESS_SEARCH_HDR, channel->name, accessNames[display], search);
! }
! else
! {
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, accessNames[display]);
! }
chanserv_notice(user, CSMSG_USER_HEADER, 0, "", list->handleLength+2, "Account:", "Last Seen:");
***************
*** 3533,3537 ****
static void
! def_list(struct userNode *user, struct chanNode *channel, struct listData *list)
{
struct userData **users, *found;
--- 3548,3552 ----
static void
! def_list(char *search, struct userNode *user, struct chanNode *channel, struct listData *list)
{
struct userData **users, *found;
***************
*** 3540,3544 ****
unsigned int i;
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, list->highest == list->lowest ? accessNames[list->lowest] : "user");
chanserv_notice(user, CSMSG_USER_HEADER, ACCESSLEN, "Access:", list->handleLength, "Account:", "Last Seen:");
--- 3555,3566 ----
unsigned int i;
! if(search)
! {
! chanserv_notice(user, CSMSG_ACCESS_SEARCH_HDR, channel->name, list->highest == list->lowest ? accessNames[list->lowest] : "user", search);
! }
! else
! {
! chanserv_notice(user, CSMSG_ACCESS_HEADER, channel->name, list->highest == list->lowest ? accessNames[list->lowest] : "user");
! }
chanserv_notice(user, CSMSG_USER_HEADER, ACCESSLEN, "Access:", list->handleLength, "Account:", "Last Seen:");
***************
*** 3602,3606 ****
cmd_list_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, enum userLevel display_lowest, enum userLevel display_highest)
{
! void (*send_list)(struct userNode *, struct chanNode *, struct listData *);
struct userData *uData, **users;
struct chanData *cData;
--- 3624,3628 ----
cmd_list_users(struct userNode *user, struct chanNode *channel, unsigned int argc, unsigned char *argv[], struct svccmd *cmd, enum userLevel display_lowest, enum userLevel display_highest)
{
! void (*send_list)(char *, struct userNode *, struct chanNode *, struct listData *);
struct userData *uData, **users;
struct chanData *cData;
***************
*** 3652,3656 ****
lData.handleLength = handleLength < 11 ? 11 : handleLength + 3;
! send_list(user, channel, &lData);
return 1;
--- 3674,3678 ----
lData.handleLength = handleLength < 11 ? 11 : handleLength + 3;
! send_list(search, user, channel, &lData);
return 1;
|
|
From: Entrope <en...@us...> - 2002-11-10 18:52:20
|
Update of /cvsroot/srvx/services/patches In directory usw-pr-cvs1:/tmp/cvs-serv7869/patches Log Message: Directory /cvsroot/srvx/services/patches added to the repository |
|
From: Adrian D. <sai...@us...> - 2002-11-10 02:01:30
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv26586
Modified Files:
helpserv.c
Log Message:
Non-linux compile warning fix
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** helpserv.c 9 Nov 2002 03:46:38 -0000 1.48
--- helpserv.c 10 Nov 2002 02:01:27 -0000 1.49
***************
*** 579,583 ****
if (!reason) reason = "";
! sprintf(key, "%s-%lu-%lu", req->hs->helpserv->nick, req->opened, req->id);
saxdb_start_record(reqlog_ctx, key, 1);
if (req->helper) {
--- 579,583 ----
if (!reason) reason = "";
! sprintf(key, "%s-" FMT_TIME_T "-%lu", req->hs->helpserv->nick, req->opened, req->id);
saxdb_start_record(reqlog_ctx, key, 1);
if (req->helper) {
|
|
From: Adrian D. <sai...@us...> - 2002-11-10 02:00:37
|
Update of /cvsroot/srvx/services
In directory usw-pr-cvs1:/tmp/cvs-serv26119
Modified Files:
configure.in
Log Message:
Remove -ansi from gcc flags (prevents saxdb.c compilation on non-linux systems)
Tabs to spaces
Index: configure.in
===================================================================
RCS file: /cvsroot/srvx/services/configure.in,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** configure.in 9 Nov 2002 02:33:22 -0000 1.65
--- configure.in 10 Nov 2002 02:00:33 -0000 1.66
***************
*** 31,54 ****
case $target in
*-freebsd2* | *-freebsdelf2* | *-freebsd*out3*)
! ANSI_SRC="-ansi"
! ;;
*-freebsd3* | *-freebsdelf3* | *-freebsd*out3*)
! AC_DEFINE(BROKEN_REGEX, 1, [Define if the system regex library is unreliable.])
BROKEN_REGEX=yes
- ANSI_SRC="-ansi"
;;
*-solaris*)
! EXTRA_DEFINE="-D__SOLARIS__"
! ANSI_SRC="-fno-builtin"
;;
*-cygwin)
! ANSI_SRC="-fno-builtin"
;;
*-linux*)
! dnl -D_GNU_SOURCE needed for strsignal()
! EXTRA_DEFINE="-D_GNU_SOURCE"
;;
*)
! ANSI_SRC="-ansi"
;;
esac
--- 31,55 ----
case $target in
*-freebsd2* | *-freebsdelf2* | *-freebsd*out3*)
! ANSI_SRC=""
! ;;
*-freebsd3* | *-freebsdelf3* | *-freebsd*out3*)
! ANSI_SRC=""
! AC_DEFINE(BROKEN_REGEX, 1, [Define if the system regex library is unreliable.])
BROKEN_REGEX=yes
;;
*-solaris*)
! EXTRA_DEFINE="-D__SOLARIS__"
! ANSI_SRC="-fno-builtin"
;;
*-cygwin)
! ANSI_SRC="-fno-builtin"
;;
*-linux*)
! dnl -D_GNU_SOURCE needed for strsignal()
! EXTRA_DEFINE="-D_GNU_SOURCE"
! ANSI_SRC=""
;;
*)
! ANSI_SRC=""
;;
esac
|
|
From: Adrian D. <sai...@us...> - 2002-11-09 03:46:42
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv1963
Modified Files:
helpserv.c helpserv.help
Log Message:
Implement request logging
Allow cmd_close use extra arguments for an optional close reason. Document.
Include an "assigned" time in the request information.
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** helpserv.c 7 Nov 2002 02:05:47 -0000 1.47
--- helpserv.c 9 Nov 2002 03:46:38 -0000 1.48
***************
*** 20,27 ****
/* TODO List for helpserv.c
- * - Request logging. Saxdb should make this fairly painless.
- * - cmd_close should optionally take another argument (a reason/comment)
- * - Statistical analysis of time
* Wishlist for helpserv.c
* - Make HelpServ send unassigned request count to helpers as they join the
* channel
--- 20,25 ----
/* TODO List for helpserv.c
* Wishlist for helpserv.c
+ * - Statistical analysis of time (define what this means first)
* - Make HelpServ send unassigned request count to helpers as they join the
* channel
***************
*** 58,61 ****
--- 56,60 ----
#define KEY_DESC "description"
#define KEY_DB_BACKUP_FREQ "db_backup_freq"
+ #define KEY_REQLOGFILE "reqlogfile"
/* db entries */
***************
*** 84,90 ****
--- 83,94 ----
#define KEY_REQUESTS "requests"
#define KEY_REQUEST_HELPER "helper"
+ #define KEY_REQUEST_ASSIGNED "assigned"
#define KEY_REQUEST_HANDLE "handle"
#define KEY_REQUEST_TEXT "text"
#define KEY_REQUEST_OPENED "opened"
+ #define KEY_REQUEST_NICK "nick"
+ #define KEY_REQUEST_USERHOST "userhost"
+ #define KEY_REQUEST_CLOSED "closed"
+ #define KEY_REQUEST_CLOSEREASON "closereason"
#define KEY_NOTIFICATION "notification"
#define KEY_PRIVMSG_ONLY "privmsg_only"
***************
*** 373,381 ****
const char *description;
unsigned long db_backup_frequency;
} helpserv_conf;
! static int helpserv_enabled=0;
static time_t last_stats_update;
#define CMD_NEED_BOT 0x001
#define CMD_NOT_OVERRIDE 0x002
--- 377,390 ----
const char *description;
unsigned long db_backup_frequency;
+ const char *reqlogfile;
} helpserv_conf;
! static int helpserv_enabled;
static time_t last_stats_update;
+ static int shutting_down;
+ static FILE *reqlog_f;
+ static struct saxdb_context *reqlog_ctx;
+
#define CMD_NEED_BOT 0x001
#define CMD_NOT_OVERRIDE 0x002
***************
*** 453,456 ****
--- 462,466 ----
unsigned long id;
time_t opened;
+ time_t assigned;
time_t updated;
};
***************
*** 562,565 ****
--- 572,603 ----
}
+ static void helpserv_log_request(struct helpserv_request *req, const char *reason) {
+ char key[27+NICKLEN];
+ char userhost[USERLEN+HOSTLEN+2];
+
+ if (!reqlog_ctx || !req) return;
+ if (!reason) reason = "";
+
+ sprintf(key, "%s-%lu-%lu", req->hs->helpserv->nick, req->opened, req->id);
+ saxdb_start_record(reqlog_ctx, key, 1);
+ if (req->helper) {
+ saxdb_write_string(reqlog_ctx, KEY_REQUEST_HELPER, req->helper->handle->handle);
+ saxdb_write_int(reqlog_ctx, KEY_REQUEST_ASSIGNED, req->assigned);
+ }
+ if (req->handle) saxdb_write_string(reqlog_ctx, KEY_REQUEST_HANDLE, req->handle->handle);
+ if (req->user) {
+ saxdb_write_string(reqlog_ctx, KEY_REQUEST_NICK, req->user->nick);
+ sprintf(userhost, "%s@%s", req->user->ident, req->user->hostname);
+ saxdb_write_string(reqlog_ctx, KEY_REQUEST_USERHOST, userhost);
+ }
+ saxdb_write_int(reqlog_ctx, KEY_REQUEST_OPENED, req->opened);
+ saxdb_write_int(reqlog_ctx, KEY_REQUEST_CLOSED, now);
+ saxdb_write_string(reqlog_ctx, KEY_REQUEST_CLOSEREASON, reason);
+ saxdb_write_string_list(reqlog_ctx, KEY_REQUEST_TEXT, req->text);
+ saxdb_end_record(reqlog_ctx);
+
+ fflush(reqlog_f);
+ }
+
/* Searches for a request by number, nick, or account (num|nick|*account).
* As there can potentially be >1 match, it takes a reqlist. The return
***************
*** 1309,1312 ****
--- 1347,1355 ----
struct helpserv_request *req = data;
+ /* Logging */
+ if (shutting_down && (req->hs->persist_types[PERSIST_T_REQUEST] != PERSIST_CLOSE || !req->handle)) {
+ helpserv_log_request(req, "srvx shutdown");
+ }
+
/* Clean up from the unhandled queue */
if (req->hs->unhandled) {
***************
*** 1346,1349 ****
--- 1389,1393 ----
struct helpserv_reqlist *nick_list, *hand_list;
struct helpserv_user *hs_user=GetHSUser(hs, user->handle_info);
+ char close_reason[MAXLEN];
unsigned long old_req;
unsigned int i;
***************
*** 1381,1384 ****
--- 1425,1434 ----
old_req = req->id;
+ if (argc >= 3) {
+ snprintf(close_reason, MAXLEN, "Closed by %s: %s", user->handle_info->handle, unsplit_string(argv+2, argc-2, NULL));
+ } else {
+ sprintf(close_reason, "Closed by %s", user->handle_info->handle);
+ }
+ helpserv_log_request(req, close_reason);
dict_remove(hs->requests, argv[1]);
***************
*** 1549,1557 ****
req->next_unhandled = NULL;
! if (!(req->helper = GetHSUser(hs, user->handle_info))) {
! helpserv_notice(user, HSMSG_WTF_WHO_ARE_YOU, hs->helpserv->nick);
! log(HS_LOG, LOG_ERROR, "%s(): Unable to locate %s[%s] on the %s userlist.\n", __FUNCTION__, user->nick, user->handle_info->handle, hs->helpserv->nick);
! return 0;
! }
if (old_helper) {
--- 1599,1605 ----
req->next_unhandled = NULL;
! req->helper = GetHSUser(hs, user->handle_info);
! assert(req->helper);
! req->assigned = now;
if (old_helper) {
***************
*** 2871,2875 ****
saxdb_start_record(ctx, key, 0);
! if (request->helper) saxdb_write_string(ctx, KEY_REQUEST_HELPER, request->helper->handle->handle);
saxdb_write_string(ctx, KEY_REQUEST_HANDLE, request->handle->handle);
saxdb_write_int(ctx, KEY_REQUEST_OPENED, request->opened);
--- 2919,2926 ----
saxdb_start_record(ctx, key, 0);
! if (request->helper) {
! saxdb_write_string(ctx, KEY_REQUEST_HELPER, request->helper->handle->handle);
! saxdb_write_int(ctx, KEY_REQUEST_ASSIGNED, request->assigned);
! }
saxdb_write_string(ctx, KEY_REQUEST_HANDLE, request->handle->handle);
saxdb_write_int(ctx, KEY_REQUEST_OPENED, request->opened);
***************
*** 2918,2921 ****
--- 2969,2975 ----
}
+ str = database_get_data(rd->d.object, KEY_REQUEST_ASSIGNED, RECDB_QSTRING);
+ if (str) request->assigned = TIME_T_CAST strtoul(str, NULL, 0);
+
str = database_get_data(rd->d.object, KEY_REQUEST_HELPER, RECDB_QSTRING);
if (str) {
***************
*** 3152,3155 ****
--- 3206,3232 ----
str = database_get_data(conf_node, KEY_DESC, RECDB_QSTRING);
helpserv_conf.description = str;
+
+ str = database_get_data(conf_node, KEY_REQLOGFILE, RECDB_QSTRING);
+ if (str && strlen(str)) {
+ helpserv_conf.reqlogfile = str;
+ } else {
+ helpserv_conf.reqlogfile = NULL;
+ }
+
+ if (reqlog_ctx) {
+ saxdb_close_context(reqlog_ctx);
+ reqlog_ctx = NULL;
+ }
+ if (reqlog_f) {
+ fclose(reqlog_f);
+ reqlog_f = NULL;
+ }
+ if (helpserv_conf.reqlogfile) {
+ if (!(reqlog_f = fopen(helpserv_conf.reqlogfile, "a"))) {
+ log(HS_LOG, LOG_ERROR, "Unable to open request logfile (%s): %s", helpserv_conf.reqlogfile, strerror(errno));
+ } else {
+ reqlog_ctx = saxdb_open_context(reqlog_f);
+ }
+ }
}
***************
*** 3199,3202 ****
--- 3276,3280 ----
if (req->helper && (hs->notify >= NOTIFY_DROP)) helpserv_notify(req->helper, HSMSG_NOTIFY_REQ_DROP, req->id, "they have left the help channel");
}
+ helpserv_log_request(req, "Dropped");
dict_remove(hs->requests, iter_key(it));
break;
***************
*** 3284,3287 ****
--- 3362,3366 ----
if (req->helper && (req->hs->notify >= NOTIFY_DROP)) helpserv_notify(req->helper, HSMSG_NOTIFY_REQ_DROP, req->id, "the user has quit");
+ helpserv_log_request(req, "Dropped");
dict_remove(req->hs->requests, buf);
} else {
***************
*** 3757,3760 ****
--- 3836,3840 ----
if (req->helper && (hs->notify >= NOTIFY_DROP)) helpserv_notify(req->helper, HSMSG_NOTIFY_REQ_DROP, req->id, "their account has been unregistered and no online users were authenticated to it");
sprintf(buf, "%lu", req->id);
+ helpserv_log_request(req, "Account unregistered");
dict_remove(req->hs->requests, buf);
} else if (user->handle_info == handle) {
***************
*** 3788,3791 ****
--- 3868,3872 ----
sprintf(buf, "%lu", req->id);
+ helpserv_log_request(req, "Account unregistered");
dict_remove(req->hs->requests, buf);
}
***************
*** 3865,3868 ****
--- 3946,3950 ----
static void helpserv_db_cleanup(void) {
+ shutting_down=1;
unreg_part_func(handle_part);
unreg_del_user_func(handle_quit);
***************
*** 3875,3878 ****
--- 3957,3963 ----
dict_delete(helpserv_reqs_byhand_dict);
dict_delete(helpserv_users_byhand_dict);
+
+ if (reqlog_ctx) saxdb_close_context(reqlog_ctx);
+ if (reqlog_f) fclose(reqlog_f);
}
Index: helpserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.help,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** helpserv.help 7 Nov 2002 02:05:47 -0000 1.14
--- helpserv.help 9 Nov 2002 03:46:39 -0000 1.15
***************
*** 60,65 ****
"Lists the currently defined HelpServ bots (along with their channels and owners' accounts).");
"CLOSE" ("$bCLOSE$b",
! "/msg $S CLOSE <reqid|nick|*account>",
! "Closes out the specified request.");
"CLVL" ("$bCLVL$b",
"/msg $S CLVL <user|*nick> <new-level>",
--- 60,65 ----
"Lists the currently defined HelpServ bots (along with their channels and owners' accounts).");
"CLOSE" ("$bCLOSE$b",
! "/msg $S CLOSE <reqid|nick|*account> [reason]",
! "Closes out the specified request. The optional [reason] is included in the request log file.");
"CLVL" ("$bCLVL$b",
"/msg $S CLVL <user|*nick> <new-level>",
|
|
From: Entrope <en...@us...> - 2002-11-09 02:33:25
|
Update of /cvsroot/srvx/services
In directory usw-pr-cvs1:/tmp/cvs-serv19211
Modified Files:
autogen.sh configure.in
Log Message:
try to find an actually-working way to va_copy()
Index: autogen.sh
===================================================================
RCS file: /cvsroot/srvx/services/autogen.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** autogen.sh 31 Jul 2002 02:34:26 -0000 1.12
--- autogen.sh 9 Nov 2002 02:33:22 -0000 1.13
***************
*** 1,8 ****
#! /bin/sh
! aclocal
! autoheader
! automake -a --gnu Makefile rx/Makefile src/Makefile
! autoconf
if [ -d ./src/srvx ] ; then
echo "WARNING: It looks like you still have the obsolete src/srvx directory."
--- 1,8 ----
#! /bin/sh
! aclocal-1.6
! autoheader -Wall
! automake-1.6 -a --gnu Makefile rx/Makefile src/Makefile
! autoconf -Wall
if [ -d ./src/srvx ] ; then
echo "WARNING: It looks like you still have the obsolete src/srvx directory."
Index: configure.in
===================================================================
RCS file: /cvsroot/srvx/services/configure.in,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -r1.64 -r1.65
*** configure.in 16 Sep 2002 18:35:24 -0000 1.64
--- configure.in 9 Nov 2002 02:33:22 -0000 1.65
***************
*** 166,169 ****
--- 166,196 ----
AC_MSG_RESULT($ac_cv_time_t_cast)
+ dnl How to copy one va_list to another?
+ AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
+ AC_TRY_LINK(
+ [#include <stdarg.h>],
+ [va_list ap1, ap2;
+ va_copy(ap1, ap2);],
+ [ac_cv_c_va_copy="yes"],
+ [ac_cv_c_va_copy="no"]
+ )
+ )
+ if test "$ac_cv_c_va_copy" = "yes" ; then
+ AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
+ fi
+
+ AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
+ AC_TRY_LINK(
+ [#include <stdarg.h>],
+ [va_list ap1, ap2;
+ __va_copy(ap1, ap2);],
+ [ac_cv_c___va_copy="yes"],
+ [ac_cv_c___va_copy="no"]
+ )
+ )
+ if test "$ac_cv_c___va_copy" = "yes" ; then
+ AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
+ fi
+
dnl Now fix things back up
CFLAGS=$OLD_CFLAGS
|
|
From: Entrope <en...@us...> - 2002-11-09 02:33:25
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv19211/src
Modified Files:
compat.h helpfile.c
Log Message:
try to find an actually-working way to va_copy()
Index: compat.h
===================================================================
RCS file: /cvsroot/srvx/services/src/compat.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** compat.h 11 Aug 2002 03:26:16 -0000 1.12
--- compat.h 9 Nov 2002 02:33:22 -0000 1.13
***************
*** 58,61 ****
--- 58,69 ----
#endif
+ #ifdef HAVE_VA_COPY
+ #define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
+ #elif HAVE___VA_COPY
+ #define VA_COPY(DEST, SRC) __va_copy(DEST, SRC)
+ #else
+ #define VA_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(DEST))
+ #endif
+
#ifndef HAVE_GETTIMEOFDAY
extern int gettimeofday(struct timeval * tv, struct timezone * tz);
Index: helpfile.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpfile.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** helpfile.c 5 Nov 2002 03:10:35 -0000 1.58
--- helpfile.c 9 Nov 2002 02:33:22 -0000 1.59
***************
*** 170,174 ****
* The kludge-around is to pass a non-NULL pointer instead.
*/
! __va_copy(working, al);
if ((ret = vsnprintf(line, 0, format, working)) <= 0) {
char *temp;
--- 170,174 ----
* The kludge-around is to pass a non-NULL pointer instead.
*/
! VA_COPY(working, al);
if ((ret = vsnprintf(line, 0, format, working)) <= 0) {
char *temp;
***************
*** 177,186 ****
input = malloc(size);
va_end(working);
! __va_copy(working, al);
while ((ret = vsnprintf(input, size, format, working)) == -1) {
size <<= 1;
input = realloc(input, size);
va_end(working);
! __va_copy(working, al);
}
temp = alloca(ret+1);
--- 177,186 ----
input = malloc(size);
va_end(working);
! VA_COPY(working, al);
while ((ret = vsnprintf(input, size, format, working)) == -1) {
size <<= 1;
input = realloc(input, size);
va_end(working);
! VA_COPY(working, al);
}
temp = alloca(ret+1);
***************
*** 193,197 ****
input = alloca(size);
va_end(working);
! __va_copy(working, al);
ret = vsnprintf(input, size, format, al);
}
--- 193,197 ----
input = alloca(size);
va_end(working);
! VA_COPY(working, al);
ret = vsnprintf(input, size, format, al);
}
|
|
From: Entrope <en...@us...> - 2002-11-09 01:30:48
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv4663/src
Modified Files:
chanserv.c
Log Message:
set channel->channel->channel_info to NULL even when unregging a
no-longer-suspended channel
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.302
retrieving revision 1.303
diff -C2 -r1.302 -r1.303
*** chanserv.c 31 Oct 2002 03:38:01 -0000 1.302
--- chanserv.c 9 Nov 2002 01:30:45 -0000 1.303
***************
*** 1411,1423 ****
}
}
- else
- {
- channel->channel->channel_info = NULL;
- }
! if(channel->notes)
! {
! dict_delete(channel->notes);
! }
free(channel);
--- 1411,1418 ----
}
}
! if(channel->channel) channel->channel->channel_info = NULL;
!
! if(channel->notes) dict_delete(channel->notes);
free(channel);
***************
*** 6185,6193 ****
{
struct chanData *cData;
! struct userData *uData = NULL;
struct handle_info *handle;
- if(!channel->channel_info || IsSuspended(channel->channel_info) || IsLocal(user)) return;
cData = channel->channel_info;
if((cData->flags & CHANNEL_DYNAMIC_LIMIT) && !channel->join_flooded)
--- 6180,6188 ----
{
struct chanData *cData;
! struct userData *uData;
struct handle_info *handle;
cData = channel->channel_info;
+ if(!cData || IsSuspended(cData) || IsLocal(user)) return;
if((cData->flags & CHANNEL_DYNAMIC_LIMIT) && !channel->join_flooded)
|