* 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"
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));
*t = '~';
if (*t == '~')
t++;
- *t = ToLower(*t);
+ *t = irctolower(*t);
return mask_buf + old_mask_pos;
}
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));
}
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)
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;
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;
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;
}
*/
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;