summaryrefslogtreecommitdiff
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_dccallow.cpp')
-rw-r--r--src/modules/m_dccallow.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 45a230465..21cc97aa5 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -120,7 +120,7 @@ class CommandDccallow : public Command
}
else
{
- user->WriteNumeric(998, ":DCCALLOW command not understood. For help on DCCALLOW, type /DCCALLOW HELP");
+ user->WriteNumeric(998, "DCCALLOW command not understood. For help on DCCALLOW, type /DCCALLOW HELP");
return CMD_FAILURE;
}
}
@@ -143,7 +143,7 @@ class CommandDccallow : public Command
if (i->nickname == target->nick)
{
dl->erase(i);
- user->WriteNumeric(995, "%s :Removed %s from your DCCALLOW list", user->nick.c_str(), target->nick.c_str());
+ user->WriteNumeric(995, user->nick, InspIRCd::Format("Removed %s from your DCCALLOW list", target->nick.c_str()));
break;
}
}
@@ -153,7 +153,7 @@ class CommandDccallow : public Command
{
if (target == user)
{
- user->WriteNumeric(996, "%s :You cannot add yourself to your own DCCALLOW list!", user->nick.c_str());
+ user->WriteNumeric(996, user->nick, "You cannot add yourself to your own DCCALLOW list!");
return CMD_FAILURE;
}
@@ -168,7 +168,7 @@ class CommandDccallow : public Command
if (dl->size() >= maxentries)
{
- user->WriteNumeric(996, "%s :Too many nicks on DCCALLOW list", user->nick.c_str());
+ user->WriteNumeric(996, user->nick, "Too many nicks on DCCALLOW list");
return CMD_FAILURE;
}
@@ -176,7 +176,7 @@ class CommandDccallow : public Command
{
if (k->nickname == target->nick)
{
- user->WriteNumeric(996, "%s :%s is already on your DCCALLOW list", user->nick.c_str(), target->nick.c_str());
+ user->WriteNumeric(996, user->nick, InspIRCd::Format("%s is already on your DCCALLOW list", target->nick.c_str()));
return CMD_FAILURE;
}
}
@@ -207,11 +207,11 @@ class CommandDccallow : public Command
if (length > 0)
{
- user->WriteNumeric(993, "%s :Added %s to DCCALLOW list for %ld seconds", user->nick.c_str(), target->nick.c_str(), length);
+ user->WriteNumeric(993, user->nick, InspIRCd::Format("Added %s to DCCALLOW list for %ld seconds", target->nick.c_str(), length));
}
else
{
- user->WriteNumeric(994, "%s :Added %s to DCCALLOW list for this session", user->nick.c_str(), target->nick.c_str());
+ user->WriteNumeric(994, user->nick, InspIRCd::Format("Added %s to DCCALLOW list for this session", target->nick.c_str()));
}
/* route it. */
@@ -221,7 +221,7 @@ class CommandDccallow : public Command
else
{
// nick doesn't exist
- user->WriteNumeric(401, "%s :No such nick/channel", nick.c_str());
+ user->WriteNumeric(Numerics::NoSuchNick(nick));
return CMD_FAILURE;
}
}
@@ -236,8 +236,8 @@ class CommandDccallow : public Command
void DisplayHelp(User* user)
{
for (size_t i = 0; i < sizeof(helptext)/sizeof(helptext[0]); i++)
- user->WriteNumeric(998, ":%s", helptext[i]);
- user->WriteNumeric(999, ":End of DCCALLOW HELP");
+ user->WriteNumeric(998, helptext[i]);
+ user->WriteNumeric(999, "End of DCCALLOW HELP");
LocalUser* localuser = IS_LOCAL(user);
if (localuser)
@@ -247,18 +247,18 @@ class CommandDccallow : public Command
void DisplayDCCAllowList(User* user)
{
// display current DCCALLOW list
- user->WriteNumeric(990, ":Users on your DCCALLOW list:");
+ user->WriteNumeric(990, "Users on your DCCALLOW list:");
dl = ext.get(user);
if (dl)
{
for (dccallowlist::const_iterator c = dl->begin(); c != dl->end(); ++c)
{
- user->WriteNumeric(991, "%s :%s (%s)", user->nick.c_str(), c->nickname.c_str(), c->hostmask.c_str());
+ user->WriteNumeric(991, user->nick, InspIRCd::Format("%s (%s)", c->nickname.c_str(), c->hostmask.c_str()));
}
}
- user->WriteNumeric(992, ":End of DCCALLOW list");
+ user->WriteNumeric(992, "End of DCCALLOW list");
}
};
@@ -400,7 +400,7 @@ class ModuleDCCAllow : public Module
{
if (iter2->length != 0 && (iter2->set_on + iter2->length) <= ServerInstance->Time())
{
- u->WriteNumeric(997, "%s :DCCALLOW entry for %s has expired", u->nick.c_str(), iter2->nickname.c_str());
+ u->WriteNumeric(997, u->nick, InspIRCd::Format("DCCALLOW entry for %s has expired", iter2->nickname.c_str()));
iter2 = dl->erase(iter2);
}
else
@@ -435,7 +435,7 @@ class ModuleDCCAllow : public Module
{
u->WriteNotice(i->nickname + " left the network or changed their nickname and has been removed from your DCCALLOW list");
- u->WriteNumeric(995, "%s :Removed %s from your DCCALLOW list", u->nick.c_str(), i->nickname.c_str());
+ u->WriteNumeric(995, u->nick, InspIRCd::Format("Removed %s from your DCCALLOW list", i->nickname.c_str()));
dl->erase(i);
break;
}