summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channel.c7
-rw-r--r--src/s_bsd.c1
-rw-r--r--src/s_user.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/channel.c b/src/channel.c
index 1c04488..e588add 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -641,13 +641,8 @@ is_banned(const struct Channel *chptr, const struct Client *who)
int
can_join(struct Client *source_p, struct Channel *chptr, const char *key)
{
-#ifdef HAVE_LIBCRYPTO
- if ((chptr->mode.mode & MODE_SSLONLY) && !source_p->localClient->fd.ssl)
+ if ((chptr->mode.mode & MODE_SSLONLY) && !HasUMode(source_p, UMODE_SSL))
return ERR_SSLONLYCHAN;
-#else
- if ((chptr->mode.mode & MODE_SSLONLY))
- return ERR_SSLONLYCHAN;
-#endif
if ((chptr->mode.mode & MODE_REGONLY) && !HasUMode(source_p, UMODE_REGISTERED))
return ERR_NEEDREGGEDNICK;
diff --git a/src/s_bsd.c b/src/s_bsd.c
index e0b8173..903741e 100644
--- a/src/s_bsd.c
+++ b/src/s_bsd.c
@@ -368,6 +368,7 @@ add_connection(struct Listener *listener, struct irc_ssaddr *irn, int fd)
return;
}
+ AddFlag(new_client, FLAGS_SSL);
SSL_set_fd(new_client->localClient->fd.ssl, fd);
ssl_handshake(0, new_client);
}
diff --git a/src/s_user.c b/src/s_user.c
index ebbeecd..97ad2c1 100644
--- a/src/s_user.c
+++ b/src/s_user.c
@@ -101,7 +101,7 @@ const unsigned int user_modes[256] =
0, /* P */
0, /* Q */
UMODE_REGONLY, /* R */
- 0, /* S */
+ UMODE_SSL, /* S */
0, /* T */
0, /* U */
0, /* V */
@@ -895,6 +895,7 @@ set_user_mode(struct Client *client_p, struct Client *source_p,
break;
+ case 'S': /* Only servers may set +S in a burst */
case 'r': /* Only services may set +r */
case 'x': /* Only services may set +x */
break;
@@ -1143,10 +1144,13 @@ user_welcome(struct Client *source_p)
#endif
#ifdef HAVE_LIBCRYPTO
- if (source_p->localClient->fd.ssl != NULL)
+ if (HasFlag(source_p, FLAGS_SSL))
+ {
+ AddUMode(source_p, UMODE_SSL);
sendto_one(source_p, ":%s NOTICE %s :*** Connected securely via %s",
me.name, source_p->name,
ssl_get_cipher(source_p->localClient->fd.ssl));
+ }
#endif
sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,