mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 17:43:13 +02:00
More sendnumeric() and sendnumericfmt() conversions.
This commit is contained in:
@@ -136,14 +136,12 @@ CMD_FUNC(m_dccallow)
|
||||
if (!didlist && !myncmp(s, "list", 4))
|
||||
{
|
||||
didanything = didlist = 1;
|
||||
sendto_one(sptr, ":%s %d %s :The following users are on your dcc allow list:",
|
||||
me.name, RPL_DCCINFO, sptr->name);
|
||||
sendnumericfmt(sptr, RPL_DCCINFO, "The following users are on your dcc allow list:");
|
||||
for(lp = sptr->user->dccallow; lp; lp = lp->next)
|
||||
{
|
||||
if (lp->flags == DCC_LINK_REMOTE)
|
||||
continue;
|
||||
sendto_one(sptr, ":%s %d %s :%s (%s@%s)", me.name,
|
||||
RPL_DCCLIST, sptr->name, lp->value.cptr->name,
|
||||
sendnumericfmt(sptr, RPL_DCCLIST, "%s (%s@%s)", lp->value.cptr->name,
|
||||
lp->value.cptr->user->username,
|
||||
GetHost(lp->value.cptr));
|
||||
}
|
||||
@@ -153,7 +151,7 @@ CMD_FUNC(m_dccallow)
|
||||
{
|
||||
didanything = didhelp = 1;
|
||||
for(ptr = dcc_help; *ptr; ptr++)
|
||||
sendto_one(sptr, ":%s %d %s :%s", me.name, RPL_DCCINFO, sptr->name, *ptr);
|
||||
sendnumericfmt(sptr, RPL_DCCINFO, "%s", *ptr);
|
||||
sendnumeric(sptr, RPL_ENDOFDCCLIST, s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,8 +136,8 @@ CMD_FUNC(m_ircops)
|
||||
opers, opers != 1 ? "s" : "",
|
||||
aways);
|
||||
|
||||
sendto_one(sptr, ":%s %d %s :%s", me.name, RPL_TEXT, sptr->name, buf);
|
||||
sendto_one(sptr, ":%s %d %s :End of /IRCOPS list", me.name, RPL_TEXT, sptr->name);
|
||||
sendnumericfmt(sptr, RPL_TEXT, "%s", buf);
|
||||
sendnumericfmt(sptr, RPL_TEXT, "End of /IRCOPS list");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+6
-11
@@ -614,10 +614,8 @@ int size_string, ret;
|
||||
if ((fl = dcc_isforbidden(sptr, realfile)))
|
||||
{
|
||||
char *displayfile = dcc_displayfile(realfile);
|
||||
sendto_one(sptr,
|
||||
":%s %d %s :*** Cannot DCC SEND file %s to %s (%s)",
|
||||
me.name, RPL_TEXT,
|
||||
sptr->name, displayfile, target, fl->reason);
|
||||
sendnumericfmt(sptr,
|
||||
RPL_TEXT, "*** Cannot DCC SEND file %s to %s (%s)", displayfile, target, fl->reason);
|
||||
sendnotice(sptr, "*** You have been blocked from sending files, reconnect to regain permission to send files");
|
||||
sptr->flags |= FLAGS_DCCBLOCK;
|
||||
|
||||
@@ -630,10 +628,8 @@ int size_string, ret;
|
||||
if (!targetcli && ((fl = dcc_isdiscouraged(sptr, realfile))))
|
||||
{
|
||||
char *displayfile = dcc_displayfile(realfile);
|
||||
sendto_one(sptr,
|
||||
":%s %d %s :*** Cannot DCC SEND file %s to %s (%s)",
|
||||
me.name, RPL_TEXT,
|
||||
sptr->name, displayfile, target, fl->reason);
|
||||
sendnumericfmt(sptr,
|
||||
RPL_TEXT, "*** Cannot DCC SEND file %s to %s (%s)", displayfile, target, fl->reason);
|
||||
return 0; /* block */
|
||||
}
|
||||
return 1; /* allowed */
|
||||
@@ -686,9 +682,8 @@ int size_string;
|
||||
if (!on_dccallow_list(to, from))
|
||||
{
|
||||
char *displayfile = dcc_displayfile(realfile);
|
||||
sendto_one(from,
|
||||
":%s %d %s :*** Cannot DCC SEND file %s to %s (%s)",
|
||||
me.name, RPL_TEXT, from->name, displayfile, to->name, fl->reason);
|
||||
sendnumericfmt(from,
|
||||
RPL_TEXT, "*** Cannot DCC SEND file %s to %s (%s)", displayfile, to->name, fl->reason);
|
||||
sendnotice(from, "User %s is currently not accepting DCC SENDs with such a filename/filetype from you. "
|
||||
"Your file %s was not sent.", to->name, displayfile);
|
||||
sendnotice(to, "%s (%s@%s) tried to DCC SEND you a file named '%s', the request has been blocked.",
|
||||
|
||||
@@ -93,9 +93,7 @@ CMD_FUNC(m_motd)
|
||||
/* tm_year should be zero only if the struct is zero-ed */
|
||||
if (themotd && themotd->lines && themotd->last_modified.tm_year)
|
||||
{
|
||||
sendto_one(sptr, ":%s %d %s :- %d/%d/%d %d:%02d",
|
||||
me.name, RPL_MOTD, sptr->name,
|
||||
themotd->last_modified.tm_mday,
|
||||
sendnumericfmt(sptr, RPL_MOTD, "- %d/%d/%d %d:%02d", themotd->last_modified.tm_mday,
|
||||
themotd->last_modified.tm_mon + 1,
|
||||
themotd->last_modified.tm_year + 1900,
|
||||
themotd->last_modified.tm_hour,
|
||||
|
||||
@@ -189,7 +189,7 @@ CMD_FUNC(m_oper)
|
||||
/* Check oper::require_modes */
|
||||
if (operblock->require_modes & ~sptr->umodes)
|
||||
{
|
||||
sendto_one(sptr, ":%s %d %s :You are missing user modes required to OPER", me.name, ERR_NOOPERHOST, sptr->name);
|
||||
sendnumericfmt(sptr, ERR_NOOPERHOST, "You are missing user modes required to OPER");
|
||||
sendto_snomask_global
|
||||
(SNO_OPER, "Failed OPER attempt by %s (%s@%s) [lacking modes '%s' in oper::require-modes]",
|
||||
sptr->name, sptr->user->username, sptr->local->sockhost, get_modestr(operblock->require_modes & ~sptr->umodes));
|
||||
|
||||
Reference in New Issue
Block a user