[srvx-commits] CVS: services/src chanserv.c,1.291,1.292 chanserv.h,1.44,1.45
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-10-21 02:27:52
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv12844/src
Modified Files:
chanserv.c chanserv.h
Log Message:
Replace the !togop command with !uset NoAutoOp, and introduce a new feature: AutoInvite, also controlled by the uset command.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.291
retrieving revision 1.292
diff -C2 -r1.291 -r1.292
*** chanserv.c 16 Oct 2002 03:34:30 -0000 1.291
--- chanserv.c 21 Oct 2002 02:27:49 -0000 1.292
***************
*** 207,214 ****
/* Channel management */
#define CSMSG_CHANNEL_OPENED "$b%s$b has been opened."
- #define CSMSG_AUTOOP_OFF "I will no longer automatically op you in $b%s$b."
- #define CSMSG_AUTOVOICE_OFF "I will no longer automatically voice you in $b%s$b."
- #define CSMSG_AUTOOP_ON "I $bwill$b automatically op you in $b%s$b."
- #define CSMSG_AUTOVOICE_ON "I $bwill$b automatically voice you in $b%s$b."
#define CSMSG_CLEARED_INFO_LINE "Your info line has been cleared."
#define CSMSG_SET_INFO_LINE "Your info line has been set to '%s'."
--- 207,210 ----
***************
*** 358,362 ****
/* Channel configuration */
! #define CSMSG_INVALID_OPTION "$b%s$b is not a valid option."
#define CSMSG_CHANNEL_OPTIONS "Channel Options:"
--- 354,358 ----
/* Channel configuration */
! #define CSMSG_INVALID_OPTION "$b%s$b is not a valid %s option."
#define CSMSG_CHANNEL_OPTIONS "Channel Options:"
***************
*** 374,377 ****
--- 370,376 ----
#define CSMSG_BAD_NUMBER "$b%s$b is an invalid number. Please use a number greater than 1 with this command."
+ /* User settings */
+ #define CSMSG_USER_OPTIONS "User Options:"
+
/* eject_user and unban_user flags */
#define ACTION_KICK 0x0001
***************
*** 3311,3354 ****
}
- static CHANSERV_FUNC(cmd_togop)
- {
- struct userData *uData;
-
- uData = GetChannelAccess(channel->channel_info, user->handle_info);
- if(!uData)
- {
- chanserv_notice(user, CSMSG_NOT_USER, channel->name);
- return 0;
- }
-
- if(argc > 1)
- {
- if(enabled_string(argv[1]))
- {
- uData->flags &= ~USER_AUTO_OP;
- }
- else if(disabled_string(argv[1]))
- {
- uData->flags |= USER_AUTO_OP;
- }
- else
- {
- chanserv_notice(user, MSG_INVALID_BINARY, argv[1]);
- return 0;
- }
- }
- else
- {
- uData->flags ^= USER_AUTO_OP;
- }
-
- if (IsUserAutoOp(uData)) {
- chanserv_notice(user, ((uData->access > ulPeon) ? CSMSG_AUTOOP_ON : CSMSG_AUTOVOICE_ON), channel->name);
- } else {
- chanserv_notice(user, ((uData->access > ulPeon) ? CSMSG_AUTOOP_OFF : CSMSG_AUTOVOICE_OFF), channel->name);
- }
- return 1;
- }
-
static CHANSERV_FUNC(cmd_access)
{
--- 3310,3313 ----
***************
*** 4982,4991 ****
}
! #define OPTION_FUNC(NAME) MODCMD_FUNC(NAME)
! #define BINARY_OPTION(args...) return binary_option(args, CSFUNC_ARGS);
! #define MULTIPLE_OPTION(args...) return multiple_option(args, values, ArrayLength(values), CSFUNC_ARGS);
! static OPTION_FUNC(opt_defaulttopic)
{
if(argc > 1)
--- 4941,4950 ----
}
! #define CHANNEL_OPTION_FUNC(NAME) MODCMD_FUNC(chan_##NAME)
! #define CHANNEL_BINARY_OPTION(args...) return channel_binary_option(args, CSFUNC_ARGS);
! #define CHANNEL_MULTIPLE_OPTION(args...) return channel_multiple_option(args, values, ArrayLength(values), CSFUNC_ARGS);
! static CHANNEL_OPTION_FUNC(opt_defaulttopic)
{
if(argc > 1)
***************
*** 5021,5025 ****
}
! static OPTION_FUNC(opt_topicmask)
{
if(argc > 1)
--- 4980,4984 ----
}
! static CHANNEL_OPTION_FUNC(opt_topicmask)
{
if(argc > 1)
***************
*** 5091,5095 ****
}
! static OPTION_FUNC(opt_greeting)
{
opt_greeting_common(user, channel, argc, argv, "Greeting ", &channel->channel_info->greeting);
--- 5050,5054 ----
}
! static CHANNEL_OPTION_FUNC(opt_greeting)
{
opt_greeting_common(user, channel, argc, argv, "Greeting ", &channel->channel_info->greeting);
***************
*** 5097,5101 ****
}
! static OPTION_FUNC(opt_usergreeting)
{
opt_greeting_common(user, channel, argc, argv, "UserGreeting ", &channel->channel_info->user_greeting);
--- 5056,5060 ----
}
! static CHANNEL_OPTION_FUNC(opt_usergreeting)
{
opt_greeting_common(user, channel, argc, argv, "UserGreeting ", &channel->channel_info->user_greeting);
***************
*** 5103,5107 ****
}
! static OPTION_FUNC(opt_modes)
{
char modes[MODELEN];
--- 5062,5066 ----
}
! static CHANNEL_OPTION_FUNC(opt_modes)
{
char modes[MODELEN];
***************
*** 5149,5153 ****
static int
! binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
--- 5108,5112 ----
static int
! channel_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
***************
*** 5185,5189 ****
static int
! multiple_option(char *name, char *description, enum opt option, int check_level, struct valueData *values, int count, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
--- 5144,5148 ----
static int
! channel_multiple_option(char *name, char *description, enum opt option, int check_level, struct valueData *values, int count, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
{
struct chanData *cData = channel->channel_info;
***************
*** 5231,5235 ****
}
! static OPTION_FUNC(opt_nodelete)
{
if((argc > 1) && !IsOper(user))
--- 5190,5194 ----
}
! static CHANNEL_OPTION_FUNC(opt_nodelete)
{
if((argc > 1) && !IsOper(user))
***************
*** 5239,5261 ****
}
! BINARY_OPTION("NoDelete ", CHANNEL_NODELETE);
}
! static OPTION_FUNC(opt_userinfo)
{
! BINARY_OPTION("UserInfo ", CHANNEL_INFO_LINES);
}
! static OPTION_FUNC(opt_voice)
{
! BINARY_OPTION("Voice ", CHANNEL_VOICE_ALL);
}
! static OPTION_FUNC(opt_dynlimit)
{
! BINARY_OPTION("DynLimit ", CHANNEL_DYNAMIC_LIMIT);
}
! static OPTION_FUNC(opt_topicsnarf)
{
if((argc > 0) && !check_user_level(user, channel, channel->channel_info->options[optEnfTopic], 1, 0))
--- 5198,5220 ----
}
! CHANNEL_BINARY_OPTION("NoDelete ", CHANNEL_NODELETE);
}
! static CHANNEL_OPTION_FUNC(opt_userinfo)
{
! CHANNEL_BINARY_OPTION("UserInfo ", CHANNEL_INFO_LINES);
}
! static CHANNEL_OPTION_FUNC(opt_voice)
{
! CHANNEL_BINARY_OPTION("Voice ", CHANNEL_VOICE_ALL);
}
! static CHANNEL_OPTION_FUNC(opt_dynlimit)
{
! CHANNEL_BINARY_OPTION("DynLimit ", CHANNEL_DYNAMIC_LIMIT);
}
! static CHANNEL_OPTION_FUNC(opt_topicsnarf)
{
if((argc > 0) && !check_user_level(user, channel, channel->channel_info->options[optEnfTopic], 1, 0))
***************
*** 5264,5276 ****
return 0;
}
! BINARY_OPTION("TopicSnarf ", CHANNEL_TOPIC_SNARF);
}
! static OPTION_FUNC(opt_peoninvite)
{
! BINARY_OPTION("PeonInvite ", CHANNEL_PEON_INVITE);
}
! static OPTION_FUNC(opt_strictop)
{
struct valueData values[] =
--- 5223,5235 ----
return 0;
}
! CHANNEL_BINARY_OPTION("TopicSnarf ", CHANNEL_TOPIC_SNARF);
}
! static CHANNEL_OPTION_FUNC(opt_peoninvite)
{
! CHANNEL_BINARY_OPTION("PeonInvite ", CHANNEL_PEON_INVITE);
}
! static CHANNEL_OPTION_FUNC(opt_strictop)
{
struct valueData values[] =
***************
*** 5284,5291 ****
};
! MULTIPLE_OPTION("StrictOp ", "strict op", optStrictOp, optStrictOp);
}
! static OPTION_FUNC(opt_autoop)
{
struct valueData values[] =
--- 5243,5250 ----
};
! CHANNEL_MULTIPLE_OPTION("StrictOp ", "strict op", optStrictOp, optStrictOp);
}
! static CHANNEL_OPTION_FUNC(opt_autoop)
{
struct valueData values[] =
***************
*** 5299,5306 ****
};
! MULTIPLE_OPTION("AutoOp ", "auto op", optAutoOp, optAutoOp);
}
! static OPTION_FUNC(opt_protect)
{
struct valueData values[] =
--- 5258,5265 ----
};
! CHANNEL_MULTIPLE_OPTION("AutoOp ", "auto op", optAutoOp, optAutoOp);
}
! static CHANNEL_OPTION_FUNC(opt_protect)
{
struct valueData values[] =
***************
*** 5312,5319 ****
};
! MULTIPLE_OPTION("Protect ", "user protection", optProtect, -1);
}
! static OPTION_FUNC(opt_enfmodes)
{
struct valueData values[] =
--- 5271,5278 ----
};
! CHANNEL_MULTIPLE_OPTION("Protect ", "user protection", optProtect, -1);
}
! static CHANNEL_OPTION_FUNC(opt_enfmodes)
{
struct valueData values[] =
***************
*** 5327,5334 ****
};
! MULTIPLE_OPTION("EnfModes ", "mode lock enforcement", optEnfModes, optEnfModes);
}
! static OPTION_FUNC(opt_enftopic)
{
struct valueData values[] =
--- 5286,5293 ----
};
! CHANNEL_MULTIPLE_OPTION("EnfModes ", "mode lock enforcement", optEnfModes, optEnfModes);
}
! static CHANNEL_OPTION_FUNC(opt_enftopic)
{
struct valueData values[] =
***************
*** 5342,5349 ****
};
! MULTIPLE_OPTION("EnfTopic ", "topic lock enforcement", optEnfTopic, optEnfTopic);
}
! static OPTION_FUNC(opt_pubcmd)
{
struct valueData values[] =
--- 5301,5308 ----
};
! CHANNEL_MULTIPLE_OPTION("EnfTopic ", "topic lock enforcement", optEnfTopic, optEnfTopic);
}
! static CHANNEL_OPTION_FUNC(opt_pubcmd)
{
struct valueData values[] =
***************
*** 5358,5365 ****
};
! MULTIPLE_OPTION("PubCmd ", "public command", optPubCmd, optPubCmd);
}
! static OPTION_FUNC(opt_toys)
{
struct valueData values[] =
--- 5317,5324 ----
};
! CHANNEL_MULTIPLE_OPTION("PubCmd ", "public command", optPubCmd, optPubCmd);
}
! static CHANNEL_OPTION_FUNC(opt_toys)
{
struct valueData values[] =
***************
*** 5370,5377 ****
};
! MULTIPLE_OPTION("Toys ", "toy control", optToys, -1);
}
! static OPTION_FUNC(opt_setters)
{
struct valueData values[] =
--- 5329,5336 ----
};
! CHANNEL_MULTIPLE_OPTION("Toys ", "toy control", optToys, -1);
}
! static CHANNEL_OPTION_FUNC(opt_setters)
{
struct valueData values[] =
***************
*** 5382,5389 ****
};
! MULTIPLE_OPTION("Setters ", "setters", optSetters, optSetters);
}
! static OPTION_FUNC(opt_ctcpusers)
{
struct valueData values[] =
--- 5341,5348 ----
};
! CHANNEL_MULTIPLE_OPTION("Setters ", "setters", optSetters, optSetters);
}
! static CHANNEL_OPTION_FUNC(opt_ctcpusers)
{
struct valueData values[] =
***************
*** 5398,5405 ****
};
! MULTIPLE_OPTION("CTCPUsers ", "CTCP allowed to", optCTCPUsers, optCTCPUsers);
}
! static OPTION_FUNC(opt_ctcpreaction)
{
struct valueData values[] =
--- 5357,5364 ----
};
! CHANNEL_MULTIPLE_OPTION("CTCPUsers ", "CTCP allowed to", optCTCPUsers, optCTCPUsers);
}
! static CHANNEL_OPTION_FUNC(opt_ctcpreaction)
{
struct valueData values[] =
***************
*** 5411,5418 ****
};
! MULTIPLE_OPTION("CTCPReaction ", "CTCP reaction", optCTCPReaction, -1);
}
! static OPTION_FUNC(opt_topicrefresh)
{
struct valueData values[] =
--- 5370,5377 ----
};
! CHANNEL_MULTIPLE_OPTION("CTCPReaction ", "CTCP reaction", optCTCPReaction, -1);
}
! static CHANNEL_OPTION_FUNC(opt_topicrefresh)
{
struct valueData values[] =
***************
*** 5425,5429 ****
};
! MULTIPLE_OPTION("TopicRefresh ", "topic refresh", optTopicRefresh, -1);
}
--- 5384,5388 ----
};
! CHANNEL_MULTIPLE_OPTION("TopicRefresh ", "topic refresh", optTopicRefresh, -1);
}
***************
*** 5473,5477 ****
if(!subcmd)
{
! reply(CSMSG_INVALID_OPTION, argv[1]);
return 0;
}
--- 5432,5436 ----
if(!subcmd)
{
! reply(CSMSG_INVALID_OPTION, argv[1], argv[0]);
return 0;
}
***************
*** 5486,5489 ****
--- 5445,5570 ----
}
+ #define USER_OPTION_FUNC(NAME) MODCMD_FUNC(user_##NAME)
+
+ #define USER_BINARY_OPTION(args...) return user_binary_option(args, CSFUNC_ARGS);
+
+ static int
+ user_binary_option(char *name, unsigned long mask, struct userNode *user, struct chanNode *channel, int argc, unsigned char *argv[], struct svccmd *cmd)
+ {
+ struct userData *uData;
+ int value;
+ (void)cmd;
+
+ uData = GetChannelAccess(channel->channel_info, user->handle_info);
+ if(!uData)
+ {
+ chanserv_notice(user, CSMSG_NOT_USER, channel->name);
+ return 0;
+ }
+
+ if(argc > 1)
+ {
+ /* Set flag according to value. */
+ if(enabled_string(argv[1]))
+ {
+ uData->flags |= mask;
+ value = 1;
+ }
+ else if(disabled_string(argv[1]))
+ {
+ uData->flags &= ~mask;
+ value = 0;
+ }
+ else
+ {
+ chanserv_notice(user, MSG_INVALID_BINARY, argv[1]);
+ return 0;
+ }
+ }
+ else
+ {
+ /* Find current option value. */
+ value = (uData->flags & mask) ? 1 : 0;
+ }
+
+ chanserv_notice(user, CSMSG_STRING_VALUE, name, value ? "Enabled." : "Disabled.");
+ return 1;
+ }
+
+ static USER_OPTION_FUNC(opt_noautoop)
+ {
+ struct userData *uData;
+
+ uData = GetChannelAccess(channel->channel_info, user->handle_info);
+ if(!uData)
+ {
+ chanserv_notice(user, CSMSG_NOT_USER, channel->name);
+ return 0;
+ }
+ USER_BINARY_OPTION(uData->access > ulPeon ? "NoAutoOp " : "NoAutoVoice ", USER_AUTO_OP);
+ }
+
+ static USER_OPTION_FUNC(opt_autoinvite)
+ {
+ USER_BINARY_OPTION("AutoInvite ", USER_AUTO_INVITE);
+ }
+
+ struct svccmd_list uset_shows_list;
+
+ static CHANSERV_FUNC(cmd_uset)
+ {
+ struct svccmd *subcmd;
+ char buf[MAXLEN];
+ unsigned int ii;
+
+ /* Check if we need to (re-)initialize uset_shows_list. */
+ if(!uset_shows_list.used)
+ {
+ char *options[] =
+ {
+ "NoAutoOp", "AutoInvite"
+ };
+
+ if(!uset_shows_list.size)
+ {
+ uset_shows_list.size = ArrayLength(options);
+ uset_shows_list.list = calloc(uset_shows_list.size, sizeof(uset_shows_list.list[0]));
+ }
+ for(ii = 0; ii < ArrayLength(options); ii++)
+ {
+ const char *name = options[ii];
+ sprintf(buf, "%s %s", argv[0], name);
+ subcmd = dict_find(cmd->parent->commands, buf, NULL);
+ if(!subcmd)
+ {
+ log(CS_LOG, LOG_ERROR, "Unable to find uset option %s.\n", name);
+ continue;
+ }
+ svccmd_list_append(&uset_shows_list, subcmd);
+ }
+ }
+
+ if(argc < 2)
+ {
+ /* Do this so options are presented in a consistent order. */
+ chanserv_notice(user, CSMSG_USER_OPTIONS);
+ for(ii = 0; ii < uset_shows_list.used; ii++)
+ {
+ uset_shows_list.list[ii]->command->func(user, channel, 1, argv+1, uset_shows_list.list[ii]);
+ }
+ return 1;
+ }
+
+ sprintf(buf, "%s %s", argv[0], argv[1]);
+ subcmd = dict_find(cmd->parent->commands, buf, NULL);
+ if(!subcmd)
+ {
+ reply(CSMSG_INVALID_OPTION, argv[1], argv[0]);
+ return 0;
+ }
+
+ return subcmd->command->func(user, channel, argc - 1, argv + 1, subcmd);
+ }
+
static CHANSERV_FUNC(cmd_giveownership)
{
***************
*** 5916,5920 ****
}
! if(validate_auto_op(user, channel))
{
AddChannelOp(1, &user, channel, chanserv, 1);
--- 5997,6001 ----
}
! if(validate_auto_op(user, channel) && !channel->join_flooded)
{
AddChannelOp(1, &user, channel, chanserv, 1);
***************
*** 5994,5998 ****
{
struct chanNode *cn;
! if(IsSuspended(channel->channel) || !(cn = channel->channel->channel) || !GetUserMode(cn, user)) continue;
if(channel->user->access >= ulMaster)
--- 6075,6093 ----
{
struct chanNode *cn;
! if(IsSuspended(channel->channel) || !(cn = channel->channel->channel))
! {
! continue;
! }
! if(!GetUserMode(cn, user))
! {
! if(IsUserAutoInvite(channel->user))
! {
! if(cn->modes & (MODE_KEY | MODE_INVITEONLY))
! {
! irc_invite(chanserv, user, cn);
! }
! }
! continue;
! }
if(channel->user->access >= ulMaster)
***************
*** 6919,6923 ****
#define DEFINE_COMMAND(NAME, MIN_ARGC, FLAGS, OPTIONS...) modcmd_register(chanserv_module, #NAME, cmd_##NAME, MIN_ARGC, FLAGS, ## OPTIONS)
! #define DEFINE_OPTION(NAME) modcmd_register(chanserv_module, "set "#NAME, opt_##NAME, 1, 0, NULL)
void
--- 7014,7019 ----
#define DEFINE_COMMAND(NAME, MIN_ARGC, FLAGS, OPTIONS...) modcmd_register(chanserv_module, #NAME, cmd_##NAME, MIN_ARGC, FLAGS, ## OPTIONS)
! #define DEFINE_CHANNEL_OPTION(NAME) modcmd_register(chanserv_module, "set "#NAME, chan_opt_##NAME, 1, 0, NULL)
! #define DEFINE_USER_OPTION(NAME) modcmd_register(chanserv_module, "uset "#NAME, user_opt_##NAME, 1, 0, NULL)
void
***************
*** 7001,7005 ****
DEFINE_COMMAND(addtimedban, 3, MODCMD_REQUIRE_REGCHAN, "access", "master", NULL);
DEFINE_COMMAND(delban, 2, MODCMD_REQUIRE_REGCHAN, "access", "master", NULL);
! DEFINE_COMMAND(togop, 1, MODCMD_REQUIRE_CHANUSER, NULL);
DEFINE_COMMAND(suspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "coowner", NULL);
DEFINE_COMMAND(unsuspend, 2, MODCMD_REQUIRE_CHANUSER, "access", "coowner", NULL);
--- 7097,7101 ----
DEFINE_COMMAND(addtimedban, 3, MODCMD_REQUIRE_REGCHAN, "access", "master", NULL);
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);
***************
*** 7042,7069 ****
DEFINE_COMMAND(huggle, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
! DEFINE_OPTION(defaulttopic);
! DEFINE_OPTION(topicmask);
! DEFINE_OPTION(greeting);
! DEFINE_OPTION(usergreeting);
! DEFINE_OPTION(modes);
! DEFINE_OPTION(strictop);
! DEFINE_OPTION(autoop);
! DEFINE_OPTION(protect);
! DEFINE_OPTION(enfmodes);
! DEFINE_OPTION(enftopic);
! DEFINE_OPTION(pubcmd);
! DEFINE_OPTION(voice);
! DEFINE_OPTION(userinfo);
! DEFINE_OPTION(dynlimit);
! DEFINE_OPTION(topicsnarf);
! DEFINE_OPTION(nodelete);
! DEFINE_OPTION(toys);
! DEFINE_OPTION(setters);
! DEFINE_OPTION(topicrefresh);
! DEFINE_OPTION(ctcpusers);
! DEFINE_OPTION(ctcpreaction);
! DEFINE_OPTION(peoninvite);
! /* compatability alias.. */
! modcmd_register(chanserv_module, "set topic", opt_defaulttopic, 1, 0, NULL);
note_types = dict_new();
--- 7138,7174 ----
DEFINE_COMMAND(huggle, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
! /* Channel options */
! DEFINE_CHANNEL_OPTION(defaulttopic);
! DEFINE_CHANNEL_OPTION(topicmask);
! DEFINE_CHANNEL_OPTION(greeting);
! DEFINE_CHANNEL_OPTION(usergreeting);
! DEFINE_CHANNEL_OPTION(modes);
! DEFINE_CHANNEL_OPTION(strictop);
! DEFINE_CHANNEL_OPTION(autoop);
! DEFINE_CHANNEL_OPTION(protect);
! DEFINE_CHANNEL_OPTION(enfmodes);
! DEFINE_CHANNEL_OPTION(enftopic);
! DEFINE_CHANNEL_OPTION(pubcmd);
! DEFINE_CHANNEL_OPTION(voice);
! DEFINE_CHANNEL_OPTION(userinfo);
! DEFINE_CHANNEL_OPTION(dynlimit);
! DEFINE_CHANNEL_OPTION(topicsnarf);
! DEFINE_CHANNEL_OPTION(nodelete);
! DEFINE_CHANNEL_OPTION(toys);
! DEFINE_CHANNEL_OPTION(setters);
! DEFINE_CHANNEL_OPTION(topicrefresh);
! DEFINE_CHANNEL_OPTION(ctcpusers);
! DEFINE_CHANNEL_OPTION(ctcpreaction);
! DEFINE_CHANNEL_OPTION(peoninvite);
!
! /* Alias set topic to set defaulttopic for compatibility. */
! modcmd_register(chanserv_module, "set topic", chan_opt_defaulttopic, 1, 0, NULL);
!
! /* User options */
! DEFINE_USER_OPTION(noautoop);
! DEFINE_USER_OPTION(autoinvite);
!
! /* Alias uset autovoice to uset autoop. */
! modcmd_register(chanserv_module, "uset noautovoice", user_opt_noautoop, 1, 0, NULL);
note_types = dict_new();
Index: chanserv.h
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** chanserv.h 24 Sep 2002 19:22:05 -0000 1.44
--- chanserv.h 21 Oct 2002 02:27:49 -0000 1.45
***************
*** 119,128 ****
};
! #define USER_AUTO_OP 0x00000001
! #define USER_SUSPENDED 0x00000002
! #define USER_FLAGS_SIZE 7
! #define IsUserAutoOp(USER) (!((USER)->flags & USER_AUTO_OP))
! #define IsUserSuspended(USER) ((USER)->flags & USER_SUSPENDED)
struct userData
--- 119,130 ----
};
! #define USER_AUTO_OP 0x00000001
! #define USER_SUSPENDED 0x00000002
! #define USER_AUTO_INVITE 0x00000004
! #define USER_FLAGS_SIZE 7
! #define IsUserAutoOp(USER) (!((USER)->flags & USER_AUTO_OP))
! #define IsUserSuspended(USER) ((USER)->flags & USER_SUSPENDED)
! #define IsUserAutoInvite(USER) ((USER)->flags & USER_AUTO_INVITE)
struct userData
|