Remove windows newlines (^M).

This commit is contained in:
Jilles Tjoelker 2008-04-20 15:47:53 +02:00
parent 121b641409
commit 5f7a6a3db2

View file

@ -63,7 +63,7 @@ DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision: 3225
static int valid_comment(char *comment); static int valid_comment(char *comment);
static int flush_write(struct Client *, FILE *, char *, char *); static int flush_write(struct Client *, FILE *, char *, char *);
static int remove_temp_dline(struct ConfItem *); static int remove_temp_dline(struct ConfItem *);
static int apply_dline(struct Client *, const char *, int, char *); static int apply_dline(struct Client *, const char *, int, char *);
static int apply_undline(struct Client *, const char *); static int apply_undline(struct Client *, const char *);
/* mo_dline() /* mo_dline()
@ -160,44 +160,44 @@ mo_undline(struct Client *client_p, struct Client *source_p, int parc, const cha
return 0; return 0;
} }
static int static int
me_dline(struct Client *client_p, struct Client *source_p, int parc, const char **parv) me_dline(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{ {
int tdline_time = atoi(parv[1]); int tdline_time = atoi(parv[1]);
/* Since this is coming over a server link, assume that the originating /* Since this is coming over a server link, assume that the originating
* server did the relevant permission/sanity checks... * server did the relevant permission/sanity checks...
*/ */
if(!IsPerson(source_p)) if(!IsPerson(source_p))
return 0; return 0;
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->servptr->name, tdline_time > 0 ? SHARED_TDLINE : SHARED_PDLINE)) source_p->servptr->name, tdline_time > 0 ? SHARED_TDLINE : SHARED_PDLINE))
{ {
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "undline failed %s %s %s", sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "undline failed %s %s %s",
source_p->name, parv[1], parv[2]); source_p->name, parv[1], parv[2]);
return 0; return 0;
} }
apply_dline(source_p, parv[2], tdline_time, LOCAL_COPY(parv[3])); apply_dline(source_p, parv[2], tdline_time, LOCAL_COPY(parv[3]));
check_dlines(); check_dlines();
return 0; return 0;
} }
static int static int
me_undline(struct Client *client_p, struct Client *source_p, int parc, const char **parv) me_undline(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{ {
if(!IsPerson(source_p)) if(!IsPerson(source_p))
return 0; return 0;
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->servptr->name, SHARED_UNDLINE)) source_p->servptr->name, SHARED_UNDLINE))
return 0; return 0;
apply_undline(source_p, parv[1]); apply_undline(source_p, parv[1]);
return 0; return 0;
} }
static int static int