- Add cmode +J which disallows a kicked user from rejoining within 'X' seconds
of them being kicked, where 'X' is the variable of the channel::kick_no_rejoin_time
configuration option.
-- Add cmodes +a and +h (owner and halfop, respectively). There are 2 extra
+- Add cmodes +a and +h (admin and halfop, respectively). There are 2 extra
prefixes to more finely-grain the status of staff members in your channels.
They can be enabled or disabled in the configuration file with the options
- channel::use_halfop and channel::use_owner.
+ channel::use_halfop and channel::use_admin.
new configuration options
- auth::autojoin - This option will specify what channels users in a matching
autochanmodes = "nt";
exemptchanops = "NT";
use_halfop = yes;
- use_owner = yes;
+ use_admin = yes;
use_invex = yes;
use_except = yes;
use_knock = yes;
*/
use_halfop = yes;
- /* owner: Enable/disable channel mode +a, which adds owner,
+ /* admin: Enable/disable channel mode +a, which adds admin,
* a channel status above op that has op powers (kick, ban, mode, etc.)
- * owners can only be kicked/deownered by other owners, and may kick
+ * admins can only be kicked/deadmined by other admins, and may kick
* or deop anyone. Disabling this via rehash will cause things which
* are rather confusing to occur, it is highly recommended to restart
* if you wish to disable this option, though it may be enabled
* by rehash with no problems.
*/
- use_owner = yes;
+ use_admin = yes;
/* invex: Enable/disable channel mode +I, a n!u@h list of masks
* that can join a +i channel without an invite. Disabling this option
{
msptr = ptr->data;
- if(is_chanop(msptr) || is_owner(msptr))
+ if(is_chanop(msptr) || is_admin(msptr))
{
sendto_one_notice(source_p, ":%s Channel is not opless", parv[1]);
return 0;
#define CHFL_QUIETED 0x0010 /* cached as being +q victim */
#define ONLY_SERVERS 0x0020
#define CHFL_HALFOP 0x0040
-#define CHFL_OWNER 0x0080
+#define CHFL_ADMIN 0x0080
#define ONLY_OPERS 0x0100
#define ALL_MEMBERS CHFL_PEON
#define ONLY_CHANOPS CHFL_CHANOP
#define ONLY_CHANOPSVOICED (CHFL_CHANOP|CHFL_VOICE)
#define is_chmode_h(x) ((x) && (x)->flags & CHFL_HALFOP) /* does not check if halfop is enabled, should typically not be used */
-#define is_chmode_a(x) ((x) && (x)->flags & CHFL_OWNER) /* does not check if owner is enabled, should typically not be used */
+#define is_chmode_a(x) ((x) && (x)->flags & CHFL_ADMIN) /* does not check if admin is enabled, should typically not be used */
#define is_chanop(x) ((x) && (x)->flags & CHFL_CHANOP)
#define is_voiced(x) ((x) && (x)->flags & CHFL_VOICE)
#define can_send_banned(x) ((x) && (x)->flags & (CHFL_BANNED|CHFL_QUIETED))
extern struct membership *find_channel_membership(struct Channel *, struct Client *);
extern const char *find_channel_status(struct membership *msptr, int combine);
extern int is_halfop(struct membership *msptr);
-extern int is_owner(struct membership *msptr);
+extern int is_admin(struct membership *msptr);
extern int is_any_op(struct membership *msptr);
extern int is_chanop_voiced(struct membership *msptr);
extern int can_kick_deop(struct membership *source, struct membership *target);
extern void chm_regonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
-extern void chm_owner(struct Client *source_p, struct Channel *chptr,
+extern void chm_admin(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_op(struct Client *source_p, struct Channel *chptr,
char * autochanmodes;
char * exemptchanops;
int use_halfop;
- int use_owner;
+ int use_admin;
int use_except;
int use_invex;
int use_knock;
{
if(*s == '!')
{
- fl |= CHFL_OWNER;
+ fl |= CHFL_ADMIN;
s++;
}
else if(*s == '@')
if(keep_new_modes)
{
- if(fl & CHFL_OWNER)
+ if(fl & CHFL_ADMIN)
{
*ptr_uid++ = '!';
len_nick++;
/* If anyone can think of a way to do this that doesn't make babies cry
* I would love to hear it - Taros */
- if(fl & CHFL_OWNER)
+ if(fl & CHFL_ADMIN)
{
*mbuf++ = 'a';
para[pargs++] = target_p->name;
/* If anyone can think of a way to do this that doesn't make babies cry
* I would love to hear it - Taros */
- if(is_owner(msptr))
+ if(is_admin(msptr))
{
- msptr->flags &= ~CHFL_OWNER;
+ msptr->flags &= ~CHFL_ADMIN;
lpara[count++] = msptr->client_p->name;
*mbuf++ = 'a';
"Enable chanmode +h (halfop)",
},
{
- "use_owner",
+ "use_admin",
OUTPUT_BOOLEAN_YN,
- &ConfigChannel.use_owner,
- "Enable chanmode +a (owner)",
+ &ConfigChannel.use_admin,
+ "Enable chanmode +a (admin)",
},
{
"use_except",
p = buffer;
- if(is_owner(msptr))
+ if(is_admin(msptr))
{
if(!combine)
return "!";
return 0;
}
-/* is_owner()
+/* is_admin()
*
- * input - membership to check for owner
- * output - 1 if the user is an owner, 0 if the user is not or owner
+ * input - membership to check for admin
+ * output - 1 if the user is an admin, 0 if the user is not or admin
* is disabled.
* side effects -
*
*/
int
-is_owner(struct membership *msptr)
+is_admin(struct membership *msptr)
{
- if(!ConfigChannel.use_owner)
+ if(!ConfigChannel.use_admin)
return 0;
if(is_chmode_a(msptr))
return 1;
/* is_any_op()
*
* input - membership to check for ops
- * output - 1 if the user is op, halfop, or owner, 0 elsewise
+ * output - 1 if the user is op, halfop, or admin, 0 elsewise
* side effects -
*/
int
is_any_op(struct membership *msptr)
{
- if(is_chanop(msptr) || is_halfop(msptr) || is_owner(msptr))
+ if(is_chanop(msptr) || is_halfop(msptr) || is_admin(msptr))
return 1;
else
return 0;
/* is_chanop_voiced()
*
* input - memebership to check for status
- * output - 1 if the user is op, halfop, owner, or voice, 0 elsewise
+ * output - 1 if the user is op, halfop, admin, or voice, 0 elsewise
* side effects -
*/
int
is_chanop_voiced(struct membership *msptr)
{
- if(is_chanop(msptr) || is_voiced(msptr) || is_halfop(msptr) || is_owner(msptr))
+ if(is_chanop(msptr) || is_voiced(msptr) || is_halfop(msptr) || is_admin(msptr))
return 1;
else
return 0;
int
can_kick_deop(struct membership *source, struct membership *target)
{
- if(is_chanop(source) && !is_owner(target))
+ if(is_chanop(source) && !is_admin(target))
return 1;
else if(is_halfop(source) && !is_any_op(target))
return 1;
- else if(is_owner(source))
+ else if(is_admin(source))
return 1;
return 0;
!(chmode_table[i].set_func == chm_throttle) &&
!(chmode_table[i].set_func == chm_key) &&
!(chmode_table[i].set_func == chm_limit) &&
- !(chmode_table[i].set_func == chm_owner) &&
+ !(chmode_table[i].set_func == chm_admin) &&
!(chmode_table[i].set_func == chm_op) &&
!(chmode_table[i].set_func == chm_halfop) &&
!(chmode_table[i].set_func == chm_voice))
static int
get_channel_access(struct Client *source_p, struct membership *msptr)
{
- if(!MyClient(source_p) || is_owner(msptr))
- return CHFL_OWNER;
+ if(!MyClient(source_p) || is_admin(msptr))
+ return CHFL_ADMIN;
else if(is_chanop(msptr))
return CHFL_CHANOP;
else if(is_halfop(msptr))
struct Metadata *md;
struct DictionaryIter iter;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if (IsOverride(source_p))
override = 1;
*errors |= errorval;
/* non-ops cant see +eI lists.. */
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP && mode_type != CHFL_BAN &&
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP && mode_type != CHFL_BAN &&
mode_type != CHFL_QUIET)
{
if(IsOverride(source_p))
return;
}
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
}
void
-chm_owner(struct Client *source_p, struct Channel *chptr,
+chm_admin(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
{
struct membership *mstptr;
- const char *ownernick;
+ const char *adminnick;
struct Client *targ_p;
int override = 0;
- if(!ConfigChannel.use_owner)
+ if(!ConfigChannel.use_admin)
{
if(*errors & SM_ERR_UNKNOWN)
return;
return;
}
- if(alevel != CHFL_OWNER)
+ if(alevel != CHFL_ADMIN)
{
if(IsOverride(source_p))
override = 1;
if((dir == MODE_QUERY) || (parc <= *parn))
return;
- ownernick = parv[(*parn)];
+ adminnick = parv[(*parn)];
(*parn)++;
/* empty nick */
- if(EmptyString(ownernick))
+ if(EmptyString(adminnick))
{
sendto_one_numeric(source_p, ERR_NOSUCHNICK, form_str(ERR_NOSUCHNICK), "*");
return;
}
- if((targ_p = find_chasing(source_p, ownernick, NULL)) == NULL)
+ if((targ_p = find_chasing(source_p, adminnick, NULL)) == NULL)
{
return;
}
{
if(!(*errors & SM_ERR_NOTONCHANNEL) && MyClient(source_p))
sendto_one_numeric(source_p, ERR_USERNOTINCHANNEL,
- form_str(ERR_USERNOTINCHANNEL), ownernick, chptr->chname);
+ form_str(ERR_USERNOTINCHANNEL), adminnick, chptr->chname);
*errors |= SM_ERR_NOTONCHANNEL;
return;
}
mode_changes[mode_count].override = override;
mode_changes[mode_count++].client = targ_p;
- mstptr->flags |= CHFL_OWNER;
+ mstptr->flags |= CHFL_ADMIN;
}
else
{
mode_changes[mode_count].override = override;
mode_changes[mode_count++].client = targ_p;
- mstptr->flags &= ~CHFL_OWNER;
+ mstptr->flags &= ~CHFL_ADMIN;
}
}
struct Client *targ_p;
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN)
{
if(IsOverride(source_p))
override = 1;
return;
}
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN)
{
if(IsOverride(source_p))
override = 1;
struct Client *targ_p;
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
int limit;
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
int joins = 0, timeslice = 0;
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
}
#ifndef FORWARD_OPERONLY
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
char *key;
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
{
int override = 0;
- if(alevel != CHFL_CHANOP && alevel != CHFL_OWNER && alevel != CHFL_HALFOP)
+ if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if(IsOverride(source_p))
override = 1;
{chm_nosuch, 0 },
{chm_nosuch, 0 },
{chm_nosuch, 0 },
- {chm_owner, 0 }, /* a */
+ {chm_admin, 0 }, /* a */
{chm_ban, CHFL_BAN }, /* b */
{chm_simple, MODE_NOCOLOR }, /* c */
{chm_nosuch, 0 }, /* d */
{ "cycle_host_change", CF_YESNO, NULL, 0, &ConfigChannel.cycle_host_change },
{ "host_in_topic", CF_YESNO, NULL, 0, &ConfigChannel.host_in_topic },
{ "use_halfop", CF_YESNO, NULL, 0, &ConfigChannel.use_halfop },
- { "use_owner", CF_YESNO, NULL, 0, &ConfigChannel.use_owner },
+ { "use_admin", CF_YESNO, NULL, 0, &ConfigChannel.use_admin },
{ "use_except", CF_YESNO, NULL, 0, &ConfigChannel.use_except },
{ "use_invex", CF_YESNO, NULL, 0, &ConfigChannel.use_invex },
{ "use_knock", CF_YESNO, NULL, 0, &ConfigChannel.use_knock },
ConfigChannel.autochanmodes = rb_strdup("nt");
ConfigChannel.exemptchanops = rb_strdup("");
ConfigChannel.use_halfop = YES;
- ConfigChannel.use_owner = YES;
+ ConfigChannel.use_admin = YES;
ConfigChannel.use_except = YES;
ConfigChannel.use_invex = YES;
ConfigChannel.use_knock = YES;
msptr = uptr->data;
tlen = strlen(use_id(msptr->client_p)) + 1;
- if(is_owner(msptr))
+ if(is_admin(msptr))
tlen++;
if(is_chanop(msptr))
tlen++;
chptr = mscptr->chptr;
mptr = mode;
- if(is_owner(mscptr))
+ if(is_admin(mscptr))
{
*mptr++ = 'a';
strcat(modeval, nick);
static char result[11];
rb_snprintf(result, sizeof result, "(%so%sv)%s@%s+",
- ConfigChannel.use_owner ? "a" : "",
+ ConfigChannel.use_admin ? "a" : "",
ConfigChannel.use_halfop ? "h" : "",
- ConfigChannel.use_owner ? "!" : "",
+ ConfigChannel.use_admin ? "!" : "",
ConfigChannel.use_halfop ? "%" : "");
return result;
}