]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_cap.c
Remove obsolete comment.
[irc/rqf/shadowircd.git] / modules / m_cap.c
index 8704e4492dadea5b8737907b477b147d0235a54d..9fa94d37c9449e1446029bf534a74e19d961af05 100644 (file)
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "class.h"
 #include "client.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "msg.h"
@@ -117,7 +116,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;
        }
 
@@ -177,7 +176,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
        int curlen, mlen;
        int i;
 
-       mlen = ircsprintf(buf, ":%s CAP %s %s",
+       mlen = rb_sprintf(buf, ":%s CAP %s %s",
                        me.name, 
                        EmptyString(source_p->name) ? "*" : source_p->name, 
                        subcmd);
@@ -251,7 +250,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
                        }
                }
 
-               curlen = ircsprintf(p, "%s ", clicap_list[i].name);
+               curlen = rb_sprintf(p, "%s ", clicap_list[i].name);
                p += curlen;
                buflen += curlen;
        }
@@ -318,12 +317,12 @@ cap_end(struct Client *source_p, const char *arg)
        if(IsRegistered(source_p))
                return;
 
-       source_p->flags2 &= ~FLAGS2_CLICAP;
+       source_p->flags &= ~FLAGS_CLICAP;
 
        if(source_p->name[0] && source_p->user)
        {
                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);
        }
 }
@@ -340,7 +339,7 @@ static void
 cap_ls(struct Client *source_p, const char *arg)
 {
        if(!IsRegistered(source_p))
-               source_p->flags2 |= FLAGS2_CLICAP;
+               source_p->flags |= FLAGS_CLICAP;
 
        /* list of what we support */
        clicap_generate(source_p, "LS", 0, 0);
@@ -358,12 +357,12 @@ cap_req(struct Client *source_p, const char *arg)
        int finished = 0, negate;
 
        if(!IsRegistered(source_p))
-               source_p->flags2 |= FLAGS2_CLICAP;
+               source_p->flags |= FLAGS_CLICAP;
 
        if(EmptyString(arg))
                return;
 
-       buflen = ircsnprintf(buf, sizeof(buf), ":%s CAP %s ACK",
+       buflen = rb_snprintf(buf, sizeof(buf), ":%s CAP %s ACK",
                        me.name, EmptyString(source_p->name) ? "*" : source_p->name);
 
        pbuf[0][0] = '\0';
@@ -467,7 +466,8 @@ m_cap(struct Client *client_p, struct Client *source_p, int parc, const char *pa
                                sizeof(struct clicap_cmd), (bqcmp) clicap_cmd_search)))
        {
                sendto_one(source_p, form_str(ERR_INVALIDCAPCMD),
-                               me.name, source_p->name, parv[1]);
+                               me.name, EmptyString(source_p->name) ? "*" : source_p->name,
+                               parv[1]);
                return 0;
        }