]> jfr.im git - solanum.git/blobdiff - modules/m_cap.c
m_info: Correct description of general::client_exit like in example confs.
[solanum.git] / modules / m_cap.c
index 5b696250131461cbdabd54eb41a5f11f6291f81b..7abfa9fe639f79b01fe36a51d50cf9162d21f13f 100644 (file)
@@ -33,7 +33,7 @@
 #include "stdinc.h"
 #include "class.h"
 #include "client.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "msg.h"
@@ -69,7 +69,11 @@ static struct clicap
        int namelen;
 } clicap_list[] = {
        _CLICAP("multi-prefix", CLICAP_MULTI_PREFIX, 0, 0),
-       _CLICAP("sasl", CLICAP_SASL, 0, 0)
+       _CLICAP("sasl", CLICAP_SASL, 0, 0),
+       _CLICAP("account-notify", CLICAP_ACCOUNT_NOTIFY, 0, 0),
+       _CLICAP("extended-join", CLICAP_EXTENDED_JOIN, 0, 0),
+       _CLICAP("away-notify", CLICAP_AWAY_NOTIFY, 0, 0),
+       _CLICAP("tls", CLICAP_TLS, 0, 0),
 };
 
 #define CLICAP_LIST_LEN (sizeof(clicap_list) / sizeof(struct clicap))
@@ -116,7 +120,7 @@ clicap_find(const char *data, int *negate, int *finished)
 
        if(data)
        {
-               strlcpy(buf, data, sizeof(buf));
+               rb_strlcpy(buf, data, sizeof(buf));
                p = buf;
        }
 
@@ -174,7 +178,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
        char *p;
        int buflen = 0;
        int curlen, mlen;
-       int i;
+       size_t i;
 
        mlen = rb_sprintf(buf, ":%s CAP %s %s",
                        me.name, 
@@ -319,10 +323,10 @@ cap_end(struct Client *source_p, const char *arg)
 
        source_p->flags &= ~FLAGS_CLICAP;
 
-       if(source_p->name[0] && source_p->user)
+       if(source_p->name[0] && source_p->flags & FLAGS_SENTUSER)
        {
                char buf[USERLEN+1];
-               strlcpy(buf, source_p->username, sizeof(buf));
+               rb_strlcpy(buf, source_p->username, sizeof(buf));
                register_local_user(source_p, source_p, buf);
        }
 }