]> jfr.im git - solanum.git/blobdiff - ircd/chmode.c
configure: add same msys check here
[solanum.git] / ircd / chmode.c
index f1c32b6deb9e13bb86b4ee365d234c78fc37e213..5616fc7c7c01c0772de4e33aad65452253289f4e 100644 (file)
@@ -21,8 +21,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id: chmode.c 3580 2007-11-07 23:45:14Z jilles $
  */
 
 #include "stdinc.h"
@@ -283,7 +281,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid, const
 
 
        if(IsPerson(source_p))
-               rb_sprintf(who, "%s!%s@%s", source_p->name, source_p->username, source_p->host);
+               sprintf(who, "%s!%s@%s", source_p->name, source_p->username, source_p->host);
        else
                rb_strlcpy(who, source_p->name, sizeof(who));
 
@@ -403,7 +401,7 @@ pretty_mask(const char *idmask)
                        *t = '~';
                if (*t == '~')
                        t++;
-               *t = ToLower(*t);
+               *t = irctolower(*t);
                return mask_buf + old_mask_pos;
        }
 
@@ -851,7 +849,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
                        char buf[BANLEN];
                        banptr = ptr->data;
                        if(banptr->forward)
-                               rb_snprintf(buf, sizeof(buf), "%s$%s", banptr->banstr, banptr->forward);
+                               snprintf(buf, sizeof(buf), "%s$%s", banptr->banstr, banptr->forward);
                        else
                                rb_strlcpy(buf, banptr->banstr, sizeof(buf));
 
@@ -981,7 +979,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
                }
 
                if(removed && removed->forward)
-                       removed_mask_pos += rb_snprintf(buf + old_removed_mask_pos, sizeof(buf), "%s$%s", removed->banstr, removed->forward) + 1;
+                       removed_mask_pos += snprintf(buf + old_removed_mask_pos, sizeof(buf), "%s$%s", removed->banstr, removed->forward) + 1;
                else
                        removed_mask_pos += rb_strlcpy(buf + old_removed_mask_pos, mask, sizeof(buf)) + 1;
                if(removed)
@@ -1166,7 +1164,7 @@ chm_limit(struct Client *source_p, struct Channel *chptr,
                if(EmptyString(lstr) || (limit = atoi(lstr)) <= 0)
                        return;
 
-               rb_sprintf(limitstr, "%d", limit);
+               sprintf(limitstr, "%d", limit);
 
                mode_changes[mode_count].letter = c;
                mode_changes[mode_count].dir = MODE_ADD;
@@ -1741,14 +1739,15 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
                return;
 
        if(IsServer(source_p))
-               mlen = rb_sprintf(modebuf, ":%s MODE %s ", fakesource_p->name, chptr->chname);
+               mlen = sprintf(modebuf, ":%s MODE %s ", fakesource_p->name, chptr->chname);
        else
-               mlen = rb_sprintf(modebuf, ":%s!%s@%s MODE %s ",
+               mlen = sprintf(modebuf, ":%s!%s@%s MODE %s ",
                                  source_p->name, source_p->username,
                                  source_p->host, chptr->chname);
 
-       for(j = 0, flags = flags_list[0]; j < 3; j++, flags = flags_list[j])
+       for(j = 0; j < 3; j++)
        {
+               flags = flags_list[j];
                cur_len = mlen;
                mbuf = modebuf + mlen;
                pbuf = parabuf;
@@ -1807,7 +1806,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
                        if(mode_changes[i].arg != NULL)
                        {
                                paracount++;
-                               len = rb_sprintf(pbuf, "%s ", mode_changes[i].arg);
+                               len = sprintf(pbuf, "%s ", mode_changes[i].arg);
                                pbuf += len;
                                paralen += len;
                        }
@@ -1834,7 +1833,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
  */
 void
 set_channel_mlock(struct Client *client_p, struct Client *source_p,
-                 struct Channel *chptr, const char *newmlock, int propagate)
+                 struct Channel *chptr, const char *newmlock, bool propagate)
 {
        rb_free(chptr->mode_lock);
        chptr->mode_lock = newmlock ? rb_strdup(newmlock) : NULL;