srvx-commits Mailing List for srvx IRC Services (Page 22)
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: Zoot <zo...@us...> - 2002-12-12 03:23:33
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv14738/src
Modified Files:
modcmd.c
Log Message:
Extract a channel out of commands before and after alias expansion (fixes /msg ChanServ addop foo).
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** modcmd.c 3 Dec 2002 02:55:14 -0000 1.42
--- modcmd.c 12 Dec 2002 03:23:30 -0000 1.43
***************
*** 619,622 ****
--- 619,636 ----
}
+ /* Try to grab a channel handle before alias expansion.
+ * If the command accepts a channel name, and argv[1] is
+ * one, use it as a channel name, and hide it from logging.
+ */
+ if ((argc > 1)
+ && (cmd->flags & MODCMD_ACCEPT_CHANNEL)
+ && IsChannelName(argv[1])
+ && ((argv[1][0] != '+') || (cmd->flags & MODCMD_ACCEPT_PCHANNEL))
+ && (channel = dict_find(channels, argv[1], NULL))) {
+ argv[1] = argv[0];
+ argv++, argc--;
+ cmd_arg = 1;
+ }
+
/* Expand the alias arguments, if there are any. */
if (cmd->alias.used) {
***************
*** 630,635 ****
}
! /* If the command accepts a channel name, and argv[1] is one, use
! * it as a channel name, and hide it from logging.
*/
if ((argc > 1)
--- 644,649 ----
}
! /* Try again to grab a handle to the channel after alias
! * expansion, overwriting any previous channel.
*/
if ((argc > 1)
|
|
From: Zoot <zo...@us...> - 2002-12-12 02:28:02
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv32000/src
Modified Files:
Tag: rel-1_1-branch
parse.c hash.c
Log Message:
Fix a crash caused when a CREATE and a KILL crossed.
Index: parse.c
===================================================================
RCS file: /cvsroot/srvx/services/src/Attic/parse.c,v
retrieving revision 1.129
retrieving revision 1.129.2.1
diff -C2 -r1.129 -r1.129.2.1
*** parse.c 23 Jun 2002 14:26:12 -0000 1.129
--- parse.c 12 Dec 2002 02:27:59 -0000 1.129.2.1
***************
*** 297,303 ****
static CMD_FUNC(cmd_create)
{
struct create_desc cd;
if (argc < 4) return 0;
! cd.user = GetUser(argv[0]);
cd.when = atoi(argv[3]);
parse_foreach(argv[2], NULL, create_helper, NULL, NULL, &cd);
--- 297,313 ----
static CMD_FUNC(cmd_create)
{
+ struct userNode *user;
struct create_desc cd;
+
if (argc < 4) return 0;
!
! user = GetUser(argv[0]);
! if(!user) {
! /* The CREATE from this user probably crossed a KILL
! for the very same user. Bail. */
! return 0;
! }
!
! cd.user = user;
cd.when = atoi(argv[3]);
parse_foreach(argv[2], NULL, create_helper, NULL, NULL, &cd);
Index: hash.c
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.c,v
retrieving revision 1.159.2.3
retrieving revision 1.159.2.4
diff -C2 -r1.159.2.3 -r1.159.2.4
*** hash.c 29 Oct 2002 20:52:16 -0000 1.159.2.3
--- hash.c 12 Dec 2002 02:27:59 -0000 1.159.2.4
***************
*** 755,758 ****
--- 755,762 ----
}
}
+
+ /* If the people on the members list didn't make it
+ into the channel alive, we should kill the channel
+ off -- for now, we don't. */
}
|
|
From: Zoot <zo...@us...> - 2002-12-12 01:56:26
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23762/src
Modified Files:
Tag: rel-1_1-branch
chanserv.c
Log Message:
Ignore channels in ChanServ's database with empty names and log the error.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.232.2.14
retrieving revision 1.232.2.15
diff -C2 -r1.232.2.14 -r1.232.2.15
*** chanserv.c 23 Nov 2002 03:51:03 -0000 1.232.2.14
--- chanserv.c 12 Dec 2002 01:56:22 -0000 1.232.2.15
***************
*** 7014,7017 ****
--- 7014,7023 ----
users = database_get_data(channel, KEY_USERS, RECDB_OBJECT);
+ if(!*key)
+ {
+ log(CS_LOG, LOG_ERROR, "Read channel with empty name; skipping.\n");
+ return 0;
+ }
+
if(!users)
{
|
|
From: Zoot <zo...@us...> - 2002-12-04 06:43:54
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv30484/src
Modified Files:
opserv.c
Log Message:
Fix an apparently harmless typo and remove some unnecessary code.
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.292
retrieving revision 1.293
diff -C2 -r1.292 -r1.293
*** opserv.c 22 Nov 2002 04:11:24 -0000 1.292
--- opserv.c 4 Dec 2002 06:43:50 -0000 1.293
***************
*** 1803,1807 ****
if (found) return 0;
! for (found=0; found<opserv_bad_words->used; +++found) {
if (irccasestr(name, opserv_bad_words->list[found])) return 1;
}
--- 1803,1807 ----
if (found) return 0;
! for (found=0; found<opserv_bad_words->used; ++found) {
if (irccasestr(name, opserv_bad_words->list[found])) return 1;
}
***************
*** 1833,1837 ****
opserv_channel_check(struct chanNode *newchan)
{
- unsigned int nn;
char *warning;
--- 1833,1836 ----
***************
*** 1845,1863 ****
global_message(MESSAGE_RECIPIENT_OPERS, message);
}
! if ((newchan->bad_channel = opserv_bad_channel(newchan->name))) {
! if (newchan->name[0] == '#') {
! /* We can hack modes and ops and stuff, but we will cause
! * a HACK(2) if we join now (because it will send a CREATE
! * instead of a JOIN) .. so wait until the join check to
! * shut the channel down. */
! } else {
! for (nn=newchan->members.used; nn>0; ) {
! struct modeNode *mNode = newchan->members.list[--nn];
! if (IsService(mNode->user)) continue;
! DelUser(mNode->user, opserv, 1, OSMSG_ILLEGAL_KILL_REASON);
! }
! }
! return;
! }
}
--- 1844,1850 ----
global_message(MESSAGE_RECIPIENT_OPERS, message);
}
!
! /* Wait until the join check to shut channels down. */
! newchan->bad_channel = opserv_bad_channel(newchan->name);
}
|
|
From: Zoot <zo...@us...> - 2002-12-03 20:09:05
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24407/src
Modified Files:
messages.h
Log Message:
Fix version notices; include package version number.
Index: messages.h
===================================================================
RCS file: /cvsroot/srvx/services/src/messages.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** messages.h 20 Aug 2002 03:24:56 -0000 1.31
--- messages.h 3 Dec 2002 20:08:59 -0000 1.32
***************
*** 28,32 ****
freak. */
! #define MSG_VERSION "$bsrvx "VERSION"$b ("CODENAME"), Built: " __DATE__ ", " __TIME__"."
#define MSG_FATAL_ERROR "Fatal error, aborting.\n"
--- 28,32 ----
freak. */
! #define MSG_VERSION "$b"PACKAGE_STRING"$b ("CODENAME"), Built: " __DATE__ ", " __TIME__"."
#define MSG_FATAL_ERROR "Fatal error, aborting.\n"
|
|
From: Entrope <en...@us...> - 2002-12-03 02:55:18
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3151/src
Modified Files:
modcmd.c
Log Message:
fix compile error in last commit (sigh)
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** modcmd.c 3 Dec 2002 02:44:20 -0000 1.41
--- modcmd.c 3 Dec 2002 02:55:14 -0000 1.42
***************
*** 805,809 ****
module_list_append(&service->modules, svccmd->command->parent);
}
- return svccmd;
}
--- 805,808 ----
|
|
From: Entrope <en...@us...> - 2002-12-03 02:44:24
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv28368/src
Modified Files:
modcmd.c
Log Message:
don't crash when adding default aliases for a service
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** modcmd.c 22 Nov 2002 04:07:57 -0000 1.40
--- modcmd.c 3 Dec 2002 02:44:20 -0000 1.41
***************
*** 791,795 ****
}
! static struct svccmd *
svccmd_insert(struct service *service, char *name, struct svccmd *svccmd, struct modcmd *modcmd) {
unsigned int ii;
--- 791,795 ----
}
! static void
svccmd_insert(struct service *service, char *name, struct svccmd *svccmd, struct modcmd *modcmd) {
unsigned int ii;
***************
*** 1783,1788 ****
for (nn=0; nn<argc; nn++) svccmd->alias.list[nn] = strdup(argv[nn]);
}
svccmd_copy_rules(svccmd, template);
! return svccmd_insert(service, strdup(alias), svccmd, template->command);
}
--- 1783,1789 ----
for (nn=0; nn<argc; nn++) svccmd->alias.list[nn] = strdup(argv[nn]);
}
+ svccmd_insert(service, strdup(alias), svccmd, template->command);
svccmd_copy_rules(svccmd, template);
! return svccmd;
}
|
|
From: Adrian D. <sai...@us...> - 2002-12-01 00:38:09
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9425
Modified Files:
helpserv.c helpserv.help
Log Message:
Add trivial feature to HelpServ: auto(de)voice
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -r1.53 -r1.54
*** helpserv.c 29 Nov 2002 02:03:49 -0000 1.53
--- helpserv.c 1 Dec 2002 00:38:06 -0000 1.54
***************
*** 20,23 ****
--- 20,24 ----
/* TODO List for helpserv.c
+ * (empty)
* Wishlist for helpserv.c
* - Statistical analysis of time (define what this means first)
***************
*** 94,97 ****
--- 95,100 ----
#define KEY_PRIVMSG_ONLY "privmsg_only"
#define KEY_REQ_ON_JOIN "req_on_join"
+ #define KEY_AUTO_VOICE "auto_voice"
+ #define KEY_AUTO_DEVOICE "auto_devoice"
/* General */
***************
*** 420,423 ****
--- 423,428 ----
unsigned int privmsg_only : 1;
unsigned int req_on_join : 1;
+ unsigned int auto_voice : 1;
+ unsigned int auto_devoice : 1;
unsigned int helpchan_empty : 1;
***************
*** 1392,1395 ****
--- 1397,1401 ----
struct helpserv_reqlist *nick_list, *hand_list;
struct helpserv_user *hs_user=GetHSUser(hs, user->handle_info);
+ struct userNode *req_user=NULL;
char close_reason[MAXLEN];
unsigned long old_req;
***************
*** 1413,1419 ****
}
! if (req->user) helpserv_message(hs, req->user, MSGTYPE_REQ_CLOSED);
helpserv_notice(user, HSMSG_REQ_CLOSED, req->id);
! helpserv_page(PGSRC_STATUS, HSMSG_PAGE_CLOSE_REQUEST, req->id, req->user ? req->user->nick : "an offline user", req->handle ? req->handle->handle : "not authed", user->nick);
hs_user->closed[0]++;
--- 1419,1428 ----
}
! if (req->user) {
! req_user = req->user;
! helpserv_message(hs, req_user, MSGTYPE_REQ_CLOSED);
! }
helpserv_notice(user, HSMSG_REQ_CLOSED, req->id);
! helpserv_page(PGSRC_STATUS, HSMSG_PAGE_CLOSE_REQUEST, req->id, req_user ? req_user->nick : "an offline user", req->handle ? req->handle->handle : "not authed", user->nick);
hs_user->closed[0]++;
***************
*** 1454,1457 ****
--- 1463,1473 ----
}
+ if (req_user && hs->auto_devoice) {
+ struct modeNode *mn=GetUserMode(hs->helpchan, req_user);
+ if ((!newest || !newest->helper) && mn && (mn->modes & MODE_VOICE)) {
+ DelChannelVoice(1, &req_user, hs->helpchan, hs->helpserv, 1);
+ }
+ }
+
return 1;
}
***************
*** 1627,1630 ****
--- 1643,1652 ----
}
helpserv_page(PGSRC_STATUS, HSMSG_PAGE_ASSIGN_REQUEST, req->id, req->user ? req->user->nick : "an offline user", req->handle ? req->handle->handle : "not authed", user->nick);
+
+ if (req->user && hs->auto_voice) {
+ struct modeNode *mn=GetUserMode(hs->helpchan, req->user);
+ if (mn && !(mn->modes & MODE_VOICE)) AddChannelVoice(1, &req->user, hs->helpchan, hs->helpserv, 1);
+ }
+
return 1;
}
***************
*** 2080,2084 ****
--- 2102,2111 ----
/* Let the user know that their request is now unhandled */
if (req->user) {
+ struct modeNode *mn=GetUserMode(hs->helpchan, req->user);
+
helpserv_msguser(req->user, HSMSG_REQ_UNASSIGNED, req->id, reason);
+ if (hs->auto_devoice && mn && (mn->modes & MODE_VOICE)) {
+ DelChannelVoice(1, &req->user, hs->helpchan, hs->helpserv, 1);
+ }
}
***************
*** 2771,2774 ****
--- 2798,2809 ----
}
+ static HELPSERV_OPTION(opt_auto_voice) {
+ OPTION_BINARY(hs->auto_voice, "AutoVoice");
+ }
+
+ static HELPSERV_OPTION(opt_auto_devoice) {
+ OPTION_BINARY(hs->auto_devoice, "AutoDeVoice");
+ }
+
static HELPSERV_FUNC(cmd_set) {
helpserv_option_func_t *opt;
***************
*** 2783,2787 ****
opt_empty_interval, opt_stale_delay, opt_request_persistence,
opt_helper_persistence, opt_notification, opt_id_wrap,
! opt_req_maxlen, opt_privmsg_only, opt_req_on_join
};
--- 2818,2823 ----
opt_empty_interval, opt_stale_delay, opt_request_persistence,
opt_helper_persistence, opt_notification, opt_id_wrap,
! opt_req_maxlen, opt_privmsg_only, opt_req_on_join, opt_auto_voice,
! opt_auto_devoice
};
***************
*** 3068,3071 ****
--- 3104,3109 ----
saxdb_write_int(ctx, KEY_PRIVMSG_ONLY, hs->privmsg_only);
saxdb_write_int(ctx, KEY_REQ_ON_JOIN, hs->req_on_join);
+ saxdb_write_int(ctx, KEY_AUTO_VOICE, hs->auto_voice);
+ saxdb_write_int(ctx, KEY_AUTO_DEVOICE, hs->auto_devoice);
/* End bot record */
***************
*** 3171,3174 ****
--- 3209,3216 ----
str = database_get_data(GET_RECORD_OBJECT(br), KEY_REQ_ON_JOIN, RECDB_QSTRING);
hs->req_on_join = str ? enabled_string(str) : 0;
+ str = database_get_data(GET_RECORD_OBJECT(br), KEY_AUTO_VOICE, RECDB_QSTRING);
+ hs->auto_voice = str ? enabled_string(str) : 0;
+ str = database_get_data(GET_RECORD_OBJECT(br), KEY_AUTO_DEVOICE, RECDB_QSTRING);
+ hs->auto_devoice = str ? enabled_string(str) : 0;
dict_foreach(users, user_read_helper, hs);
***************
*** 3405,3408 ****
--- 3447,3451 ----
struct helpserv_reqlist *reqlist, *hand_reqlist=NULL;
struct helpserv_request *newest=NULL, *nicknewest=NULL;
+ struct modeNode *mn;
unsigned int i;
const int from_opserv = 0; /* For helpserv_notice */
***************
*** 3460,3463 ****
--- 3503,3510 ----
nicknewest = req;
}
+
+ if (hs->auto_voice && req->helper && (mn = GetUserMode(hs->helpchan, user)) && !(mn->modes & MODE_VOICE)) {
+ AddChannelVoice(1, &user, hs->helpchan, hs->helpserv, 1);
+ }
}
***************
*** 4063,4066 ****
--- 4110,4115 ----
helpserv_define_option("PRIVMSGONLY", opt_privmsg_only);
helpserv_define_option("REQONJOIN", opt_req_on_join);
+ helpserv_define_option("AUTOVOICE", opt_auto_voice);
+ helpserv_define_option("AUTODEVOICE", opt_auto_devoice);
helpserv_bots_dict = dict_new();
Index: helpserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.help,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** helpserv.help 9 Nov 2002 03:46:39 -0000 1.15
--- helpserv.help 1 Dec 2002 00:38:06 -0000 1.16
***************
*** 141,144 ****
--- 141,146 ----
"PrivmsgOnly Messages to users are sent as privmsg (overriding account preference)",
"ReqOnJoin Automatically opens a request for a user who joins the channel",
+ "AutoVoice Automatically voices users when their request is assigned to a helper",
+ "AutoDeVoice Automatically devoices users when their request is closed or their helper is unassigned",
"$uSee also:$u set <option-name>");
"SET PAGETARGET" ("$bSET PAGETARGET$b",
|
|
From: Adrian D. <sai...@us...> - 2002-11-29 04:09:45
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18273
Modified Files:
Tag: rel-1_1-branch
helpserv.c
Log Message:
Typo fix (backport from 1.2)
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.14.2.9
retrieving revision 1.14.2.10
diff -C2 -r1.14.2.9 -r1.14.2.10
*** helpserv.c 23 Oct 2002 16:22:51 -0000 1.14.2.9
--- helpserv.c 29 Nov 2002 04:09:42 -0000 1.14.2.10
***************
*** 139,143 ****
#define HSMSG_NO_SELF_CLVL "You cannot change your own access."
#define HSMSG_NO_BUMP_ACCESS "You cannot give users the same or more access than yourself."
! #define HSMSG_NO_TRANSFER_SELF "You cannot give ownership to your own accountv."
#define HSMSG_OWNERSHIP_GIVEN "Ownership of $b%s$b has been transferred to account $b%s$b."
#define HSMSG_ADDED_USER "Added new $b%s$b %s to the user list."
--- 139,143 ----
#define HSMSG_NO_SELF_CLVL "You cannot change your own access."
#define HSMSG_NO_BUMP_ACCESS "You cannot give users the same or more access than yourself."
! #define HSMSG_NO_TRANSFER_SELF "You cannot give ownership to your own account."
#define HSMSG_OWNERSHIP_GIVEN "Ownership of $b%s$b has been transferred to account $b%s$b."
#define HSMSG_ADDED_USER "Added new $b%s$b %s to the user list."
|
|
From: Adrian D. <sai...@us...> - 2002-11-29 02:03:52
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv23120 Modified Files: helpserv.c Log Message: Typo fix Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** helpserv.c 14 Nov 2002 02:22:35 -0000 1.52 --- helpserv.c 29 Nov 2002 02:03:49 -0000 1.53 *************** *** 123,127 **** #define HSMSG_NO_SELF_CLVL "You cannot change your own access." #define HSMSG_NO_BUMP_ACCESS "You cannot give users the same or more access than yourself." ! #define HSMSG_NO_TRANSFER_SELF "You cannot give ownership to your own accountv." #define HSMSG_OWNERSHIP_GIVEN "Ownership of $b%s$b has been transferred to account $b%s$b." #define HSMSG_ADDED_USER "Added new $b%s$b %s to the user list." --- 123,127 ---- #define HSMSG_NO_SELF_CLVL "You cannot change your own access." #define HSMSG_NO_BUMP_ACCESS "You cannot give users the same or more access than yourself." ! #define HSMSG_NO_TRANSFER_SELF "You cannot give ownership to your own account." #define HSMSG_OWNERSHIP_GIVEN "Ownership of $b%s$b has been transferred to account $b%s$b." #define HSMSG_ADDED_USER "Added new $b%s$b %s to the user list." |
|
From: Adrian D. <sai...@us...> - 2002-11-28 22:00:22
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25872
Modified Files:
chanserv.c
Log Message:
Forward port from 1.1: 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.312
retrieving revision 1.313
diff -C2 -r1.312 -r1.313
*** chanserv.c 24 Nov 2002 21:55:27 -0000 1.312
--- chanserv.c 28 Nov 2002 22:00:19 -0000 1.313
***************
*** 2369,2373 ****
struct userData *actor;
enum userLevel access, new_access = ulNone;
! int privileged = IsHelping(user);
REQUIRE_PARAMS(3);
--- 2369,2373 ----
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: Adrian D. <sai...@us...> - 2002-11-24 21:55:31
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv30592
Modified Files:
chanserv.c
Log Message:
cmd_move: Give DNR reasons to privileged users, like cmd_register does
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.311
retrieving revision 1.312
diff -C2 -r1.311 -r1.312
*** chanserv.c 23 Nov 2002 04:33:23 -0000 1.311
--- chanserv.c 24 Nov 2002 21:55:27 -0000 1.312
***************
*** 1917,1920 ****
--- 1917,1921 ----
int new_channel = 0, force = 0;
char reason[MAXLEN];
+ struct do_not_register *dnr;
REQUIRE_PARAMS(2);
***************
*** 1930,1936 ****
{
! if(!force && chanserv_is_dnr(target->name, NULL))
{
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
return 0;
}
--- 1931,1944 ----
{
! if(!force && (dnr = chanserv_is_dnr(target->name, NULL)))
{
! if(IsPrivileged(user))
! {
! chanserv_notice(user, CSMSG_DNR_INFO, dnr->chan_name, dnr->setter, dnr->reason);
! }
! else
! {
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
! }
return 0;
}
***************
*** 1950,1966 ****
}
! for(uData = channel->channel_info->users; uData; uData = uData->next)
{
! if((uData->access == ulOwner) && chanserv_is_dnr(NULL, uData->handle))
{
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
! return 0;
}
- }
! if(!force && chanserv_is_dnr(argv[1], NULL))
! {
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
! return 0;
}
--- 1958,1991 ----
}
! if (!force)
{
! for(uData = channel->channel_info->users; uData; uData = uData->next)
{
! if((uData->access == ulOwner) && (dnr = chanserv_is_dnr(NULL, uData->handle)))
! {
! if(IsPrivileged(user))
! {
! chanserv_notice(user, CSMSG_DNR_INFO, dnr->chan_name, dnr->setter, dnr->reason);
! }
! else
! {
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
! }
! return 0;
! }
}
! if((dnr = chanserv_is_dnr(argv[1], NULL)))
! {
! if(IsPrivileged(user))
! {
! chanserv_notice(user, CSMSG_DNR_INFO, dnr->chan_name, dnr->setter, dnr->reason);
! }
! else
! {
! chanserv_notice(user, CSMSG_DNR_CHANNEL_MOVE, argv[1]);
! }
! return 0;
! }
}
|
|
From: Zoot <zo...@us...> - 2002-11-23 04:33:27
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv32078/src
Modified Files:
chanserv.c
Log Message:
Fix a minor bug where ChanServ would print gibberish in a channel's suspension history.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.310
retrieving revision 1.311
diff -C2 -r1.310 -r1.311
*** chanserv.c 22 Nov 2002 04:07:08 -0000 1.310
--- chanserv.c 23 Nov 2002 04:33:23 -0000 1.311
***************
*** 4053,4057 ****
case 5: /* issue time set, expires in future */
intervalString(buf1, now-suspended->issued);
! intervalString(buf1, suspended->expires-now);
chanserv_notice(user, CSMSG_CHANNEL_SUSPENDED_5, buf1, suspended->suspender, buf2, suspended->reason);
break;
--- 4053,4057 ----
case 5: /* issue time set, expires in future */
intervalString(buf1, now-suspended->issued);
! intervalString(buf2, suspended->expires-now);
chanserv_notice(user, CSMSG_CHANNEL_SUSPENDED_5, buf1, suspended->suspender, buf2, suspended->reason);
break;
|
|
From: Zoot <zo...@us...> - 2002-11-23 03:51:07
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17158/src
Modified Files:
Tag: rel-1_1-branch
chanserv.c
Log Message:
Remember to reinsert suspension records under the new name when moving channels. This fixes a possible, if unlikely crash.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.232.2.13
retrieving revision 1.232.2.14
diff -C2 -r1.232.2.13 -r1.232.2.14
*** chanserv.c 16 Nov 2002 19:12:18 -0000 1.232.2.13
--- chanserv.c 23 Nov 2002 03:51:03 -0000 1.232.2.14
***************
*** 2317,2322 ****
--- 2317,2324 ----
struct suspended *suspended = target->channel_info->suspended;
+ dict_remove2(sChannels, suspended->name, 1);
free(suspended->name);
suspended->name = strdup(target->name);
+ dict_insert(sChannels, suspended->name, suspended);
}
else
|
|
From: Entrope <en...@us...> - 2002-11-23 03:47:46
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv16474/src
Modified Files:
gline.c
Log Message:
fix signedness bug in ?gtrace
Index: gline.c
===================================================================
RCS file: /cvsroot/srvx/services/src/gline.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** gline.c 27 Aug 2002 01:58:50 -0000 1.31
--- gline.c 23 Nov 2002 03:47:43 -0000 1.32
***************
*** 268,272 ****
for (i=0; i<argc; i++) {
! if (i > argc - 2) {
send_message(user, src, MSG_MISSING_PARAMS, argv[i]);
goto fail;
--- 268,272 ----
for (i=0; i<argc; i++) {
! if (i + 2 > argc) {
send_message(user, src, MSG_MISSING_PARAMS, argv[i]);
goto fail;
|
|
From: Entrope <en...@us...> - 2002-11-23 03:47:35
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv16445/src
Modified Files:
Tag: rel-1_1-branch
gline.c
Log Message:
fix signedness bug in ?gtrace
Index: gline.c
===================================================================
RCS file: /cvsroot/srvx/services/src/gline.c,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -C2 -r1.24 -r1.24.2.1
*** gline.c 25 May 2002 00:49:05 -0000 1.24
--- gline.c 23 Nov 2002 03:47:32 -0000 1.24.2.1
***************
*** 278,282 ****
for (i=0; i<argc; i++) {
! if (i > argc - 2) {
send_message(user, src, MSG_MISSING_PARAMS, argv[i]);
goto fail;
--- 278,282 ----
for (i=0; i<argc; i++) {
! if (i + 2 > argc) {
send_message(user, src, MSG_MISSING_PARAMS, argv[i]);
goto fail;
|
|
From: Zoot <zo...@us...> - 2002-11-22 21:55:36
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9614/src
Modified Files:
saxdb.c
Log Message:
Fix a small memory leak in saxdb_write_db().
Index: saxdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/saxdb.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** saxdb.c 14 Nov 2002 00:50:10 -0000 1.21
--- saxdb.c 22 Nov 2002 21:55:32 -0000 1.22
***************
*** 134,137 ****
--- 134,138 ----
if (!ctx.output) {
log(MAIN_LOG, LOG_ERROR, "Unable to write to %s: %s\n", tmp_fname, strerror(errno));
+ int_list_clean(&ctx.complex);
return 1;
}
|
|
From: Entrope <en...@us...> - 2002-11-22 04:30:51
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5256/src
Modified Files:
checkdb.c expnhelp.c globtest.c
Log Message:
define more symbols so checkdb, expnhelp, globtest compile
flush expnhelp stderr after each log so you can actually see error messages
Index: checkdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/checkdb.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** checkdb.c 5 Sep 2002 14:57:23 -0000 1.10
--- checkdb.c 22 Nov 2002 04:30:48 -0000 1.11
***************
*** 4,8 ****
#include "timeq.h"
! int bad = 0;
/* because recdb likes to log stuff.. */
--- 4,9 ----
#include "timeq.h"
! int bad;
! const char *hidden_host_suffix;
/* because recdb likes to log stuff.. */
***************
*** 27,30 ****
--- 28,35 ----
void conf_register_reload(conf_reload_func crf) {
(void)crf;
+ }
+
+ void reg_exit_func(exit_func_t handler) {
+ (void)handler;
}
Index: expnhelp.c
===================================================================
RCS file: /cvsroot/srvx/services/src/expnhelp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** expnhelp.c 14 Nov 2002 00:50:39 -0000 1.6
--- expnhelp.c 22 Nov 2002 04:30:48 -0000 1.7
***************
*** 10,16 ****
--- 10,18 ----
vfprintf(stderr, format, va);
va_end(va);
+ fflush(stderr);
}
struct string_list *new_argv;
+ const char *hidden_host_suffix;
struct cfg_scan {
Index: globtest.c
===================================================================
RCS file: /cvsroot/srvx/services/src/globtest.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** globtest.c 15 Aug 2002 02:49:26 -0000 1.5
--- globtest.c 22 Nov 2002 04:30:48 -0000 1.6
***************
*** 83,84 ****
--- 83,86 ----
va_end(va);
}
+
+ const char *hidden_host_suffix;
|
|
From: Entrope <en...@us...> - 2002-11-22 04:29:49
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5056/src
Modified Files:
proto-common.c tools.c
Log Message:
export hidden_host_suffix, so that it is possible to...
make user_matches_glob() compare against hidden_host too
Index: proto-common.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-common.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** proto-common.c 31 Oct 2002 03:46:20 -0000 1.22
--- proto-common.c 22 Nov 2002 04:29:46 -0000 1.23
***************
*** 35,38 ****
--- 35,39 ----
struct io_fd *socket_io_fd;
int force_n2k;
+ const char *hidden_host_suffix;
static char replay_line[MAXLEN+80];
***************
*** 41,45 ****
static int replay_connected;
static unsigned int nicklen = NICKLEN; /* how long do we think servers allow nicks to be? */
- static const char *hidden_host_suffix;
extern struct cManagerNode cManager;
--- 42,45 ----
Index: tools.c
===================================================================
RCS file: /cvsroot/srvx/services/src/tools.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -r1.118 -r1.119
*** tools.c 24 Sep 2002 19:19:43 -0000 1.118
--- tools.c 22 Nov 2002 04:29:46 -0000 1.119
***************
*** 21,24 ****
--- 21,25 ----
#include "hash.h"
#include "log.h"
+ #include "nickserv.h"
#include "policer.h"
#include "recdb.h"
***************
*** 285,292 ****
--- 286,296 ----
}
+ extern const char *hidden_host_suffix;
+
int
user_matches_glob(struct userNode *user, const char *orig_glob, int include_nick)
{
char *glob, *marker;
+
/* Make a writable copy of the glob */
glob = alloca(strlen(orig_glob)+1);
***************
*** 317,320 ****
--- 321,329 ----
return match_ircglob(userip, glob);
} else {
+ if (hidden_host_suffix && user->handle_info) {
+ char hidden_host[HOSTLEN+1];
+ snprintf(hidden_host, sizeof(hidden_host), "%s.%s", user->handle_info->handle, hidden_host_suffix);
+ if (match_ircglob(hidden_host, glob)) return 1;
+ }
/* The host part of the mask isn't IP-based */
return match_ircglob(user->hostname, glob);
|
|
From: Entrope <en...@us...> - 2002-11-22 04:11:28
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1354/src
Modified Files:
opserv.c
Log Message:
complain if somebody tries to addtrust *@host
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.291
retrieving revision 1.292
diff -C2 -r1.291 -r1.292
*** opserv.c 14 Nov 2002 02:22:35 -0000 1.291
--- opserv.c 22 Nov 2002 04:11:24 -0000 1.292
***************
*** 134,137 ****
--- 134,138 ----
#define OSMSG_NOT_EXEMPT "$b%s$b is not on the exempt list."
#define OSMSG_ALREADY_TRUSTED "Host $b%s$b is already trusted (use $bdeltrust$b and then $baddtrust$b to adjust)."
+ #define OSMSG_HOSTNAME_ONLY "Please only use the hostname, and no ident part."
#define OSMSG_ADDED_TRUSTED "Added trusted hosts to the trusted-hosts list."
#define OSMSG_REMOVED_TRUSTED "Removed trusted hosts from the trusted-hosts list."
***************
*** 2101,2104 ****
--- 2102,2109 ----
if (dict_find(opserv_trusted_hosts, argv[1], NULL)) {
return opserv_notice(user, OSMSG_ALREADY_TRUSTED, argv[1]);
+ }
+ if (strchr(argv[1], '@')) {
+ reply(OSMSG_HOSTNAME_ONLY);
+ return 0;
}
reason = unsplit_string(argv+4, argc-4, NULL);
|
|
From: Entrope <en...@us...> - 2002-11-22 04:10:38
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1176/src
Modified Files:
nickserv.c
Log Message:
tell users with bad hostmasks but email set about authcookie
be clearer about following the discrim limit
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -C2 -r1.216 -r1.217
*** nickserv.c 12 Nov 2002 02:28:41 -0000 1.216
--- nickserv.c 22 Nov 2002 04:10:32 -0000 1.217
***************
*** 123,134 ****
#define NSMSG_EMAIL_SAME "That is the email address already there; no need to change it."
#define NSMSG_EMAIL_CHANGED "You have successfully changed your email address."
! #define NSMSG_BAD_COOKIE_TYPE "Your account had bad cookie type %d; sorry. I'm confused. Please report this bug."
#define NSMSG_MUST_TIME_OUT "You must wait for cookies of that type to time out."
#define NSMSG_ATE_COOKIE "I ate the cookie for your account. You may now have another."
! #define NSMSG_USE_RENAME "You're already authenticated to account $b%s$b -- contact the support staff to rename your account."
#define NSMSG_REGISTER_BAD_NICKMASK "Could not recognize $b%s$b as either a current nick or a hostmask."
! #define NSMSG_NICK_NOT_REGISTERED "Nick $b%s$b hasn't been registered to any account."
! #define NSMSG_HANDLE_NOT_FOUND "Couldn't find your account -- did you register yet?"
#define NSMSG_ALREADY_AUTHED "You are already authed to account $b%s$b; you must reconnect to auth to a different account."
#define NSMSG_HOSTMASK_INVALID "Your hostmask is not valid for account $b%s$b."
#define NSMSG_USER_IS_SERVICE "$b%s$b is a network service; you can only use that command on real users."
--- 123,135 ----
#define NSMSG_EMAIL_SAME "That is the email address already there; no need to change it."
#define NSMSG_EMAIL_CHANGED "You have successfully changed your email address."
! #define NSMSG_BAD_COOKIE_TYPE "Your account had bad cookie type %d; sorry. I am confused. Please report this bug."
#define NSMSG_MUST_TIME_OUT "You must wait for cookies of that type to time out."
#define NSMSG_ATE_COOKIE "I ate the cookie for your account. You may now have another."
! #define NSMSG_USE_RENAME "You are already authenticated to account $b%s$b -- contact the support staff to rename your account."
#define NSMSG_REGISTER_BAD_NICKMASK "Could not recognize $b%s$b as either a current nick or a hostmask."
! #define NSMSG_NICK_NOT_REGISTERED "Nick $b%s$b has not been registered to any account."
! #define NSMSG_HANDLE_NOT_FOUND "Could not find your account -- did you register yet?"
#define NSMSG_ALREADY_AUTHED "You are already authed to account $b%s$b; you must reconnect to auth to a different account."
+ #define NSMSG_USE_AUTHCOOKIE "Your hostmask is not valid for account $b%s$b. Please use the $bauthcookie$b command to grant yourself access. (/msg $S authcookie %s)"
#define NSMSG_HOSTMASK_INVALID "Your hostmask is not valid for account $b%s$b."
#define NSMSG_USER_IS_SERVICE "$b%s$b is a network service; you can only use that command on real users."
***************
*** 177,182 ****
#define NSMSG_USE_CMD_PASS "Please use the PASS command to change your password."
#define NSMSG_UNKNOWN_NICK "I know nothing about nick $b%s$b."
! #define NSMSG_NOT_YOUR_NICK "$b%s$b Is Nacho Nick."
! #define NSMSG_NICK_USER_YOU "I won't kill you."
#define NSMSG_UNREGNICK_SUCCESS "Nick $b%s$b has been unregistered."
#define NSMSG_UNREGISTER_SUCCESS "Account $b%s$b has been unregistered."
--- 178,183 ----
#define NSMSG_USE_CMD_PASS "Please use the PASS command to change your password."
#define NSMSG_UNKNOWN_NICK "I know nothing about nick $b%s$b."
! #define NSMSG_NOT_YOUR_NICK "The nick $b%s$b is not registered to you."
! #define NSMSG_NICK_USER_YOU "I will not let you kill yourself."
#define NSMSG_UNREGNICK_SUCCESS "Nick $b%s$b has been unregistered."
#define NSMSG_UNREGISTER_SUCCESS "Account $b%s$b has been unregistered."
***************
*** 1380,1384 ****
res = valid_user_for(user, hi);
if (!res) {
! nickserv_notice(user, NSMSG_HOSTMASK_INVALID, hi->handle);
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
--- 1381,1389 ----
res = valid_user_for(user, hi);
if (!res) {
! if (hi->email_addr && nickserv_conf.email_enabled) {
! reply(NSMSG_USE_AUTHCOOKIE, hi->handle, hi->handle);
! } else {
! reply(NSMSG_HOSTMASK_INVALID, hi->handle);
! }
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
***************
*** 2703,2716 ****
{
dict_iterator_t it, next;
! unsigned int matched = 0;
! for (it=dict_first(nickserv_handle_dict); it; it=next) {
next = iter_next(it);
if (nickserv_discrim_match(discrim, iter_data(it))) {
dsf(source, iter_data(it));
matched++;
- if(matched >= discrim->limit) {
- return matched;
- }
}
}
--- 2708,2720 ----
{
dict_iterator_t it, next;
! unsigned int matched;
! for (it = dict_first(nickserv_handle_dict), matched = 0;
! it && (matched < discrim->limit);
! it = next) {
next = iter_next(it);
if (nickserv_discrim_match(discrim, iter_data(it))) {
dsf(source, iter_data(it));
matched++;
}
}
|
|
From: Entrope <en...@us...> - 2002-11-22 04:08:00
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv664/src
Modified Files:
modcmd.c
Log Message:
automatically bind commands on a per-service basis (if there are no
commands for the service, give it the defaults)
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** modcmd.c 22 Nov 2002 02:39:52 -0000 1.39
--- modcmd.c 22 Nov 2002 04:07:57 -0000 1.40
***************
*** 1875,1878 ****
--- 1875,1879 ----
if (!(nick = conf_get_data(buf, RECDB_QSTRING))) continue;
if (!(service = service_find(nick))) continue;
+ if (dict_size(service->commands) > 0) continue;
/* Bind the default modules for this service to it */
for (jj = 0; def_binds[ii].modnames[jj]; ++jj) {
***************
*** 1882,1909 ****
/* Bind the help command to this service */
service_bind_modcmd(service, help_command, help_command->name);
! }
!
! /* Now some silly hax.. */
! if ((nick = conf_get_data("services/ChanServ/nick", RECDB_QSTRING))
! && (service = service_find(nick))) {
! service_make_alias(service, "addowner", "*chanserv.adduser", "owner", "$1", NULL);
! service_make_alias(service, "addcoowner", "*chanserv.adduser", "coowner", "$1", NULL);
! service_make_alias(service, "addmaster", "*chanserv.adduser", "master", "$1", NULL);
! service_make_alias(service, "addop", "*chanserv.adduser", "op", "$1", NULL);
! service_make_alias(service, "addpeon", "*chanserv.adduser", "peon", "$1", NULL);
! service_make_alias(service, "delowner", "*chanserv.deluser", "owner", "$1", NULL);
! service_make_alias(service, "delcoowner", "*chanserv.deluser", "coowner", "$1", NULL);
! service_make_alias(service, "delmaster", "*chanserv.deluser", "master", "$1", NULL);
! service_make_alias(service, "delop", "*chanserv.deluser", "op", "$1", NULL);
! service_make_alias(service, "delpeon", "*chanserv.deluser", "peon", "$1", NULL);
! service_make_alias(service, "command", "*modcmd.command", NULL);
! service_make_alias(service, "god", "*modcmd.god", NULL);
! }
! if ((nick = conf_get_data("services/OpServ/nick", RECDB_QSTRING))
! && (service = service_find(nick))) {
! struct svccmd *svccmd;
! svccmd = service_make_alias(service, "stats", "*modcmd.joiner", NULL);
! svccmd->min_opserv_level = 101;
! svccmd = service_make_alias(service, "helpserv", "*helpserv.helpserv", NULL);
}
}
--- 1883,1906 ----
/* Bind the help command to this service */
service_bind_modcmd(service, help_command, help_command->name);
! /* Now some silly hax.. (aliases that most people want) */
! if (!irccasecmp(def_binds[ii].svcname, "ChanServ")) {
! service_make_alias(service, "addowner", "*chanserv.adduser", "owner", "$1", NULL);
! service_make_alias(service, "addcoowner", "*chanserv.adduser", "coowner", "$1", NULL);
! service_make_alias(service, "addmaster", "*chanserv.adduser", "master", "$1", NULL);
! service_make_alias(service, "addop", "*chanserv.adduser", "op", "$1", NULL);
! service_make_alias(service, "addpeon", "*chanserv.adduser", "peon", "$1", NULL);
! service_make_alias(service, "delowner", "*chanserv.deluser", "owner", "$1", NULL);
! service_make_alias(service, "delcoowner", "*chanserv.deluser", "coowner", "$1", NULL);
! service_make_alias(service, "delmaster", "*chanserv.deluser", "master", "$1", NULL);
! service_make_alias(service, "delop", "*chanserv.deluser", "op", "$1", NULL);
! service_make_alias(service, "delpeon", "*chanserv.deluser", "peon", "$1", NULL);
! service_make_alias(service, "command", "*modcmd.command", NULL);
! service_make_alias(service, "god", "*modcmd.god", NULL);
! } else if (!irccasecmp(def_binds[ii].svcname, "OpServ")) {
! struct svccmd *svccmd;
! svccmd = service_make_alias(service, "stats", "*modcmd.joiner", NULL);
! svccmd->min_opserv_level = 101;
! service_make_alias(service, "helpserv", "*helpserv.helpserv", NULL);
! }
}
}
***************
*** 1939,1946 ****
/* Check databases. */
saxdb_register("modcmd", modcmd_saxdb_read, modcmd_saxdb_write);
! if (!saxdb_present) {
! create_default_binds();
! import_aliases_db();
! }
/* Resolve command rule-templates. */
--- 1936,1941 ----
/* Check databases. */
saxdb_register("modcmd", modcmd_saxdb_read, modcmd_saxdb_write);
! create_default_binds();
! if (!saxdb_present) import_aliases_db();
/* Resolve command rule-templates. */
|
|
From: Entrope <en...@us...> - 2002-11-22 04:07:12
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv500/src
Modified Files:
chanserv.c
Log Message:
add back the !invite command
change !suspend/!unsuspend to !adduser/!deluser access level
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.309
retrieving revision 1.310
diff -C2 -r1.309 -r1.310
*** chanserv.c 22 Nov 2002 02:20:35 -0000 1.309
--- chanserv.c 22 Nov 2002 04:07:08 -0000 1.310
***************
*** 237,241 ****
#define CSMSG_PROCESS_USERS "%s users in $b%s$b."
! #define CSMSG_ALREADY_PRESENT "You are already in $b%s$b."
#define CSMSG_LOW_CHANNEL_ACCESS "You lack sufficient access in %s to use this command."
--- 237,245 ----
#define CSMSG_PROCESS_USERS "%s users in $b%s$b."
! #define CSMSG_INVITED_USER "Invited $b%s$b to join %s."
! #define CSMSG_INVITING_YOU "$b%s$b invites you to join %s%s%s"
! #define CSMSG_CANNOT_INVITE "You lack sufficient access to invite users."
! #define CSMSG_ALREADY_PRESENT "%s is $balready in %s$b."
! #define CSMSG_YOU_ALREADY_PRESENT "You are already in $b%s$b."
#define CSMSG_LOW_CHANNEL_ACCESS "You lack sufficient access in %s to use this command."
***************
*** 272,276 ****
#define CSMSG_BAD_MAX_LENGTH "$b%s$b is not a valid maximum length (must be between 20 and 450 inclusive)."
#define CSMSG_NOTE_MODIFIED "Note type $b%s$b modified."
! #define CSMSG_NOTE_CREATED "Note type $b%s$b deleted."
#define CSMSG_NOTE_TYPE_USED "Note type $b%s$b is in use; give the FORCE argument to delete it."
#define CSMSG_NOTE_DELETED "Note type $b%s$b deleted."
--- 276,280 ----
#define CSMSG_BAD_MAX_LENGTH "$b%s$b is not a valid maximum length (must be between 20 and 450 inclusive)."
#define CSMSG_NOTE_MODIFIED "Note type $b%s$b modified."
! #define CSMSG_NOTE_CREATED "Note type $b%s$b created."
#define CSMSG_NOTE_TYPE_USED "Note type $b%s$b is in use; give the FORCE argument to delete it."
#define CSMSG_NOTE_DELETED "Note type $b%s$b deleted."
***************
*** 3937,3940 ****
--- 3941,3985 ----
}
+ static CHANSERV_FUNC(cmd_invite)
+ {
+ struct userData *uData;
+ struct userNode *invite;
+
+ uData = GetChannelUser(channel->channel_info, user->handle_info);
+
+ if(argc > 1)
+ {
+ if(!(invite = GetUserH(argv[1])))
+ {
+ chanserv_notice(user, MSG_NICK_UNKNOWN, argv[1]);
+ return 0;
+ }
+ }
+ else
+ {
+ invite = user;
+ }
+
+ if(GetUserMode(channel, invite))
+ {
+ chanserv_notice(user, CSMSG_ALREADY_PRESENT, invite->nick, channel->name);
+ return 0;
+ }
+
+ if(user != invite)
+ {
+ char *reason = (argc > 2) ? unsplit_string(argv + 2, argc - 2, NULL) : "";
+
+ chanserv_notice(invite, CSMSG_INVITING_YOU, user->nick, channel->name, (argc > 2) ? ": " : ".", reason);
+ }
+ irc_invite(chanserv, invite, channel);
+ if(argc > 1)
+ {
+ chanserv_notice(user, CSMSG_INVITED_USER, argv[1], channel->name);
+ }
+
+ return 1;
+ }
+
static CHANSERV_FUNC(cmd_inviteme)
{
***************
*** 3943,3947 ****
if(GetUserMode(channel, user))
{
! reply(CSMSG_ALREADY_PRESENT, channel->name);
return 0;
}
--- 3988,3992 ----
if(GetUserMode(channel, user))
{
! reply(CSMSG_YOU_ALREADY_PRESENT, channel->name);
return 0;
}
***************
*** 7149,7152 ****
--- 7194,7199 ----
DEFINE_COMMAND(adduser, 3, MODCMD_REQUIRE_CHANUSER, "access", "master", NULL);
DEFINE_COMMAND(deluser, 2, MODCMD_REQUIRE_CHANUSER, "access", "master", NULL);
+ DEFINE_COMMAND(suspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "master", NULL);
+ DEFINE_COMMAND(unsuspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "master", NULL);
DEFINE_COMMAND(mdelowner, 2, MODCMD_REQUIRE_CHANUSER, "flags", "+helping", NULL);
***************
*** 7180,7183 ****
--- 7227,7231 ----
DEFINE_COMMAND(mode, 1, MODCMD_REQUIRE_REGCHAN, "template", "op", NULL);
DEFINE_COMMAND(inviteme, 1, MODCMD_REQUIRE_CHANNEL, "access", "peon", NULL);
+ DEFINE_COMMAND(invite, 1, MODCMD_REQUIRE_CHANNEL, "access", "master", NULL);
DEFINE_COMMAND(set, 1, MODCMD_REQUIRE_CHANUSER, "access", "op", NULL);
DEFINE_COMMAND(setinfo, 1, MODCMD_REQUIRE_CHANUSER, "flags", "+nolog", NULL);
***************
*** 7189,7194 ****
DEFINE_COMMAND(delban, 2, MODCMD_REQUIRE_REGCHAN, "access", "master", NULL);
DEFINE_COMMAND(uset, 1, MODCMD_REQUIRE_CHANUSER, "access", "peon", NULL);
- DEFINE_COMMAND(suspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "coowner", NULL);
- DEFINE_COMMAND(unsuspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "coowner", NULL);
DEFINE_COMMAND(bans, 1, MODCMD_REQUIRE_REGCHAN, "access", "peon", "flags", "+nolog", NULL);
--- 7237,7240 ----
|
|
From: Entrope <en...@us...> - 2002-11-22 02:39:55
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv15725/src
Modified Files:
modcmd.c
Log Message:
svccmd_copy_rules() after calling svccmd_insert() so svccmd->cmd is set properly
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** modcmd.c 12 Nov 2002 20:18:56 -0000 1.38
--- modcmd.c 22 Nov 2002 02:39:52 -0000 1.39
***************
*** 185,189 ****
struct module *module = data;
dict_delete(module->commands);
! if (module->helpfile) close_helpfile(module->helpfile);
free(module->name);
free(module);
--- 185,189 ----
struct module *module = data;
dict_delete(module->commands);
! close_helpfile(module->helpfile);
free(module->name);
free(module);
***************
*** 817,822 ****
}
svccmd = calloc(1, sizeof(*svccmd));
svccmd_copy_rules(svccmd, cmd->defaults);
! return svccmd_insert(service, strdup(name), svccmd, cmd);
}
--- 817,823 ----
}
svccmd = calloc(1, sizeof(*svccmd));
+ svccmd_insert(service, strdup(name), svccmd, cmd);
svccmd_copy_rules(svccmd, cmd->defaults);
! return svccmd;
}
***************
*** 976,981 ****
}
- svccmd_copy_rules(newcmd, template);
svccmd_insert(service, newcmd->name, newcmd, template->command);
reply(MCMSG_COMMAND_BOUND, newcmd->name, newcmd->parent->bot->nick);
return 1;
--- 977,982 ----
}
svccmd_insert(service, newcmd->name, newcmd, template->command);
+ svccmd_copy_rules(newcmd, template);
reply(MCMSG_COMMAND_BOUND, newcmd->name, newcmd->parent->bot->nick);
return 1;
|
|
From: Entrope <en...@us...> - 2002-11-22 02:21:27
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv12009/src
Modified Files:
helpfile.c
Log Message:
allow close_helpfile(NULL), just for ease
Index: helpfile.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpfile.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -r1.59 -r1.60
*** helpfile.c 9 Nov 2002 02:33:22 -0000 1.59
--- helpfile.c 22 Nov 2002 02:21:25 -0000 1.60
***************
*** 518,521 ****
--- 518,522 ----
void close_helpfile(struct helpfile *hf)
{
+ if (!hf) return;
free_database(hf->db);
free(hf);
|