]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_monitor.c
A few more fixes. Part 3 of 2 I suppose.
[irc/rqf/shadowircd.git] / modules / m_monitor.c
index ef0f6bac01b8115bba5a6450f80c95f2a431a0f9..429f9e2c3d7315ce3d7d48fdd8938f73f23cd4c2 100644 (file)
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: m_monitor.c 312 2005-11-07 10:47:33Z jilles $
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "client.h"
 #include "msg.h"
 #include "parse.h"
@@ -74,7 +72,7 @@ add_monitor(struct Client *client_p, const char *nicks)
 
        tmp = LOCAL_COPY(nicks);
 
-       for(name = strtoken(&p, tmp, ","); name; name = strtoken(&p, NULL, ","))
+       for(name = rb_strtok_r(tmp, ",", &p); name; name = rb_strtok_r(NULL, ",", &p))
        {
                if(EmptyString(name) || strlen(name) > NICKLEN-1)
                        continue;
@@ -90,9 +88,9 @@ add_monitor(struct Client *client_p, const char *nicks)
                                sendto_one(client_p, "%s", offbuf);
 
                        if(p)
-                               snprintf(buf, sizeof(buf), "%s,%s", name, p);
+                               rb_snprintf(buf, sizeof(buf), "%s,%s", name, p);
                        else
-                               snprintf(buf, sizeof(buf), "%s", name);
+                               rb_snprintf(buf, sizeof(buf), "%s", name);
 
                        sendto_one(client_p, form_str(ERR_MONLISTFULL),
                                        me.name, client_p->name,
@@ -103,11 +101,11 @@ add_monitor(struct Client *client_p, const char *nicks)
                monptr = find_monitor(name, 1);
 
                /* already monitoring this nick */
-               if(dlinkFind(client_p, &monptr->users))
+               if(rb_dlinkFind(client_p, &monptr->users))
                        continue;
 
-               dlinkAddAlloc(client_p, &monptr->users);
-               dlinkAddAlloc(monptr, &client_p->localClient->monitor_list);
+               rb_dlinkAddAlloc(client_p, &monptr->users);
+               rb_dlinkAddAlloc(monptr, &client_p->localClient->monitor_list);
 
                if((target_p = find_named_person(name)) != NULL)
                {
@@ -171,7 +169,7 @@ del_monitor(struct Client *client_p, const char *nicks)
 
        tmp = LOCAL_COPY(nicks);
 
-       for(name = strtoken(&p, tmp, ","); name; name = strtoken(&p, NULL, ","))
+       for(name = rb_strtok_r(tmp, ",", &p); name; name = rb_strtok_r(NULL, ",", &p))
        {
                if(EmptyString(name))
                        continue;