Thread: [srvx-commits] CVS: services/src chanserv.c,1.246,1.247 common.h,1.74,1.75 dict-splay.c,1.7,1.8 glin
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-07-08 15:45:36
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv25756/src
Modified Files:
chanserv.c common.h dict-splay.c gline.c global.c helpserv.c
log.c nickserv.c opserv.c policer.c proto-bahamut.c
sockcheck.c
Log Message:
simple s/strcase/irccase/g
(except for sockcheck.c, which has s/strncase/ircncase/g)
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -C2 -r1.246 -r1.247
*** chanserv.c 8 Jul 2002 14:42:55 -0000 1.246
--- chanserv.c 8 Jul 2002 15:45:31 -0000 1.247
***************
*** 610,614 ****
for(level = USER_LEVEL_LOWEST; level <= USER_LEVEL_HIGHEST; level++)
{
! if(!strcasecmp(name, accessNames[level]))
{
return level;
--- 610,614 ----
for(level = USER_LEVEL_LOWEST; level <= USER_LEVEL_HIGHEST; level++)
{
! if(!irccasecmp(name, accessNames[level]))
{
return level;
***************
*** 1062,1066 ****
if(spc) *spc = 0;
else if(text[tlen-1] == '\001') text[tlen-1] = 0;
! if(!strcasecmp(text, "ACTION")) return;
/* Figure out the minimum level needed to CTCP the channel */
switch(channel->channel_info->options[optCTCPUsers]) {
--- 1062,1066 ----
if(spc) *spc = 0;
else if(text[tlen-1] == '\001') text[tlen-1] = 0;
! if(!irccasecmp(text, "ACTION")) return;
/* Figure out the minimum level needed to CTCP the channel */
switch(channel->channel_info->options[optCTCPUsers]) {
***************
*** 1342,1350 ****
value[0] = 0;
! if(!strcasecmp(property, "weight"))
{
snprintf(value, sizeof(value), "%.1f", cmd->weight);
}
! else if(!strcasecmp(property, "access"))
{
if(cmd->flags & CMD_DISABLED)
--- 1342,1350 ----
value[0] = 0;
! if(!irccasecmp(property, "weight"))
{
snprintf(value, sizeof(value), "%.1f", cmd->weight);
}
! else if(!irccasecmp(property, "access"))
{
if(cmd->flags & CMD_DISABLED)
***************
*** 1390,1394 ****
int count;
! if(!strcasecmp(variable, "index"))
{
exp.type = HF_TABLE;
--- 1390,1394 ----
int count;
! if(!irccasecmp(variable, "index"))
{
exp.type = HF_TABLE;
***************
*** 1402,1406 ****
return exp;
}
! else if(!strcasecmp(variable, "notes"))
{
dict_iterator_t it;
--- 1402,1406 ----
return exp;
}
! else if(!irccasecmp(variable, "notes"))
{
dict_iterator_t it;
***************
*** 1448,1452 ****
}
! if(!strcasecmp(start, "command"))
{
exp.value.str = strdup(chanserv_expand_command(start + strlen(start) + 1));
--- 1448,1452 ----
}
! if(!irccasecmp(start, "command"))
{
exp.value.str = strdup(chanserv_expand_command(start + strlen(start) + 1));
***************
*** 2130,2134 ****
if(!(handle = chanserv_get_handle_info(user, argv[new_channel+1]))) return 0;
! force = (argc > (new_channel+2)) && !strcasecmp(argv[new_channel+2], "force");
dnr = chanserv_is_dnr(chan_name, handle);
}
--- 2130,2134 ----
if(!(handle = chanserv_get_handle_info(user, argv[new_channel+1]))) return 0;
! force = (argc > (new_channel+2)) && !irccasecmp(argv[new_channel+2], "force");
dnr = chanserv_is_dnr(chan_name, handle);
}
***************
*** 2256,2260 ****
}
! force = (argc > 2) && !strcasecmp(argv[2], "force") && IsPrivileged(user);
if((target = GetChannel(argv[1])))
{
--- 2256,2260 ----
}
! force = (argc > 2) && !irccasecmp(argv[2], "force") && IsPrivileged(user);
if((target = GetChannel(argv[1])))
{
***************
*** 2742,2746 ****
for(access = USER_LEVEL_LOWEST; access <= USER_LEVEL_HIGHEST; access++)
{
! if(!strcasecmp(argv[2], accessNames[access]))
{
new_access = access;
--- 2742,2746 ----
for(access = USER_LEVEL_LOWEST; access <= USER_LEVEL_HIGHEST; access++)
{
! if(!irccasecmp(argv[2], accessNames[access]))
{
new_access = access;
***************
*** 3347,3351 ****
/* The ban is redundant; there is already a ban
with the same effect in place. */
! if(bData->expires && !strcasecmp(bData->mask, ban))
{
int reset = 0;
--- 3347,3351 ----
/* The ban is redundant; there is already a ban
with the same effect in place. */
! if(bData->expires && !irccasecmp(bData->mask, ban))
{
int reset = 0;
***************
*** 4190,4194 ****
else if (cData->topic[0])
{
! return strcasecmp(new_topic, cData->topic);
}
else return 0;
--- 4190,4194 ----
else if (cData->topic[0])
{
! return irccasecmp(new_topic, cData->topic);
}
else return 0;
***************
*** 4370,4374 ****
chanserv_notice(user, MSG_VERSION);
! if(argc > 1 && !strcasecmp(argv[1], "cvs"))
{
chanserv_notice(user, CSMSG_VERSION_ID);
--- 4370,4374 ----
chanserv_notice(user, MSG_VERSION);
! if(argc > 1 && !irccasecmp(argv[1], "cvs"))
{
chanserv_notice(user, CSMSG_VERSION_ID);
***************
*** 4712,4716 ****
REQUIRE_PARAMS(2);
! if(!strcasecmp(argv[1], chanserv->nick))
{
chanserv_notice(user, CSMSG_IS_CHANSERV);
--- 4712,4716 ----
REQUIRE_PARAMS(2);
! if(!irccasecmp(argv[1], chanserv->nick))
{
chanserv_notice(user, CSMSG_IS_CHANSERV);
***************
*** 5238,5242 ****
}
! if(!strcasecmp(argv[2], "flags"))
{
/* Make sure locked flags don't get turned on or off. */
--- 5238,5242 ----
}
! if(!irccasecmp(argv[2], "flags"))
{
/* Make sure locked flags don't get turned on or off. */
***************
*** 5250,5259 ****
chanserv_notice(user, CSMSG_COMMAND_FLAGS, command->flags);
}
! else if(!strcasecmp(argv[2], "weight"))
{
command->weight = atof(argv[3]);
chanserv_notice(user, CSMSG_COMMAND_WEIGHT, command->weight);
}
! else if(!strcasecmp(argv[2], "access"))
{
enum userLevel level;
--- 5250,5259 ----
chanserv_notice(user, CSMSG_COMMAND_FLAGS, command->flags);
}
! else if(!irccasecmp(argv[2], "weight"))
{
command->weight = atof(argv[3]);
chanserv_notice(user, CSMSG_COMMAND_WEIGHT, command->weight);
}
! else if(!irccasecmp(argv[2], "access"))
{
enum userLevel level;
***************
*** 5314,5341 ****
}
! if(!strcasecmp(argv[i], "name"))
{
search->name = argv[++i];
}
! else if(!strcasecmp(argv[i], "registrar"))
{
search->registrar = argv[++i];
}
! else if(!strcasecmp(argv[i], "unvisited"))
{
search->unvisited = ParseInterval(argv[++i]);
}
! else if(!strcasecmp(argv[i], "registered"))
{
search->registered = ParseInterval(argv[++i]);
}
! else if(!strcasecmp(argv[i], "flags"))
{
i++;
! if(!strcasecmp(argv[i], "nodelete"))
{
search->flags |= CHANNEL_NODELETE;
}
! else if(!strcasecmp(argv[i], "suspended"))
{
search->flags |= CHANNEL_SUSPENDED;
--- 5314,5341 ----
}
! if(!irccasecmp(argv[i], "name"))
{
search->name = argv[++i];
}
! else if(!irccasecmp(argv[i], "registrar"))
{
search->registrar = argv[++i];
}
! else if(!irccasecmp(argv[i], "unvisited"))
{
search->unvisited = ParseInterval(argv[++i]);
}
! else if(!irccasecmp(argv[i], "registered"))
{
search->registered = ParseInterval(argv[++i]);
}
! else if(!irccasecmp(argv[i], "flags"))
{
i++;
! if(!irccasecmp(argv[i], "nodelete"))
{
search->flags |= CHANNEL_NODELETE;
}
! else if(!irccasecmp(argv[i], "suspended"))
{
search->flags |= CHANNEL_SUSPENDED;
***************
*** 5347,5351 ****
}
}
! else if(!strcasecmp(argv[i], "limit"))
{
search->limit = strtoul(argv[++i], NULL, 10);
--- 5347,5351 ----
}
}
! else if(!irccasecmp(argv[i], "limit"))
{
search->limit = strtoul(argv[++i], NULL, 10);
***************
*** 5429,5437 ****
REQUIRE_PARAMS(3);
! if(!strcasecmp(argv[1], "count"))
{
action = search_count;
}
! else if(!strcasecmp(argv[1], "print"))
{
action = search_print;
--- 5429,5437 ----
REQUIRE_PARAMS(3);
! if(!irccasecmp(argv[1], "count"))
{
action = search_count;
}
! else if(!irccasecmp(argv[1], "print"))
{
action = search_print;
***************
*** 5992,5996 ****
REQUIRE_PARAMS(2);
curr_user = GetChannelAccess(cData, user->handle_info);
! force = IsPrivileged(user) && (argc > 2) && !strcasecmp(argv[2], "force");
if(!curr_user || (curr_user->access != ulOwner))
{
--- 5992,5996 ----
REQUIRE_PARAMS(2);
curr_user = GetChannelAccess(cData, user->handle_info);
! force = IsPrivileged(user) && (argc > 2) && !irccasecmp(argv[2], "force");
if(!curr_user || (curr_user->access != ulOwner))
{
***************
*** 6912,6924 ****
if((str = database_get_data(obj, KEY_NOTE_VISIBILITY, RECDB_QSTRING)))
{
! if(!strcasecmp(str, KEY_NOTE_VIS_PRIVILEGED))
{
ntype->visible_type = NOTE_VIS_PRIVILEGED;
}
! else if(!strcasecmp(str, KEY_NOTE_VIS_CHANNEL_USERS))
{
ntype->visible_type = NOTE_VIS_CHANNEL_USERS;
}
! else if(!strcasecmp(str, KEY_NOTE_VIS_ALL))
{
ntype->visible_type = NOTE_VIS_ALL;
--- 6912,6924 ----
if((str = database_get_data(obj, KEY_NOTE_VISIBILITY, RECDB_QSTRING)))
{
! if(!irccasecmp(str, KEY_NOTE_VIS_PRIVILEGED))
{
ntype->visible_type = NOTE_VIS_PRIVILEGED;
}
! else if(!irccasecmp(str, KEY_NOTE_VIS_CHANNEL_USERS))
{
ntype->visible_type = NOTE_VIS_CHANNEL_USERS;
}
! else if(!irccasecmp(str, KEY_NOTE_VIS_ALL))
{
ntype->visible_type = NOTE_VIS_ALL;
Index: common.h
===================================================================
RCS file: /cvsroot/srvx/services/src/common.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** common.h 8 Jul 2002 15:19:30 -0000 1.74
--- common.h 8 Jul 2002 15:45:32 -0000 1.75
***************
*** 210,215 ****
void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl);
! #define enabled_string(string) (!strcasecmp((string), "on") || !strcmp((string), "1") || !strcasecmp((string), "enabled"))
! #define disabled_string(string) (!strcasecmp((string), "off") || !strcmp((string), "0") || !strcasecmp((string), "disabled"))
#endif /* ifdef _COMMON_H_ */
--- 210,215 ----
void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl);
! #define enabled_string(string) (!irccasecmp((string), "on") || !strcmp((string), "1") || !irccasecmp((string), "enabled"))
! #define disabled_string(string) (!irccasecmp((string), "off") || !strcmp((string), "0") || !irccasecmp((string), "disabled"))
#endif /* ifdef _COMMON_H_ */
Index: dict-splay.c
===================================================================
RCS file: /cvsroot/srvx/services/src/dict-splay.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dict-splay.c 12 Jun 2002 18:21:05 -0000 1.7
--- dict-splay.c 8 Jul 2002 15:45:32 -0000 1.8
***************
*** 90,98 ****
while (1) {
! int res = strcasecmp(key, node->key);
if (!res) break;
if (res < 0) {
if (!node->l) break;
! res = strcasecmp(key, node->l->key);
if (res < 0) {
y = node->l;
--- 90,98 ----
while (1) {
! int res = irccasecmp(key, node->key);
if (!res) break;
if (res < 0) {
if (!node->l) break;
! res = irccasecmp(key, node->l->key);
if (res < 0) {
y = node->l;
***************
*** 107,111 ****
} else { /* res > 0 */
if (!node->r) break;
! res = strcasecmp(key, node->r->key);
if (res > 0) {
y = node->r;
--- 107,111 ----
} else { /* res > 0 */
if (!node->r) break;
! res = irccasecmp(key, node->r->key);
if (res > 0) {
y = node->r;
***************
*** 154,158 ****
int res;
dict->root = dict_splay(dict->root, key);
! res = strcasecmp(key, dict->root->key);
if (res < 0) {
/* insert just "before" current root */
--- 154,158 ----
int res;
dict->root = dict_splay(dict->root, key);
! res = irccasecmp(key, dict->root->key);
if (res < 0) {
/* insert just "before" current root */
***************
*** 161,165 ****
dict->root->l = NULL;
if (dict->root->prev) dict->root->prev->next = new_node;
! if (strcasecmp(key, dict->first->key) < 0) dict->first = new_node;
new_node->prev = dict->root->prev;
new_node->next = dict->root;
--- 161,165 ----
dict->root->l = NULL;
if (dict->root->prev) dict->root->prev->next = new_node;
! if (irccasecmp(key, dict->first->key) < 0) dict->first = new_node;
new_node->prev = dict->root->prev;
new_node->next = dict->root;
***************
*** 172,176 ****
dict->root->r = NULL;
if (dict->root->next) dict->root->next->prev = new_node;
! if (strcasecmp(key, dict->last->key) > 0) dict->last = new_node;
new_node->next = dict->root->next;
new_node->prev = dict->root;
--- 172,176 ----
dict->root->r = NULL;
if (dict->root->next) dict->root->next->prev = new_node;
! if (irccasecmp(key, dict->last->key) > 0) dict->last = new_node;
new_node->next = dict->root->next;
new_node->prev = dict->root;
***************
*** 204,208 ****
{
dict->root = dict_splay(dict->root, key);
! if (dict->root && !strcasecmp(key, dict->root->key)) {
struct dict_node *new_root;
if (!dict->root->l) {
--- 204,208 ----
{
dict->root = dict_splay(dict->root, key);
! if (dict->root && !irccasecmp(key, dict->root->key)) {
struct dict_node *new_root;
if (!dict->root->l) {
***************
*** 243,247 ****
}
dict->root = dict_splay(dict->root, key);
! was_found = !strcasecmp(key, dict->root->key);
if (found) *found = was_found;
return was_found ? dict->root->data : NULL;
--- 243,247 ----
}
dict->root = dict_splay(dict->root, key);
! was_found = !irccasecmp(key, dict->root->key);
if (found) *found = was_found;
return was_found ? dict->root->data : NULL;
***************
*** 278,282 ****
if (node->l) {
if (dict_sanity_check_node(node->l, dss)) return 1;
! if (strcasecmp(node->l->key, node->key) >= 0) {
snprintf(dss->error, sizeof(dss->error), "Node %p's left child's key '%s' >= its key '%s'", node, node->l->key, node->key);
return 1;
--- 278,282 ----
if (node->l) {
if (dict_sanity_check_node(node->l, dss)) return 1;
! if (irccasecmp(node->l->key, node->key) >= 0) {
snprintf(dss->error, sizeof(dss->error), "Node %p's left child's key '%s' >= its key '%s'", node, node->l->key, node->key);
return 1;
***************
*** 285,289 ****
if (node->r) {
if (dict_sanity_check_node(node->r, dss)) return 1;
! if (strcasecmp(node->key, node->r->key) >= 0) {
snprintf(dss->error, sizeof(dss->error), "Node %p's right child's key '%s' <= its key '%s'", node, node->r->key, node->key);
return 1;
--- 285,289 ----
if (node->r) {
if (dict_sanity_check_node(node->r, dss)) return 1;
! if (irccasecmp(node->key, node->r->key) >= 0) {
snprintf(dss->error, sizeof(dss->error), "Node %p's right child's key '%s' <= its key '%s'", node, node->r->key, node->key);
return 1;
Index: gline.c
===================================================================
RCS file: /cvsroot/srvx/services/src/gline.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** gline.c 27 Jun 2002 01:28:33 -0000 1.25
--- gline.c 8 Jul 2002 15:45:32 -0000 1.26
***************
*** 71,75 ****
struct gline *ge = data;
(void)key;
! return !strcasecmp(ge->target, extra);
}
--- 71,75 ----
struct gline *ge = data;
(void)key;
! return !irccasecmp(ge->target, extra);
}
***************
*** 80,84 ****
(void)key;
! if (!strcasecmp(ge->target, extra)) {
free_gline(ge);
return 1;
--- 80,84 ----
(void)key;
! if (!irccasecmp(ge->target, extra)) {
free_gline(ge);
return 1;
***************
*** 295,304 ****
goto fail;
}
! if (!strcasecmp(argv[i], "mask") || !strcasecmp(argv[i], "host")) {
! if (!strcasecmp(argv[++i], "exact")) {
discrim->target_mask_type = EXACT;
! } else if (!strcasecmp(argv[i], "subset")) {
discrim->target_mask_type = SUBSET;
! } else if (!strcasecmp(argv[i], "superset")) {
discrim->target_mask_type = SUPERSET;
} else {
--- 295,304 ----
goto fail;
}
! if (!irccasecmp(argv[i], "mask") || !irccasecmp(argv[i], "host")) {
! if (!irccasecmp(argv[++i], "exact")) {
discrim->target_mask_type = EXACT;
! } else if (!irccasecmp(argv[i], "subset")) {
discrim->target_mask_type = SUBSET;
! } else if (!irccasecmp(argv[i], "superset")) {
discrim->target_mask_type = SUPERSET;
} else {
***************
*** 315,327 ****
}
discrim->target_mask = argv[i];
! } else if (!strcasecmp(argv[i], "limit")) {
discrim->limit = strtoul(argv[++i], NULL, 0);
! } else if (!strcasecmp(argv[i], "reason")) {
discrim->reason_mask = argv[++i];
! } else if (!strcasecmp(argv[i], "issuer")) {
discrim->issuer_mask = argv[++i];
! } else if (!strcasecmp(argv[i], "after")) {
discrim->min_expire = now + ParseInterval(argv[++i]);
! } else if (!strcasecmp(argv[i], "before")) {
discrim->max_issued = now - ParseInterval(argv[++i]);
} else {
--- 315,327 ----
}
discrim->target_mask = argv[i];
! } else if (!irccasecmp(argv[i], "limit")) {
discrim->limit = strtoul(argv[++i], NULL, 0);
! } else if (!irccasecmp(argv[i], "reason")) {
discrim->reason_mask = argv[++i];
! } else if (!irccasecmp(argv[i], "issuer")) {
discrim->issuer_mask = argv[++i];
! } else if (!irccasecmp(argv[i], "after")) {
discrim->min_expire = now + ParseInterval(argv[++i]);
! } else if (!irccasecmp(argv[i], "before")) {
discrim->max_issued = now - ParseInterval(argv[++i]);
} else {
***************
*** 352,356 ****
&& !match_ircglobs(discrim->target_mask, gline->target))
|| ((discrim->target_mask_type == EXACT)
! && strcasecmp(discrim->target_mask, gline->target))
|| ((discrim->target_mask_type == SUPERSET)
&& !match_ircglobs(gline->target, discrim->target_mask))))
--- 352,356 ----
&& !match_ircglobs(discrim->target_mask, gline->target))
|| ((discrim->target_mask_type == EXACT)
! && irccasecmp(discrim->target_mask, gline->target))
|| ((discrim->target_mask_type == SUPERSET)
&& !match_ircglobs(gline->target, discrim->target_mask))))
Index: global.c
===================================================================
RCS file: /cvsroot/srvx/services/src/global.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** global.c 4 Jul 2002 02:47:30 -0000 1.44
--- global.c 8 Jul 2002 15:45:32 -0000 1.45
***************
*** 258,262 ****
}
! if(!strcasecmp(argv[i], "text"))
{
i++;
--- 258,262 ----
}
! if(!irccasecmp(argv[i], "text"))
{
i++;
***************
*** 264,286 ****
text = argv[i];
break;
! } else if (!strcasecmp(argv[i], "sourceless")) {
i++;
flags |= MESSAGE_OPTION_SOURCELESS;
! } else if (!strcasecmp(argv[i], "target")) {
i++;
! if(!strcasecmp(argv[i], "all")) {
flags |= MESSAGE_RECIPIENT_ALL;
! } else if(!strcasecmp(argv[i], "users")) {
flags |= MESSAGE_RECIPIENT_LUSERS;
! } else if(!strcasecmp(argv[i], "helpers")) {
flags |= MESSAGE_RECIPIENT_HELPERS;
! } else if(!strcasecmp(argv[i], "opers")) {
flags |= MESSAGE_RECIPIENT_OPERS;
! } else if(!strcasecmp(argv[i], "staff") || !strcasecmp(argv[i], "privileged")) {
flags |= MESSAGE_RECIPIENT_STAFF;
! } else if(!strcasecmp(argv[i], "channels")) {
flags |= MESSAGE_RECIPIENT_CHANNELS;
! } else if(!strcasecmp(argv[i], "announcement") || !strcasecmp(argv[i], "announce")) {
flags |= MESSAGE_RECIPIENT_ANNOUNCE;
} else {
--- 264,286 ----
text = argv[i];
break;
! } else if (!irccasecmp(argv[i], "sourceless")) {
i++;
flags |= MESSAGE_OPTION_SOURCELESS;
! } else if (!irccasecmp(argv[i], "target")) {
i++;
! if(!irccasecmp(argv[i], "all")) {
flags |= MESSAGE_RECIPIENT_ALL;
! } else if(!irccasecmp(argv[i], "users")) {
flags |= MESSAGE_RECIPIENT_LUSERS;
! } else if(!irccasecmp(argv[i], "helpers")) {
flags |= MESSAGE_RECIPIENT_HELPERS;
! } else if(!irccasecmp(argv[i], "opers")) {
flags |= MESSAGE_RECIPIENT_OPERS;
! } else if(!irccasecmp(argv[i], "staff") || !irccasecmp(argv[i], "privileged")) {
flags |= MESSAGE_RECIPIENT_STAFF;
! } else if(!irccasecmp(argv[i], "channels")) {
flags |= MESSAGE_RECIPIENT_CHANNELS;
! } else if(!irccasecmp(argv[i], "announcement") || !irccasecmp(argv[i], "announce")) {
flags |= MESSAGE_RECIPIENT_ANNOUNCE;
} else {
***************
*** 288,292 ****
return NULL;
}
! } else if (strcasecmp(argv[i], "duration") == 0) {
duration = ParseInterval(argv[++i]);
} else {
--- 288,292 ----
return NULL;
}
! } else if (irccasecmp(argv[i], "duration") == 0) {
duration = ParseInterval(argv[++i]);
} else {
***************
*** 490,506 ****
}
! if(!strcasecmp(argv[1], "all")) {
target = MESSAGE_RECIPIENT_ALL;
! } else if(!strcasecmp(argv[1], "users")) {
target = MESSAGE_RECIPIENT_LUSERS;
! } else if(!strcasecmp(argv[1], "helpers")) {
target = MESSAGE_RECIPIENT_HELPERS;
! } else if(!strcasecmp(argv[1], "opers")) {
target = MESSAGE_RECIPIENT_OPERS;
! } else if(!strcasecmp(argv[1], "staff") || !strcasecmp(argv[1], "privileged")) {
target |= MESSAGE_RECIPIENT_HELPERS | MESSAGE_RECIPIENT_OPERS;
! } else if(!strcasecmp(argv[1], "announcement") || !strcasecmp(argv[1], "announce")) {
target |= MESSAGE_RECIPIENT_ANNOUNCE;
! } else if(!strcasecmp(argv[1], "channels")) {
target = MESSAGE_RECIPIENT_CHANNELS;
} else {
--- 490,506 ----
}
! if(!irccasecmp(argv[1], "all")) {
target = MESSAGE_RECIPIENT_ALL;
! } else if(!irccasecmp(argv[1], "users")) {
target = MESSAGE_RECIPIENT_LUSERS;
! } else if(!irccasecmp(argv[1], "helpers")) {
target = MESSAGE_RECIPIENT_HELPERS;
! } else if(!irccasecmp(argv[1], "opers")) {
target = MESSAGE_RECIPIENT_OPERS;
! } else if(!irccasecmp(argv[1], "staff") || !irccasecmp(argv[1], "privileged")) {
target |= MESSAGE_RECIPIENT_HELPERS | MESSAGE_RECIPIENT_OPERS;
! } else if(!irccasecmp(argv[1], "announcement") || !irccasecmp(argv[1], "announce")) {
target |= MESSAGE_RECIPIENT_ANNOUNCE;
! } else if(!irccasecmp(argv[1], "channels")) {
target = MESSAGE_RECIPIENT_CHANNELS;
} else {
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** helpserv.c 3 Jul 2002 23:19:18 -0000 1.18
--- helpserv.c 8 Jul 2002 15:45:32 -0000 1.19
***************
*** 560,564 ****
enum helpserv_level nn;
for (nn=HlNone; nn<=HlOper; nn++) {
! if (!strcasecmp(msg, helpserv_level_names[nn])) return nn;
}
log(HS_LOG, LOG_ERROR, "helpserv_str2level received invalid level %s\n", msg);
--- 560,564 ----
enum helpserv_level nn;
for (nn=HlNone; nn<=HlOper; nn++) {
! if (!irccasecmp(msg, helpserv_level_names[nn])) return nn;
}
log(HS_LOG, LOG_ERROR, "helpserv_str2level received invalid level %s\n", msg);
***************
*** 857,861 ****
helpserv_notice(user, MSG_VERSION);
! if ((argc > 1 && !strcasecmp(argv[1], "cvs")) || from_opserv) {
helpserv_notice(user, "%s", HSMSG_VERSION_ID);
}
--- 857,861 ----
helpserv_notice(user, MSG_VERSION);
! if ((argc > 1 && !irccasecmp(argv[1], "cvs")) || from_opserv) {
helpserv_notice(user, "%s", HSMSG_VERSION_ID);
}
***************
*** 894,898 ****
struct helpfile_expansion exp;
! if (!strcasecmp(variable, "index")) {
exp.type = HF_TABLE;
exp.value.table.length = 1;
--- 894,898 ----
struct helpfile_expansion exp;
! if (!irccasecmp(variable, "index")) {
exp.type = HF_TABLE;
exp.value.table.length = 1;
***************
*** 1311,1323 ****
struct helpserv_request *req;
! if ((argc < 2) || !strcasecmp(argv[1], "unassigned")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all unassigned");
for (req = hs->unhandled, total=0; req; req = req->next_unhandled, total++);
searchtype = 1; /* Unassigned */
! } else if (!strcasecmp(argv[1], "assigned")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all assigned");
for (req = hs->unhandled, total=dict_size(hs->requests); req; req = req->next_unhandled, total--);
searchtype = 2; /* Assigned */
! } else if (!strcasecmp(argv[1], "me")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "your");
for (total = 0, it = dict_first(hs->requests); it; it = iter_next(it)) {
--- 1311,1323 ----
struct helpserv_request *req;
! if ((argc < 2) || !irccasecmp(argv[1], "unassigned")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all unassigned");
for (req = hs->unhandled, total=0; req; req = req->next_unhandled, total++);
searchtype = 1; /* Unassigned */
! } else if (!irccasecmp(argv[1], "assigned")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all assigned");
for (req = hs->unhandled, total=dict_size(hs->requests); req; req = req->next_unhandled, total--);
searchtype = 2; /* Assigned */
! } else if (!irccasecmp(argv[1], "me")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "your");
for (total = 0, it = dict_first(hs->requests); it; it = iter_next(it)) {
***************
*** 1326,1330 ****
}
searchtype = 4;
! } else if (!strcasecmp(argv[1], "all")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all");
total = dict_size(hs->requests);
--- 1326,1330 ----
}
searchtype = 4;
! } else if (!irccasecmp(argv[1], "all")) {
helpserv_notice(user, HSMSG_REQ_LIST_TOP, "all");
total = dict_size(hs->requests);
***************
*** 1717,1721 ****
if (argc > 1) {
! if (!strcasecmp(argv[1], "NOTICE")) {
use_privmsg = 0;
}
--- 1717,1721 ----
if (argc > 1) {
! if (!irccasecmp(argv[1], "NOTICE")) {
use_privmsg = 0;
}
***************
*** 1810,1814 ****
strcpy(oldchan, hs->helpchan->name);
! if (!strcasecmp(oldchan, newchan)) {
helpserv_notice(user, HSMSG_MOVE_SAME_CHANNEL, hs->helpserv->nick);
return 0;
--- 1810,1814 ----
strcpy(oldchan, hs->helpchan->name);
! if (!irccasecmp(oldchan, newchan)) {
helpserv_notice(user, HSMSG_MOVE_SAME_CHANNEL, hs->helpserv->nick);
return 0;
***************
*** 2333,2337 ****
enum page_type type;
for (type=0; type<PAGE_COUNT; type++) {
! if (!strcasecmp(page_type_names[type], name)) return type;
}
return PAGE_COUNT;
--- 2333,2337 ----
enum page_type type;
for (type=0; type<PAGE_COUNT; type++) {
! if (!irccasecmp(page_type_names[type], name)) return type;
}
return PAGE_COUNT;
***************
*** 2464,2468 ****
enum persistence_length pers;
for (pers=0; pers<PERSIST_COUNT; pers++) {
! if (!strcasecmp(name, persistence_length_names[pers])) return pers;
}
return PERSIST_COUNT;
--- 2464,2468 ----
enum persistence_length pers;
for (pers=0; pers<PERSIST_COUNT; pers++) {
! if (!irccasecmp(name, persistence_length_names[pers])) return pers;
}
return PERSIST_COUNT;
***************
*** 2496,2500 ****
enum notification_type notify;
for (notify=0; notify<NOTIFY_COUNT; notify++) {
! if (!strcasecmp(name, notification_type_names[notify])) return notify;
}
return NOTIFY_COUNT;
--- 2496,2500 ----
enum notification_type notify;
for (notify=0; notify<NOTIFY_COUNT; notify++) {
! if (!irccasecmp(name, notification_type_names[notify])) return notify;
}
return NOTIFY_COUNT;
Index: log.c
===================================================================
RCS file: /cvsroot/srvx/services/src/log.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** log.c 6 May 2002 23:33:12 -0000 1.39
--- log.c 8 Jul 2002 15:45:32 -0000 1.40
***************
*** 162,184 ****
find_log_type(const char *logname)
{
! if (!strcasecmp(logn...
[truncated message content] |