]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_capab.c
Allow /ojoin !#channel/%#channel, if admin/halfop are enabled.
[irc/rqf/shadowircd.git] / modules / m_capab.c
index ae9edc860f6ddd52a70e652ab0366cf7462e8ccb..227a9972f4e6b5109644338e3b2437e0281d56c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ircd-ratbox: A slightly useful ircd.
- *  m_away.c: Negotiates capabilities with a remote server.
+ *  m_capab.c: Negotiates capabilities with a remote server.
  *
  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
  *  Copyright (C) 1996-2002 Hybrid Development Team
@@ -26,7 +26,7 @@
 
 #include "stdinc.h"
 #include "client.h"
-#include "irc_string.h"
+#include "match.h"
 #include "s_serv.h"
 #include "s_conf.h"
 #include "msg.h"
@@ -50,7 +50,6 @@ DECLARE_MODULE_AV1(capab, NULL, NULL, capab_clist, NULL, NULL, "$Revision: 1295
 
 /*
  * mr_capab - CAPAB message handler
- *      parv[0] = sender prefix
  *      parv[1] = space-separated list of capabilities
  *
  */
@@ -84,7 +83,7 @@ mr_capab(struct Client *client_p, struct Client *source_p, int parc, const char
        for (i = 1; i < parc; i++)
        {
                char *t = LOCAL_COPY(parv[i]);
-               for (s = strtoken(&p, t, " "); s; s = strtoken(&p, NULL, " "))
+               for (s = rb_strtok_r(t, " ", &p); s; s = rb_strtok_r(NULL, " ", &p))
                {
                        for (cap = captab; cap->name; cap++)
                        {
@@ -119,9 +118,9 @@ me_gcap(struct Client *client_p, struct Client *source_p,
                rb_free(source_p->serv->fullcaps);
        }
 
-       DupString(source_p->serv->fullcaps, parv[1]);
+       source_p->serv->fullcaps = rb_strdup(parv[1]);
 
-       for (s = strtoken(&p, t, " "); s; s = strtoken(&p, NULL, " "))
+       for (s = rb_strtok_r(t, " ", &p); s; s = rb_strtok_r(NULL, " ", &p))
        {
                for (cap = captab; cap->name; cap++)
                {