]> jfr.im git - solanum.git/blobdiff - modules/m_cap.c
Rework ircd-side MLOCK enforcement: instead of trying to track modes locked on or...
[solanum.git] / modules / m_cap.c
index 998d8f0d1966cd597543a925aa80e7cec62c2ce5..bf9299533f398990ca47970ddb05735e04522980 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,8 @@ 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("source-account-hostmask", CLICAP_ACCOUNT_HOSTMASK, 0, 0),
 };
 
 #define CLICAP_LIST_LEN (sizeof(clicap_list) / sizeof(struct clicap))
@@ -174,7 +175,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,7 +320,7 @@ 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];
                rb_strlcpy(buf, source_p->username, sizeof(buf));