From 860d446d28776ec842fa53e8e08538d4e093d6e9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 12 Oct 2011 03:14:07 +0200 Subject: EssentialsUpdate WIP --- .../net/irc/martyr/modes/channel/PrivateMode.java | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 EssentialsUpdate/src/f00f/net/irc/martyr/modes/channel/PrivateMode.java (limited to 'EssentialsUpdate/src/f00f/net/irc/martyr/modes/channel/PrivateMode.java') diff --git a/EssentialsUpdate/src/f00f/net/irc/martyr/modes/channel/PrivateMode.java b/EssentialsUpdate/src/f00f/net/irc/martyr/modes/channel/PrivateMode.java new file mode 100644 index 000000000..580b957e6 --- /dev/null +++ b/EssentialsUpdate/src/f00f/net/irc/martyr/modes/channel/PrivateMode.java @@ -0,0 +1,50 @@ +package f00f.net.irc.martyr.modes.channel; + +import f00f.net.irc.martyr.Mode; + +/** + *

Private and Secret Channels - The channel flag 'p' is used to + * mark a channel "private" and the channel flag 's' to mark a + * channel "secret". Both properties are similar and conceal the + * existence of the channel from other users.

+ * + *

This means that there is no way of getting this channel's name from + * the server without being a member. In other words, these channels + * MUST be omitted from replies to queries like the WHOIS + * command.

+ * + *

When a channel is "secret", in addition to the restriction above, the + * server will act as if the channel does not exist for queries like the + * TOPIC, LIST, NAMES commands. Note that there is one exception to + * this rule: servers will correctly reply to the MODE command. + * Finally, secret channels are not accounted for in the reply to the + * LUSERS command (See "Internet Relay Chat: Client Protocol" [IRC- + * CLIENT]) when the <mask> parameter is specified.

+ * + *

The channel flags 'p' and 's' MUST NOT both be set at the same time. + * If a MODE message originating from a server sets the flag 'p' and the + * flag 's' is already set for the channel, the change is silently + * ignored. This should only happen during a split healing phase + * (mentioned in the "IRC Server Protocol" document + * [IRC-SERVER]).

+ * + * (From RFC2811) + */ +public class PrivateMode extends GenericChannelMode +{ + public boolean requiresParam() + { + return false; + } + + public char getChar() + { + return 'p'; + } + + public Mode newInstance() + { + return new PrivateMode(); + } +} + -- cgit v1.2.3