Thread: [srvx-commits] CVS: services/src tools.c,1.110,1.111 proto-p10.c,1.9,1.10 proto-bahamut.c,1.10,1.11
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-08-05 03:22:22
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv31973/src
Modified Files:
tools.c proto-p10.c proto-bahamut.c opserv.help opserv.c
nickserv.c modcmd.help modcmd.c helpserv.c global.c common.h
chanserv.help chanserv.c
Log Message:
un-break changes in unsplit_string() commit by doing it the cleaner way anyway
update help files (especially modcmd.help)
Index: tools.c
===================================================================
RCS file: /cvsroot/srvx/services/src/tools.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -r1.110 -r1.111
*** tools.c 5 Aug 2002 01:46:27 -0000 1.110
--- tools.c 5 Aug 2002 03:22:18 -0000 1.111
***************
*** 876,893 ****
}
! void
! unsplit_string(unsigned char *set[], unsigned int max)
{
static unsigned char unsplit_buffer[MAXLEN*2];
unsigned int ii, jj, pos;
for (ii=pos=0; ii<max; ii++) {
for (jj=0; set[ii][jj]; jj++) {
! unsplit_buffer[pos++] = set[ii][jj];
}
! unsplit_buffer[pos++] = ' ';
}
! unsplit_buffer[--pos] = 0;
! set[0] = unsplit_buffer;
}
--- 876,894 ----
}
! char *
! unsplit_string(unsigned char *set[], unsigned int max, char *dest)
{
static unsigned char unsplit_buffer[MAXLEN*2];
unsigned int ii, jj, pos;
+ if (!dest) dest = unsplit_buffer;
for (ii=pos=0; ii<max; ii++) {
for (jj=0; set[ii][jj]; jj++) {
! dest[pos++] = set[ii][jj];
}
! dest[pos++] = ' ';
}
! dest[--pos] = 0;
! return dest;
}
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** proto-p10.c 4 Aug 2002 21:12:57 -0000 1.9
--- proto-p10.c 5 Aug 2002 03:22:19 -0000 1.10
***************
*** 968,973 ****
case 332:
if (argc < 4) return 0;
! unsplit_string(argv+3, argc-3);
! safestrncpy(cn->topic, argv[3], sizeof(cn->topic));
break;
case 333:
--- 968,972 ----
case 332:
if (argc < 4) return 0;
! safestrncpy(cn->topic, unsplit_string(argv+3, argc-3, NULL), sizeof(cn->topic));
break;
case 333:
***************
*** 1285,1290 ****
}
if (!res) {
! unsplit_string(argv, argc);
! log(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s\n", line);
} else if (!recursive) {
unsigned int i;
--- 1284,1288 ----
}
if (!res) {
! log(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s\n", unsplit_string(argv, argc, NULL));
} else if (!recursive) {
unsigned int i;
Index: proto-bahamut.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** proto-bahamut.c 4 Aug 2002 21:12:57 -0000 1.10
--- proto-bahamut.c 5 Aug 2002 03:22:19 -0000 1.11
***************
*** 1006,1011 ****
}
if (!res) {
! unsplit_string(argv, argc);
! log(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s\n", line);
} else if (!recursive) {
unsigned int i;
--- 1006,1010 ----
}
if (!res) {
! log(MAIN_LOG, LOG_ERROR, "PARSE ERROR on line: %s\n", unsplit_string(argv, argc, NULL));
} else if (!recursive) {
unsigned int i;
Index: opserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.help,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** opserv.help 30 Jul 2002 02:15:11 -0000 1.45
--- opserv.help 5 Aug 2002 03:22:19 -0000 1.46
***************
*** 524,528 ****
" RAW [${level/raw}]",
" STATS [${level/stats}]",
- " TIMECMD [${level/version}]",
" VERSION [${level/version}]");
"DUMP" ("$bDUMP$b",
--- 524,527 ----
***************
*** 553,559 ****
"$bUPTIME$b: Srvx uptime, lines processed, and CPU time.",
"$bWARN$b: The list of channels with activity warnings.");
- "TIMECMD" ("$bTIMECMD$b",
- "/msg $O TIMECMD <command>",
- "Determines how long it takes for the specified $b$O$b command to complete.");
"VERSION" ("$bVERSION$b",
"/msg $O VERSION ",
--- 552,555 ----
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.259
retrieving revision 1.260
diff -C2 -r1.259 -r1.260
*** opserv.c 5 Aug 2002 03:20:24 -0000 1.259
--- opserv.c 5 Aug 2002 03:22:19 -0000 1.260
***************
*** 522,527 ****
} else {
if (argv[2]) {
! unsplit_string(argv+1, argc-1);
! reason = strdup(argv[1]);
} else reason = strdup("No reason");
dict_insert(opserv_chan_warn, strdup(argv[1]), reason);
--- 522,526 ----
} else {
if (argv[2]) {
! reason = strdup(unsplit_string(argv+1, argc-1, NULL));
} else reason = strdup("No reason");
dict_insert(opserv_chan_warn, strdup(argv[1]), reason);
***************
*** 691,695 ****
OPSERV_MIN_PARMS(4, false); /* name, numeric, desc */
- unsplit_string(argv+3, argc-3);
num = atoi(argv[2]);
if ((num < 64) && !force_n2k) {
--- 690,693 ----
***************
*** 710,714 ****
return 0;
}
! snprintf(srvdesc, sizeof(srvdesc), "JUPE %s", argv[3]);
newsrv = AddServer(self, argv[1], 1, now, now, numeric, srvdesc);
if (!newsrv) {
--- 708,712 ----
return 0;
}
! snprintf(srvdesc, sizeof(srvdesc), "JUPE %s", unsplit_string(argv+3, argc-3, NULL));
newsrv = AddServer(self, argv[1], 1, now, now, numeric, srvdesc);
if (!newsrv) {
***************
*** 724,727 ****
--- 722,727 ----
{
struct server *srv;
+ char *reason;
+
OPSERV_MIN_PARMS(2, false);
srv = GetServerH(argv[1]);
***************
*** 731,740 ****
return 0;
} else {
! if (argc > 2) {
! unsplit_string(argv+2, argc-2);
! } else {
! argv[2] = "Unjuping server";
! }
! DelServer(srv, 1, argv[2]);
return 1;
}
--- 731,736 ----
return 0;
} else {
! reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : "Unjuping server";
! DelServer(srv, 1, reason);
return 1;
}
***************
*** 750,758 ****
void uplink_select(char *name);
int uplink_valid(char *name);
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
! if(!strcmp(cManager.uplink->name, argv[1]))
{
opserv_notice(user, OSMSG_CURRENT_UPLINK, cManager.uplink->name);
--- 746,755 ----
void uplink_select(char *name);
int uplink_valid(char *name);
+ char *target;
OPSERV_MIN_PARMS(2, false);
! target = unsplit_string(argv+1, argc-1, NULL);
! if(!strcmp(cManager.uplink->name, target))
{
opserv_notice(user, OSMSG_CURRENT_UPLINK, cManager.uplink->name);
***************
*** 760,770 ****
}
! if(!uplink_valid(argv[1]))
{
! opserv_notice(user, OSMSG_INVALID_UPLINK, argv[1]);
return 0;
}
! uplink_select(argv[1]);
irc_squit(self, "Reconnecting.", NULL);
--- 757,767 ----
}
! if(!uplink_valid(target))
{
! opserv_notice(user, OSMSG_INVALID_UPLINK, target);
return 0;
}
! uplink_select(target);
irc_squit(self, "Reconnecting.", NULL);
***************
*** 774,785 ****
static OPSERV_FUNC(cmd_die)
{
! char *reason;
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
!
! reason = alloca(strlen(argv[1]) + strlen(user->nick) + 20);
! sprintf(reason, "Disconnected by %s [%s]", user->nick, argv[1]);
! irc_squit(self, reason, argv[1]);
quit_services = 1;
return 1;
--- 771,781 ----
static OPSERV_FUNC(cmd_die)
{
! char *reason, *text;
OPSERV_MIN_PARMS(2, false);
! text = unsplit_string(argv+1, argc-1, NULL);
! reason = alloca(strlen(text) + strlen(user->nick) + 20);
! sprintf(reason, "Disconnected by %s [%s]", user->nick, text);
! irc_squit(self, reason, text);
quit_services = 1;
return 1;
***************
*** 790,801 ****
extern int services_argc;
extern char **services_argv;
! char **restart_argv, *reason;
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
!
! reason = alloca(strlen(argv[1]) + strlen(user->nick) + 17);
! sprintf(reason, "Restarted by %s [%s]", user->nick, argv[1]);
! irc_squit(self, reason, argv[1]);
/* Append a NULL to the end of argv[]. */
--- 786,796 ----
extern int services_argc;
extern char **services_argv;
! char **restart_argv, *reason, *text;
OPSERV_MIN_PARMS(2, false);
! text = unsplit_string(argv+1, argc-1, NULL);
! reason = alloca(strlen(text) + strlen(user->nick) + 17);
! sprintf(reason, "Restarted by %s [%s]", user->nick, text);
! irc_squit(self, reason, text);
/* Append a NULL to the end of argv[]. */
***************
*** 834,837 ****
--- 829,833 ----
struct userNode *target;
struct gline *gline;
+ char *reason;
OPSERV_MIN_PARMS(2, false);
***************
*** 845,854 ****
return 0;
}
! if (argc > 2) {
! unsplit_string(argv+2, argc-2);
! gline = opserv_block(target, user->handle_info->handle, argv[2], 0);
! } else {
! gline = opserv_block(target, user->handle_info->handle, NULL, 0);
! }
opserv_notice(user, OSMSG_GLINE_ISSUED, gline->target);
return 1;
--- 841,846 ----
return 0;
}
! reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : NULL;
! gline = opserv_block(target, user->handle_info->handle, reason, 0);
opserv_notice(user, OSMSG_GLINE_ISSUED, gline->target);
return 1;
***************
*** 858,864 ****
{
unsigned long duration;
! OPSERV_MIN_PARMS(4, false);
! unsplit_string(argv+3, argc-3);
if (!is_gline(argv[1])) {
opserv_notice(user, MSG_INVALID_GLINE, argv[1]);
--- 850,858 ----
{
unsigned long duration;
! char *reason;
! struct gline *gline;
+ OPSERV_MIN_PARMS(4, false);
+ reason = unsplit_string(argv+3, argc-3, NULL);
if (!is_gline(argv[1])) {
opserv_notice(user, MSG_INVALID_GLINE, argv[1]);
***************
*** 875,880 ****
}
gline_remove(argv[1], 0);
! gline_add(user->handle_info->handle, argv[1], duration, argv[3], now, 1);
! opserv_notice(user, OSMSG_GLINE_ISSUED, argv[1]);
return 1;
}
--- 869,874 ----
}
gline_remove(argv[1], 0);
! gline = gline_add(user->handle_info->handle, argv[1], duration, reason, now, 1);
! opserv_notice(user, OSMSG_GLINE_ISSUED, gline->target);
return 1;
}
***************
*** 1005,1010 ****
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! unsplit_string(argv+2, argc-2);
! reason = argv[2];
}
target = GetUserH(argv[1]);
--- 999,1003 ----
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! reason = unsplit_string(argv+2, argc-2, NULL);
}
target = GetUserH(argv[1]);
***************
*** 1039,1044 ****
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! unsplit_string(argv+1, argc-1);
! reason = argv[1];
}
limit = user->handle_info->opserv_level;
--- 1032,1036 ----
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! reason = unsplit_string(argv+1, argc-1, NULL);
}
limit = user->handle_info->opserv_level;
***************
*** 1070,1075 ****
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! unsplit_string(argv+2, argc-2);
! reason = argv[2];
}
target = GetUserH(argv[1]);
--- 1062,1066 ----
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! reason = unsplit_string(argv+2, argc-2, NULL);
}
target = GetUserH(argv[1]);
***************
*** 1101,1106 ****
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! unsplit_string(argv+1, argc-1);
! reason = argv[1];
}
/* ban everybody first */
--- 1092,1096 ----
sprintf(reason, OSMSG_KICK_REQUESTED, user->nick);
} else {
! reason = unsplit_string(argv+1, argc-1, NULL);
}
/* ban everybody first */
***************
*** 1128,1137 ****
char *reason;
OPSERV_NEED_CHANNEL();
! if (argc < 2) {
! reason = "Leaving.";
! } else {
! unsplit_string(argv+1, argc-1);
! reason = argv[1];
! }
opserv_notice(user, OSMSG_LEAVING, channel->name);
DelChannelUser(opserv, channel, reason, 0);
--- 1118,1122 ----
char *reason;
OPSERV_NEED_CHANNEL();
! reason = (argc < 2) ? "Leaving." : unsplit_string(argv+1, argc-1, NULL);
opserv_notice(user, OSMSG_LEAVING, channel->name);
DelChannelUser(opserv, channel, reason, 0);
***************
*** 1141,1146 ****
static OPSERV_FUNC(cmd_mode)
{
OPSERV_MIN_PARMS(2, true);
! unsplit_string(argv+1, argc-1);
if (channel->modes & MODE_KEY) {
char *mc = alloca(strlen(channel->key)+4);
--- 1126,1132 ----
static OPSERV_FUNC(cmd_mode)
{
+ char *changes;
OPSERV_MIN_PARMS(2, true);
! changes = unsplit_string(argv+1, argc-1, NULL);
if (channel->modes & MODE_KEY) {
char *mc = alloca(strlen(channel->key)+4);
***************
*** 1148,1153 ****
irc_mode(opserv, channel, mc);
}
! mod_chanmode(channel, argv[1], NULL, 0);
! irc_mode(opserv, channel, argv[1]);
opserv_notice(user, OSMSG_MODE_SET, channel->name);
return 1;
--- 1134,1139 ----
irc_mode(opserv, channel, mc);
}
! mod_chanmode(channel, changes, NULL, 0);
! irc_mode(opserv, channel, changes);
opserv_notice(user, OSMSG_MODE_SET, channel->name);
return 1;
***************
*** 1750,1762 ****
static OPSERV_FUNC(cmd_dump)
{
! char *linedup;
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
/* assume it's only valid IRC if we can parse it */
- linedup = alloca(strlen(argv[1])+1);
- strcpy(linedup, argv[1]);
if (parse_line(linedup, 1)) {
! irc_raw(argv[1]);
opserv_notice(user, OSMSG_LINE_DUMPED);
} else {
--- 1736,1747 ----
static OPSERV_FUNC(cmd_dump)
{
! char linedup[MAXLEN], *original;
OPSERV_MIN_PARMS(2, false);
! original = unsplit_string(argv+1, argc-1, NULL);
! safestrncpy(linedup, original, sizeof(linedup));
/* assume it's only valid IRC if we can parse it */
if (parse_line(linedup, 1)) {
! irc_raw(original);
opserv_notice(user, OSMSG_LINE_DUMPED);
} else {
***************
*** 1768,1781 ****
static OPSERV_FUNC(cmd_raw)
{
! char *linedup;
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
/* Try to parse the line before sending it; if it's too wrong,
* maybe it will core us instead of our uplink. */
- linedup = alloca(strlen(argv[1])+1);
- strcpy(linedup, argv[1]);
parse_line(linedup, 1);
! irc_raw(argv[1]);
opserv_notice(user, OSMSG_LINE_DUMPED);
return 1;
--- 1753,1765 ----
static OPSERV_FUNC(cmd_raw)
{
! char linedup[MAXLEN], *original;
OPSERV_MIN_PARMS(2, false);
! original = unsplit_string(argv+1, argc-1, NULL);
! safestrncpy(linedup, original, sizeof(linedup));
/* Try to parse the line before sending it; if it's too wrong,
* maybe it will core us instead of our uplink. */
parse_line(linedup, 1);
! irc_raw(original);
opserv_notice(user, OSMSG_LINE_DUMPED);
return 1;
***************
*** 1809,1814 ****
OPSERV_MIN_PARMS(5, false);
! unsplit_string(argv+4, argc-4);
! resv = opserv_add_reserve(user, argv[1], argv[2], argv[3], argv[4]);
if (resv) {
opserv_notice(user, OSMSG_COLLIDED_NICK, resv->nick);
--- 1793,1797 ----
OPSERV_MIN_PARMS(5, false);
! resv = opserv_add_reserve(user, argv[1], argv[2], argv[3], unsplit_string(argv+4, argc-4, NULL));
if (resv) {
opserv_notice(user, OSMSG_COLLIDED_NICK, resv->nick);
***************
*** 1826,1831 ****
OPSERV_MIN_PARMS(5, false);
! unsplit_string(argv+4, argc-4);
! resv = opserv_add_reserve(user, argv[1], argv[2], argv[3], argv[4]);
if (resv) {
resv->modes |= FLAGS_PERSISTENT;
--- 1809,1813 ----
OPSERV_MIN_PARMS(5, false);
! resv = opserv_add_reserve(user, argv[1], argv[2], argv[3], unsplit_string(argv+4, argc-4, NULL));
if (resv) {
resv->modes |= FLAGS_PERSISTENT;
***************
*** 1875,1880 ****
OPSERV_MIN_PARMS(2, false);
! unsplit_string(argv+1, argc-1);
! if ((reason = sockcheck_add_test(argv[1]))) {
opserv_notice(user, OSMSG_DEFPROXY_FAILED, reason);
return 0;
--- 1857,1861 ----
OPSERV_MIN_PARMS(2, false);
! if ((reason = sockcheck_add_test(unsplit_string(argv+1, argc-1, NULL)))) {
opserv_notice(user, OSMSG_DEFPROXY_FAILED, reason);
return 0;
***************
*** 2265,2268 ****
--- 2246,2250 ----
{
unsigned long interval;
+ char *reason;
OPSERV_MIN_PARMS(5, false);
***************
*** 2270,2276 ****
return opserv_notice(user, OSMSG_ALREADY_TRUSTED, argv[1]);
}
! unsplit_string(argv+4, argc-4);
interval = ParseInterval(argv[3]);
! opserv_add_trusted_host(argv[1], strtoul(argv[2], NULL, 0), user->handle_info->handle, now, interval ? (now + interval) : 0, argv[4]);
return opserv_notice(user, OSMSG_ADDED_TRUSTED);
}
--- 2252,2258 ----
return opserv_notice(user, OSMSG_ALREADY_TRUSTED, argv[1]);
}
! reason = unsplit_string(argv+4, argc-4, NULL);
interval = ParseInterval(argv[3]);
! opserv_add_trusted_host(argv[1], strtoul(argv[2], NULL, 0), user->handle_info->handle, now, interval ? (now + interval) : 0, reason);
return opserv_notice(user, OSMSG_ADDED_TRUSTED);
}
***************
*** 2303,2306 ****
--- 2285,2289 ----
clone = GetUserH(argv[2]);
if (!irccasecmp(argv[1], "ADD")) {
+ char *userinfo;
if (argc < 5) {
opserv_notice(user, MSG_MISSING_PARAMS, argv[1]);
***************
*** 2312,2316 ****
return 0;
}
! unsplit_string(argv+4, argc-4);
for (i=0; argv[3][i]; i++) {
if (argv[3][i] == '@') {
--- 2295,2299 ----
return 0;
}
! userinfo = unsplit_string(argv+4, argc-4, NULL);
for (i=0; argv[3][i]; i++) {
if (argv[3][i] == '@') {
***************
*** 2324,2328 ****
return 0;
}
! if (!(clone = AddClone(argv[2], argv[3], argv[3]+i, argv[4]))) {
opserv_notice(user, OSMSG_CLONE_FAILED, argv[2]);
return 0;
--- 2307,2311 ----
return 0;
}
! if (!(clone = AddClone(argv[2], argv[3], argv[3]+i, userinfo))) {
opserv_notice(user, OSMSG_CLONE_FAILED, argv[2]);
return 0;
***************
*** 2342,2347 ****
const char *reason;
if (argc > 3) {
! unsplit_string(argv+3, argc-3);
! reason = argv[3];
} else {
char *tmp;
--- 2325,2329 ----
const char *reason;
if (argc > 3) {
! reason = unsplit_string(argv+3, argc-3, NULL);
} else {
char *tmp;
***************
*** 2402,2407 ****
}
if (!irccasecmp(argv[1], "SAY")) {
! unsplit_string(argv+4, argc-4);
! irc_privmsg(clone, argv[3], argv[4]);
opserv_notice(user, OSMSG_CLONE_SAID, clone->nick, argv[3]);
return 1;
--- 2384,2389 ----
}
if (!irccasecmp(argv[1], "SAY")) {
! char *text = unsplit_string(argv+4, argc-4, NULL);
! irc_privmsg(clone, argv[3], text);
opserv_notice(user, OSMSG_CLONE_SAID, clone->nick, argv[3]);
return 1;
***************
*** 2492,2497 ****
{
OPSERV_MIN_PARMS(3, 0);
! unsplit_string(argv+2, argc-2);
! return opserv_ban_email(user, argv[1], argv[2]);
}
--- 2474,2478 ----
{
OPSERV_MIN_PARMS(3, 0);
! return opserv_ban_email(user, argv[1], unsplit_string(argv+2, argc-2, NULL));
}
***************
*** 3096,3099 ****
--- 3077,3081 ----
struct record_data *rd;
unsigned int i;
+ char *nodename;
(void)channel;
***************
*** 3106,3113 ****
}
! unsplit_string(argv+1, argc-1);
! if(!(rd = conf_get_node(argv[1])))
{
! opserv_notice(user, OSMSG_UNKNOWN_OPTION, argv[1]);
return 0;
}
--- 3088,3095 ----
}
! nodename = unsplit_string(argv+1, argc-1, NULL);
! if(!(rd = conf_get_node(nodename)))
{
! opserv_notice(user, OSMSG_UNKNOWN_OPTION, nodename);
return 0;
}
***************
*** 3115,3123 ****
if(rd->type == RECDB_QSTRING)
{
! opserv_notice(user, OSMSG_OPTION_IS, argv[1], rd->d.qstring);
}
else if(rd->type == RECDB_STRING_LIST)
{
! opserv_notice(user, OSMSG_OPTION_LIST, argv[1]);
if (rd->d.slist->used)
--- 3097,3105 ----
if(rd->type == RECDB_QSTRING)
{
! opserv_notice(user, OSMSG_OPTION_IS, nodename, rd->d.qstring);
}
else if(rd->type == RECDB_STRING_LIST)
{
! opserv_notice(user, OSMSG_OPTION_LIST, nodename);
if (rd->d.slist->used)
***************
*** 3135,3139 ****
else if(rd->type == RECDB_OBJECT)
{
! opserv_notice(user, OSMSG_OPTION_KEYS, argv[1]);
dict_foreach(rd->d.object, query_keys_helper, user);
}
--- 3117,3121 ----
else if(rd->type == RECDB_OBJECT)
{
! opserv_notice(user, OSMSG_OPTION_KEYS, nodename);
dict_foreach(rd->d.object, query_keys_helper, user);
}
***************
*** 3248,3253 ****
discrim->limit = strtoul(argv[++i], NULL, 10);
} else if (irccasecmp(argv[i], "reason") == 0) {
! unsplit_string(argv+i+1, argc-i-1);
! discrim->reason = argv[++i];
i = argc;
} else if (irccasecmp(argv[i], "last") == 0) {
--- 3230,3234 ----
discrim->limit = strtoul(argv[++i], NULL, 10);
} else if (irccasecmp(argv[i], "reason") == 0) {
! discrim->reason = unsplit_string(argv+i+1, argc-i-1, NULL);
i = argc;
} else if (irccasecmp(argv[i], "last") == 0) {
***************
*** 4131,4137 ****
unsigned int gagged;
unsigned long duration;
OPSERV_MIN_PARMS(4, false);
! unsplit_string(argv + 3, argc - 3);
if (!is_ircmask(argv[1])) {
--- 4112,4119 ----
unsigned int gagged;
unsigned long duration;
+ char *reason;
OPSERV_MIN_PARMS(4, false);
! reason = unsplit_string(argv + 3, argc - 3, NULL);
if (!is_ircmask(argv[1])) {
***************
*** 4150,4154 ****
duration = ParseInterval(argv[2]);
! gagged = gag_create(argv[1], user->handle_info->handle, argv[3], (duration?now+duration:0));
if (gagged) {
--- 4132,4136 ----
duration = ParseInterval(argv[2]);
! gagged = gag_create(argv[1], user->handle_info->handle, reason, (duration?now+duration:0));
if (gagged) {
***************
*** 4218,4223 ****
}
if (!svccmd_can_invoke(user, opserv, subcmd, channel, 0)) return 0;
! unsplit_string(argv + 3, argc - 3);
! if (opserv_add_user_alert(user, name, reaction, argv[3])) {
opserv_notice(user, OSMSG_ADDED_ALERT, name);
}
--- 4200,4204 ----
}
if (!svccmd_can_invoke(user, opserv, subcmd, channel, 0)) return 0;
! if (opserv_add_user_alert(user, name, reaction, unsplit_string(argv + 3, argc - 3, NULL))) {
opserv_notice(user, OSMSG_ADDED_ALERT, name);
}
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -C2 -r1.185 -r1.186
*** nickserv.c 4 Aug 2002 23:17:12 -0000 1.185
--- nickserv.c 5 Aug 2002 03:22:19 -0000 1.186
***************
*** 1777,1782 ****
hi->infoline = NULL;
} else {
! unsplit_string(argv+1, argc-1);
! hi->infoline = strdup(argv[1]);
}
}
--- 1777,1781 ----
hi->infoline = NULL;
} else {
! hi->infoline = strdup(unsplit_string(argv+1, argc-1, NULL));
}
}
***************
*** 2023,2032 ****
if ((argc > 1) && is_valid_oper(user, nickserv_conf.set_epithet_level, 0)) {
! unsplit_string(argv+1, argc-1);
if (hi->epithet) free(hi->epithet);
! if ((argv[1][0] == '*') && !argv[1][1]) {
hi->epithet = NULL;
} else {
! hi->epithet = strdup(argv[1]);
}
}
--- 2022,2031 ----
if ((argc > 1) && is_valid_oper(user, nickserv_conf.set_epithet_level, 0)) {
! char *epithet = unsplit_string(argv+1, argc-1, NULL);
if (hi->epithet) free(hi->epithet);
! if ((epithet[0] == '*') && !epithet[1]) {
hi->epithet = NULL;
} else {
! hi->epithet = strdup(epithet);
}
}
Index: modcmd.help
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.help,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** modcmd.help 30 Jul 2002 02:15:11 -0000 1.1
--- modcmd.help 5 Aug 2002 03:22:19 -0000 1.2
***************
*** 1,11 ****
! "bind" ("BIND ME");
! "help" ("$bHELP$b",
! "/msg $S HELP [command]",
"Help will show you the information for the given command.",
"All help files will use the same syntax, with optional parameters listed in [] and required parameters listed in <>.",
"To see what commands are available for use with $S, type /msg $S help index. For help on any specific command or topic, type /msg $S help help command.");
! "readhelp" ("$bREADHELP$b",
! "/msg $S READHELP [module]",
! "Re-reads the module's help file from disk. If no module name is given, default to the current bot.",
"$uSee Also:$u help");
! "unbind" ("UNBIND ME");
--- 1,50 ----
! "bind" ("/msg $S BIND <service> <bindname> <command> [additional args..]",
! "Binds a command to an existing service. $bbindname$b is the name of the new command for the service. $bcommand$b may be:",
! " CommandName To refer to a command on the same service.",
! " ServiceNick.CommandName To refer to a command bound on a different service.",
! " *ModuleName.CommandName To bind a command directly from a module (note the asterisk before the module name).",
! " *ModuleName.* To bind all commands from the named module.",
! "For simplicity, you cannot bind to a command that is itself an alias. Certain commands will not bound with the last form; you must bind them by name.",
! "(A command binding is very similar to an alias, but only pays the speed penalty for alias expansion when there are additional arguments in the binding.)",
! "$uSee also:$u unbind");
! "help" ("/msg $S HELP [command]",
"Help will show you the information for the given command.",
"All help files will use the same syntax, with optional parameters listed in [] and required parameters listed in <>.",
"To see what commands are available for use with $S, type /msg $S help index. For help on any specific command or topic, type /msg $S help help command.");
! "readhelp" ("/msg $S READHELP <module>",
! "Re-reads the module's help file from disk.",
"$uSee Also:$u help");
! "unbind" ("/msg $S UNBIND <service> <command>",
! "Unbinds a command from a service, so that it is no longer accessible.",
! "Some commands (such as $bauth$b and $bbind$b) will not let you unbind their last binding -- for obvious reasons.",
! "$uSee Also:$u bind");
! "timecmd" ("/msg $S TIMECMD <command and args>",
! "Reports how long it takes to run the specified command.");
! "command" ("/msg $S COMMAND <command>",
! "Shows the restrictions on who can use the named command (and how).");
! "modcmd" ("/msg $S MODCMD <command> <option> <newval> [additional option/value pairs..]",
! "Changes the named option(s) for the specified command. The command name may be prefixed with $bServiceNick.$b to specify another service's command (for example, $N.AUTH to refer to the auth command).",
! "Supported options are:",
! " FLAGS Comma-separated, +/- prefixed list of flags to add or remove.",
! " ACCESS Minimum OpServ or ChanServ access (interpreted as OpServ access if numeric)",
! " ACCOUNT_FLAGS Account flags to require or deny (for example, +R-S)",
! " TEMPLATE Command from which to inherit access restrictions",
! " WEIGHT How much the command counts against the anti-flood policer",
! "See the $bmodcmd flags$b entry for a list of supported flags.");
! "modcmd flags" ("The following flags are supported for commands:",
! " ACCEPTCHAN Treat a normal channel name (if specified) as the context for the command",
! " ACCEPTPLUSCHAN Accept modeless channel names as well as normal channel names",
! " AUTHED Require that the user be authed to use the command",
! " CHANNEL Require that an existing channel be given as the context",
! " CHANUSER Require that the user have $C access to the context",
! " DISABLED Command is disabled",
! " JOINABLE Require that the user have $C access to the channel, be in the channel, or be network staff to use the command",
! " KEEPBOUND Do not let the last instance of the command be removed",
! " LOGHOSTMASK Log the user's ident, hostname and IP (as well as nick and account name)",
! " NOLOG Do not log the command at all",
! " NETWORKHELPER Allow network helpers to use the command",
! " OPER Allow opers to use the command",
! " QUALIFIED Require $b/msg Service@$s$b addressing when using the command",
! ...
[truncated message content] |