From: rubinlinux Date: Mon, 18 Jul 2005 15:16:57 +0000 (+0000) Subject: Added +L awareness. X-Git-Tag: 1.9~636 X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/commitdiff_plain/88c7cb10ddd68a03aed3c2cff010e994c4bb7b4c?hp=2187a4e373badaab234317dbd5bc55131024e620 Added +L awareness. --- diff --git a/ChangeLog.X3 b/ChangeLog.X3 index cbf114d..5c18bc3 100644 --- a/ChangeLog.X3 +++ b/ChangeLog.X3 @@ -1,6 +1,14 @@ /*********************************************************************** X3 ChangeLog +2005-07-18 Alex Schumann + + * src/proto-p10.c: added +L awareness + + * src/hash.h: added +L awareness + + * src/chanserv.help: changed set ctcpreaction help + 2005-07-18 Neil Spierling * src/modcmd.h: Lets make some functions global. diff --git a/src/chanserv.help b/src/chanserv.help index efb9d33..940d38d 100644 --- a/src/chanserv.help +++ b/src/chanserv.help @@ -444,14 +444,13 @@ "PUBCMD: Restrictions to use commands in public.", "INVITEME: Minimum level for users to use INVITEME or AUTOINVITE.", "USERINFO: Minimum level for users to show an infoline on join.", - "ENFOPS: Restrictions for opping users.", - "ENFHALFOPS: Restrictions for halfopping users.", - "ENFMODES: Restrictions to change the default modes.", - "ENFTOPIC: Restrictions on changing the topic.", + "ENFOPS: Who can op users.", + "ENFHALFOPS: Who can half-op users.", + "ENFMODES: Who can change the channel modes.", + "ENFTOPIC: Who can chang the topic.", "TOPICSNARF: Manual topics changes (by /TOPIC) from users this level and above will change the default $b$C$b topic.", "SETTERS: Who may change channel settings (using $bSET$b).", - "CTCPUSERS: Who is allowed to send CTCPs to the channel.", - "CTCPREACTION: What happens when a disallowed CTCP is sent to the channel.", + "CTCPREACTION: What happens when a CTCP is sent to the channel.", "VOICE: Who should be auto-voiced in the channel.", "PROTECT: The protection level $b$C$b provides.", "TOYS: Toggles how $b$C$b will respond to toy commands (!8ball etc).", @@ -525,16 +524,13 @@ "$b3$b Refresh every 12 hours.", "$b4$b Refresh every 24 hours.", "$uSee Also:$u set, set topic"); -"SET CTCPUSERS" ("/msg $C SET <#channel> CTCPUSERS ", - "This setting controls who is allowed to send CTCPs to the channel. CTCP ACTION, the way that /me is implemented, are always allowed. For any other CTCP, the user must have this access level. 501 indicates no users may use CTCPs in the channel.", - "If a user below the specified level sends a CTCP (besides ACTION) to the channel, the enforcement is specified by the $bCTCPReaction$b setting.", - "$uSee Also:$u set, set ctcpreaction"); "SET CTCPREACTION" ("/msg $C SET <#channel> CTCPREACTION ", "This setting controls what happens to those who send disallowed CTCPs to the channel:", - "$b0$b Kick on disallowed CTCPs.", - "$b1$b Kickban on disallowed CTCPs.", - "$b2$b Short timed ban (defaults to 3 minutes) on disallowed CTCPs.", - "$b3$b Long timed ban (defaults to 1 hour) on disallowed CTCPs.", + "$b0$b CTCPs are allowed. Do nothing.", + "$b1$b Kick on disallowed CTCPs.", + "$b2$b Kickban on disallowed CTCPs.", + "$b3$b Short timed ban (defaults to 3 minutes) on disallowed CTCPs.", + "$b4$b Long timed ban (defaults to 1 hour) on disallowed CTCPs.", "$uSee Also:$u set, set ctcpusers"); "SET DEFAULTS" ("/msg $C SET <#channel> DEFAULTS []", "With the proper confirmation string, resets all the options for the channel to their default values.", diff --git a/src/hash.h b/src/hash.h index 8ee04e3..04af66d 100644 --- a/src/hash.h +++ b/src/hash.h @@ -50,6 +50,7 @@ #define MODE_SSLONLY 0x00400000 /* +Z ssl only */ #define MODE_HALFOP 0x00800000 /* +h USER */ #define MODE_EXEMPT 0x01000000 /* +e exempt */ +#define MODE_HIDEMODE 0x02000000 /* +L hide modes */ #define MODE_REMOVE 0x80000000 #define FLAGS_OPER 0x0001 /* Operator +O */ diff --git a/src/proto-p10.c b/src/proto-p10.c index 94aecec..71ec140 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -2254,6 +2254,7 @@ mod_chanmode_parse(struct chanNode *channel, char **modes, unsigned int argc, un case 'T': do_chan_mode(MODE_NOAMSG); break; case 'O': do_chan_mode(MODE_OPERSONLY); break; case 'Z': do_chan_mode(MODE_SSLONLY); break; + case 'L': do_chan_mode(MODE_HIDEMODE); break; case 'z': if (!(flags & MCP_REGISTERED)) { do_chan_mode(MODE_REGISTERED); @@ -2262,8 +2263,6 @@ mod_chanmode_parse(struct chanNode *channel, char **modes, unsigned int argc, un return NULL; } break; -// uncomment this when ssl is enabled on the network. -// case 'Z': do_chan_mode(MODE_SSLONLY); break; #undef do_chan_mode case 'l': if (add) { @@ -2432,6 +2431,7 @@ mod_chanmode_announce(struct userNode *who, struct chanNode *channel, struct mod DO_MODE_CHAR(OPERSONLY, 'O'); DO_MODE_CHAR(REGISTERED, 'z'); DO_MODE_CHAR(SSLONLY, 'Z'); + DO_MODE_CHAR(HIDEMODE, 'L'); #undef DO_MODE_CHAR if (change->modes_clear & channel->modes & MODE_KEY) mod_chanmode_append(&chbuf, 'k', channel->key); @@ -2483,6 +2483,7 @@ mod_chanmode_announce(struct userNode *who, struct chanNode *channel, struct mod DO_MODE_CHAR(OPERSONLY, 'O'); DO_MODE_CHAR(REGISTERED, 'z'); DO_MODE_CHAR(SSLONLY, 'Z'); + DO_MODE_CHAR(HIDEMODE, 'L'); #undef DO_MODE_CHAR if(change->modes_set & MODE_KEY) mod_chanmode_append(&chbuf, 'k', change->new_key); @@ -2551,6 +2552,7 @@ mod_chanmode_format(struct mod_chanmode *change, char *outbuff) DO_MODE_CHAR(OPERSONLY, 'O'); DO_MODE_CHAR(REGISTERED, 'z'); DO_MODE_CHAR(SSLONLY, 'Z'); + DO_MODE_CHAR(HIDEMODE, 'L'); #undef DO_MODE_CHAR } if (change->modes_set) { @@ -2574,6 +2576,7 @@ mod_chanmode_format(struct mod_chanmode *change, char *outbuff) DO_MODE_CHAR(OPERSONLY, 'O'); DO_MODE_CHAR(REGISTERED, 'z'); DO_MODE_CHAR(SSLONLY, 'Z'); + DO_MODE_CHAR(HIDEMODE, 'L'); #undef DO_MODE_CHAR switch (change->modes_set & (MODE_KEY|MODE_LIMIT)) { case MODE_KEY|MODE_LIMIT: @@ -2629,6 +2632,7 @@ clear_chanmode(struct chanNode *channel, const char *modes) case 'O': remove |= MODE_OPERSONLY; break; case 'z': remove |= MODE_REGISTERED; break; case 'Z': remove |= MODE_SSLONLY; break; + case 'L': remove |= MODE_HIDEMODE; break; } }