diff options
| author | Florian Westphal <fw@strlen.de> | 2008-05-01 18:00:33 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2008-05-01 18:08:07 +0200 |
| commit | f7c2e8223f95fd984e7b96308905eef505c01680 (patch) | |
| tree | 07c05e69b02d17c8c2531e8814b61c618c209548 /src | |
| parent | 60acc62af79579ed72013a7a0e1c36ba2e8fb130 (diff) | |
| download | ngircd-f7c2e8223f95fd984e7b96308905eef505c01680.tar.gz ngircd-f7c2e8223f95fd984e7b96308905eef505c01680.zip | |
Always enable modeless channels.
Modeless channels (+channels) are described in RFC 2811;
so my modifications to
530112b114ffa7d5352c0733790ddf90253f41f9
('Add support for modeless channels')
to disable +channels for --strict-rfc configurations
were wrong. This reverts those changes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/channel.c | 10 | ||||
| -rw-r--r-- | src/ngircd/irc-channel.c | 5 | ||||
| -rw-r--r-- | src/ngircd/irc-mode.c | 3 |
3 files changed, 5 insertions, 13 deletions
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index 7859238b..1b0e4424 100644 --- a/src/ngircd/channel.c +++ b/src/ngircd/channel.c @@ -480,14 +480,8 @@ Channel_IsValidName( const char *Name ) { assert( Name != NULL ); - switch (Name[0]) { - case '#': break; -#ifndef STRICT_RFC - case '+': /* modeless channel */ - break; -#endif - default: return false; - } + if (strchr("+#", Name[0]) == NULL) + return false; if (strlen(Name) >= CHANNEL_NAME_LEN) return false; diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index 3f76452e..934c9082 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -242,10 +242,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req ) if (!chan) { /* * New Channel: first user will be channel operator - * unless this is a modeless channel... */ -#ifndef STRICT_RFC + * unless this is a modeless channel. + */ if (*channame != '+') -#endif flags = "o"; } else if (!join_allowed(Client, target, chan, channame, key)) diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 3bf809bc..f4e3e0f9 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -286,12 +286,11 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel ) long l; size_t len; -#ifndef STRICT_RFC /* Are modes allowed on channel? */ if (Channel_Name(Channel)[0] == '+') return IRC_WriteStrClient(Client, ERR_NOCHANMODES_MSG, Client_ID(Client), Channel_Name(Channel)); -#endif + /* Mode request: let's answer it :-) */ if (Req->argc <= 1) return Channel_Mode_Answer_Request(Origin, Channel); |