mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
More done
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9759 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
89a8dff5f6
commit
e3bd782207
@ -122,7 +122,7 @@ public:
|
||||
if (whotoadd)
|
||||
atleastonechange = AddAccept(user, whotoadd, false) || atleastonechange;
|
||||
else
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, tok.c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), tok.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,9 +135,9 @@ public:
|
||||
if (dat)
|
||||
{
|
||||
for (std::set<User*>::iterator i = dat->accepting.begin(); i != dat->accepting.end(); ++i)
|
||||
user->WriteNumeric(281, "%s %s", user->nick, (*i)->nick);
|
||||
user->WriteNumeric(281, "%s %s", user->nick.c_str(), (*i)->nick.c_str());
|
||||
}
|
||||
user->WriteNumeric(282, "%s :End of ACCEPT list", user->nick);
|
||||
user->WriteNumeric(282, "%s :End of ACCEPT list", user->nick.c_str());
|
||||
}
|
||||
|
||||
bool AddAccept(User* user, User* whotoadd, bool quiet)
|
||||
@ -147,14 +147,14 @@ public:
|
||||
if (accepting.size() >= maxaccepts)
|
||||
{
|
||||
if (!quiet)
|
||||
user->WriteNumeric(456, "%s :Accept list is full (limit is %d)", user->nick, maxaccepts);
|
||||
user->WriteNumeric(456, "%s :Accept list is full (limit is %d)", user->nick.c_str(), maxaccepts);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!accepting.insert(whotoadd).second)
|
||||
{
|
||||
if (!quiet)
|
||||
user->WriteNumeric(457, "%s %s :is already on your accept list", user->nick, whotoadd->nick);
|
||||
user->WriteNumeric(457, "%s %s :is already on your accept list", user->nick.c_str(), whotoadd->nick.c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -167,7 +167,7 @@ public:
|
||||
if (!dat)
|
||||
{
|
||||
if (!quiet)
|
||||
user->WriteNumeric(458, "%s %s :is not on your accept list", user->nick, whotoremove->nick);
|
||||
user->WriteNumeric(458, "%s %s :is not on your accept list", user->nick.c_str(), whotoremove->nick.c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -176,7 +176,7 @@ public:
|
||||
if (i == accepting.end())
|
||||
{
|
||||
if (!quiet)
|
||||
user->WriteNumeric(458, "%s %s :is not on your accept list", user->nick, whotoremove->nick);
|
||||
user->WriteNumeric(458, "%s %s :is not on your accept list", user->nick.c_str(), whotoremove->nick.c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -256,11 +256,11 @@ public:
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
/* +g and *not* accepted */
|
||||
user->WriteNumeric(716, "%s %s :is in +g mode (server-side ignore).", user->nick, dest->nick);
|
||||
user->WriteNumeric(716, "%s %s :is in +g mode (server-side ignore).", user->nick.c_str(), dest->nick.c_str());
|
||||
if (now > (lastnotify + (time_t)notify_cooldown))
|
||||
{
|
||||
user->WriteNumeric(717, "%s %s :has been informed that you messaged them.", user->nick, dest->nick);
|
||||
dest->WriteNumeric(718, "%s %s %s@%s :is messaging you, and you have umode +g", dest->nick, user->nick, user->ident, user->dhost);
|
||||
user->WriteNumeric(717, "%s %s :has been informed that you messaged them.", user->nick.c_str(), dest->nick.c_str());
|
||||
dest->WriteNumeric(718, "%s %s %s@%s :is messaging you, and you have umode +g", dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str());
|
||||
lastnotify = now;
|
||||
}
|
||||
return 1;
|
||||
|
@ -42,7 +42,7 @@ class ModuleChanCreate : public Module
|
||||
{
|
||||
if (channel->GetUserCounter() == 1)
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name, user->nick, user->ident, user->host);
|
||||
ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name, user->nick.c_str(), user->ident.c_str(), user->host);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ class ChanFilter : public ListModeBase
|
||||
{
|
||||
if ((word.length() > 35) || (word.empty()))
|
||||
{
|
||||
user->WriteNumeric(935, "%s %s %s :word is too %s for censor list",user->nick, chan->name,word.c_str(), (word.empty() ? "short" : "long"));
|
||||
user->WriteNumeric(935, "%s %s %s :word is too %s for censor list",user->nick.c_str(), chan->name,word.c_str(), (word.empty() ? "short" : "long"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -40,18 +40,18 @@ class ChanFilter : public ListModeBase
|
||||
|
||||
virtual bool TellListTooLong(User* user, Channel* chan, std::string &word)
|
||||
{
|
||||
user->WriteNumeric(939, "%s %s %s :Channel spamfilter list is full",user->nick, chan->name, word.c_str());
|
||||
user->WriteNumeric(939, "%s %s %s :Channel spamfilter list is full",user->nick.c_str(), chan->name, word.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void TellAlreadyOnList(User* user, Channel* chan, std::string &word)
|
||||
{
|
||||
user->WriteNumeric(937, "%s %s :The word %s is already on the spamfilter list",user->nick, chan->name,word.c_str());
|
||||
user->WriteNumeric(937, "%s %s :The word %s is already on the spamfilter list",user->nick.c_str(), chan->name,word.c_str());
|
||||
}
|
||||
|
||||
virtual void TellNotSet(User* user, Channel* chan, std::string &word)
|
||||
{
|
||||
user->WriteNumeric(938, "%s %s :No such spamfilter word is set",user->nick, chan->name);
|
||||
user->WriteNumeric(938, "%s %s :No such spamfilter word is set",user->nick.c_str(), chan->name);
|
||||
}
|
||||
};
|
||||
|
||||
@ -101,7 +101,7 @@ class ModuleChanFilter : public Module
|
||||
{
|
||||
if (line.find(i->mask.c_str()) != std::string::npos)
|
||||
{
|
||||
user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked",user->nick, chan->name, i->mask.c_str());
|
||||
user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked",user->nick.c_str(), chan->name, i->mask.c_str());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -103,10 +103,10 @@ class FounderProtectBase
|
||||
{
|
||||
if (i->first->GetExt(item))
|
||||
{
|
||||
user->WriteServ("%d %s %s %s", list, user->nick, channel->name,i->first->nick);
|
||||
user->WriteServ("%d %s %s %s", list, user->nick.c_str(), channel->name,i->first->nick.c_str());
|
||||
}
|
||||
}
|
||||
user->WriteServ("%d %s %s :End of channel %s list", end, user->nick, channel->name, type.c_str());
|
||||
user->WriteServ("%d %s %s :End of channel %s list", end, user->nick.c_str(), channel->name, type.c_str());
|
||||
}
|
||||
|
||||
User* FindAndVerify(std::string ¶meter, Channel* channel)
|
||||
@ -196,7 +196,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
|
||||
// source is a server, or ulined, we'll let them +-q the user.
|
||||
if (source == ServerInstance->FakeClient ||
|
||||
((source == theuser) && (!adding) && (FounderProtectBase::remove_own_privs)) ||
|
||||
(ServerInstance->ULine(source->nick)) ||
|
||||
(ServerInstance->ULine(source->nick.c_str())) ||
|
||||
(ServerInstance->ULine(source->server)) ||
|
||||
(!*source->server) ||
|
||||
(!IS_LOCAL(source)))
|
||||
@ -206,7 +206,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
|
||||
else
|
||||
{
|
||||
// whoops, someones being naughty!
|
||||
source->WriteNumeric(468, "%s %s :Only servers may set channel mode +q",source->nick, channel->name);
|
||||
source->WriteNumeric(468, "%s %s :Only servers may set channel mode +q",source->nick.c_str(), channel->name);
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
@ -262,7 +262,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
|
||||
// source has +q, is a server, or ulined, we'll let them +-a the user.
|
||||
if (source == ServerInstance->FakeClient ||
|
||||
((source == theuser) && (!adding) && (FounderProtectBase::remove_own_privs)) ||
|
||||
(ServerInstance->ULine(source->nick)) ||
|
||||
(ServerInstance->ULine(source->nick.c_str())) ||
|
||||
(ServerInstance->ULine(source->server)) ||
|
||||
(!*source->server) ||
|
||||
(source->GetExt(founder)) ||
|
||||
@ -273,7 +273,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
|
||||
else
|
||||
{
|
||||
// bzzzt, wrong answer!
|
||||
source->WriteNumeric(482, "%s %s :You are not a channel founder",source->nick, channel->name);
|
||||
source->WriteNumeric(482, "%s %s :You are not a channel founder",source->nick.c_str(), channel->name);
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
}
|
||||
@ -388,7 +388,7 @@ class ModuleChanProtect : public Module
|
||||
// will appear in the names list for the user.. remove if desired -Special
|
||||
|
||||
if (FirstInGetsFounder && channel->GetUserCounter() == 1)
|
||||
user->WriteServ("MODE %s +q %s", channel->name, user->nick);
|
||||
user->WriteServ("MODE %s +q %s", channel->name, user->nick.c_str());
|
||||
}
|
||||
|
||||
virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
|
||||
@ -405,7 +405,7 @@ class ModuleChanProtect : public Module
|
||||
|
||||
// firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode
|
||||
// without any access checks, we're not worthy :p
|
||||
if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server))
|
||||
if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server))
|
||||
return ACR_ALLOW;
|
||||
|
||||
std::string founder = "cm_founder_"+std::string(channel->name);
|
||||
|
@ -71,7 +71,7 @@ class CommandCheck : public Command
|
||||
if (IS_OPER(targuser))
|
||||
{
|
||||
/* user is an oper of type ____ */
|
||||
user->WriteServ(checkstr + " opertype " + irc::Spacify(targuser->oper));
|
||||
user->WriteServ(checkstr + " opertype " + irc::Spacify(targuser->oper.c_str()));
|
||||
}
|
||||
|
||||
if (IS_LOCAL(targuser))
|
||||
@ -119,7 +119,7 @@ class CommandCheck : public Command
|
||||
/*
|
||||
* Unlike Asuka, I define a clone as coming from the same host. --w00t
|
||||
*/
|
||||
snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", ServerInstance->Users->GlobalCloneCount(i->first), targchan->GetAllPrefixChars(i->first), i->first->nick, i->first->ident, i->first->dhost, i->first->fullname);
|
||||
snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", ServerInstance->Users->GlobalCloneCount(i->first), targchan->GetAllPrefixChars(i->first), i->first->nick.c_str(), i->first->ident.c_str(), i->first->dhost.c_str(), i->first->fullname.c_str());
|
||||
user->WriteServ(checkstr + " member " + tmpbuf);
|
||||
}
|
||||
}
|
||||
|
@ -43,20 +43,20 @@ class CommandChghost : public Command
|
||||
}
|
||||
if (parameters[0].empty())
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** CHGHOST: Host must be specified", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** CHGHOST: Host must be specified", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if ((parameters[1].c_str() - x) > 63)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
User* dest = ServerInstance->FindNick(parameters[0]);
|
||||
|
||||
if (!dest)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -33,32 +33,32 @@ class CommandChgident : public Command
|
||||
|
||||
if (!dest)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (parameters[1].empty())
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Ident must be specified", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Ident must be specified", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (parameters[1].length() > IDENTMAX - 1)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Ident is too long", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Ident is too long", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (!ServerInstance->IsIdent(parameters[1].c_str()))
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Invalid characters in ident", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** CHGIDENT: Invalid characters in ident", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
dest->ChangeIdent(parameters[1].c_str());
|
||||
|
||||
if (!ServerInstance->ULine(user->server))
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used CHGIDENT to change %s's ident to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->ident.c_str());
|
||||
|
||||
/* route it! */
|
||||
return CMD_SUCCESS;
|
||||
|
@ -33,26 +33,26 @@ class CommandChgname : public Command
|
||||
|
||||
if (!dest)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (parameters[1].empty())
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** GECOS must be specified", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** GECOS must be specified", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (parameters[1].length() > MAXGECOS)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** GECOS too long", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** GECOS too long", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (IS_LOCAL(dest))
|
||||
{
|
||||
dest->ChangeName(parameters[1].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used CHGNAME to change %s's real name to '%s'", user->nick, dest->nick, dest->fullname);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used CHGNAME to change %s's real name to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->fullname.c_str());
|
||||
return CMD_LOCALONLY; /* name change routed by FNAME in spanningtree now */
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ class ModuleCloaking : public Module
|
||||
/* Check if they have a cloaked host, but are not using it */
|
||||
if (user->GetExt("cloaked_host", tofree) && *tofree != user->dhost)
|
||||
{
|
||||
snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, tofree->c_str());
|
||||
snprintf(mask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), tofree->c_str());
|
||||
for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
|
||||
{
|
||||
if (match(mask,i->data))
|
||||
|
@ -41,13 +41,13 @@ class CommandClose : public Command
|
||||
int total = 0;
|
||||
for (std::map<std::string,int>::iterator ci = closed.begin(); ci != closed.end(); ci++)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Closed %d unknown connection%s from [%s]",user->nick,(*ci).second,((*ci).second>1)?"s":"",(*ci).first.c_str());
|
||||
user->WriteServ("NOTICE %s :*** Closed %d unknown connection%s from [%s]",user->nick.c_str(),(*ci).second,((*ci).second>1)?"s":"",(*ci).first.c_str());
|
||||
total += (*ci).second;
|
||||
}
|
||||
if (total)
|
||||
user->WriteServ("NOTICE %s :*** %i unknown connection%s closed",user->nick,total,(total>1)?"s":"");
|
||||
user->WriteServ("NOTICE %s :*** %i unknown connection%s closed",user->nick.c_str(),total,(total>1)?"s":"");
|
||||
else
|
||||
user->WriteServ("NOTICE %s :*** No unknown connections found",user->nick);
|
||||
user->WriteServ("NOTICE %s :*** No unknown connections found",user->nick.c_str());
|
||||
|
||||
return CMD_LOCALONLY;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ class ModulePrivacyMode : public Module
|
||||
User* t = (User*)dest;
|
||||
if (!IS_OPER(user) && (t->IsModeSet('c')) && (!ServerInstance->ULine(user->server)) && !user->SharesChannelWith(t))
|
||||
{
|
||||
user->WriteNumeric(531, "%s %s :You are not permitted to send private messages to this user (+c set)", user->nick, t->nick);
|
||||
user->WriteNumeric(531, "%s %s :You are not permitted to send private messages to this user (+c set)", user->nick.c_str(), t->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class ModuleWaitPong : public Module
|
||||
user->Write("PING :%s", pingrpl);
|
||||
|
||||
if(sendsnotice)
|
||||
user->WriteServ("NOTICE %s :*** If you are having problems connecting due to ping timeouts, please type /quote PONG %s or /raw PONG %s now.", user->nick, pingrpl, pingrpl);
|
||||
user->WriteServ("NOTICE %s :*** If you are having problems connecting due to ping timeouts, please type /quote PONG %s or /raw PONG %s now.", user->nick.c_str(), pingrpl, pingrpl);
|
||||
|
||||
user->Extend(extenstr, pingrpl);
|
||||
return 0;
|
||||
|
@ -51,8 +51,8 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
|
||||
char TheHost[MAXBUF];
|
||||
char TheIP[MAXBUF];
|
||||
|
||||
snprintf(TheHost,MAXBUF,"%s@%s",user->ident,user->host);
|
||||
snprintf(TheIP, MAXBUF,"%s@%s",user->ident,user->GetIPString());
|
||||
snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host);
|
||||
snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString());
|
||||
|
||||
ConfigReader Conf(ServerInstance);
|
||||
for (int i=0; i<Conf.Enumerate("title"); i++)
|
||||
@ -85,9 +85,9 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
|
||||
|
||||
if (!ServerInstance->ULine(user->server))
|
||||
// Ulines set TITLEs silently
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used TITLE to set custom title '%s'",user->nick,title.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used TITLE to set custom title '%s'",user->nick.c_str(),title.c_str());
|
||||
|
||||
user->WriteServ("NOTICE %s :Custom title set to '%s'",user->nick, title.c_str());
|
||||
user->WriteServ("NOTICE %s :Custom title set to '%s'",user->nick.c_str(), title.c_str());
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -95,9 +95,9 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
|
||||
|
||||
if (!ServerInstance->ULine(user->server))
|
||||
// Ulines also fail TITLEs silently
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "Failed TITLE attempt by %s!%s@%s using login '%s'",user->nick,user->ident,user->host,parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "Failed TITLE attempt by %s!%s@%s using login '%s'",user->nick.c_str(),user->ident.c_str(),user->host,parameters[0].c_str());
|
||||
|
||||
user->WriteServ("NOTICE %s :Invalid title credentials",user->nick);
|
||||
user->WriteServ("NOTICE %s :Invalid title credentials",user->nick.c_str());
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ class ModuleCustomTitle : public Module
|
||||
dest->GetExt("ctitle", ctitle);
|
||||
if (ctitle)
|
||||
{
|
||||
ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick,dest->nick,ctitle->c_str());
|
||||
ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick.c_str(), dest->nick.c_str(), ctitle->c_str());
|
||||
}
|
||||
}
|
||||
/* Dont block anything */
|
||||
|
@ -40,7 +40,7 @@ class CommandCycle : public Command
|
||||
|
||||
if (!channel)
|
||||
{
|
||||
user->WriteNumeric(403, "%s %s :No such channel", user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(403, "%s %s :No such channel", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ class CommandCycle : public Command
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteNumeric(442, "%s %s :You're not on that channel", user->nick, channel->name);
|
||||
user->WriteNumeric(442, "%s %s :You're not on that channel", user->nick.c_str(), channel->name);
|
||||
}
|
||||
|
||||
return CMD_FAILURE;
|
||||
|
@ -134,12 +134,12 @@ class CommandFilter : public Command
|
||||
/* Deleting a filter */
|
||||
if (Base->DeleteFilter(parameters[0]))
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Deleted filter '%s'", user->nick, parameters[0].c_str());
|
||||
user->WriteServ("NOTICE %s :*** Deleted filter '%s'", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Filter '%s' not found on list.", user->nick, parameters[0].c_str());
|
||||
user->WriteServ("NOTICE %s :*** Filter '%s' not found on list.", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -157,7 +157,7 @@ class CommandFilter : public Command
|
||||
|
||||
if ((type != "gline") && (type != "none") && (type != "block") && (type != "kill") && (type != "silent"))
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Invalid filter type '%s'. Supported types are 'gline', 'none', 'block', 'silent' and 'kill'.", user->nick, freeform.c_str());
|
||||
user->WriteServ("NOTICE %s :*** Invalid filter type '%s'. Supported types are 'gline', 'none', 'block', 'silent' and 'kill'.", user->nick.c_str(), freeform.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -181,14 +181,14 @@ class CommandFilter : public Command
|
||||
std::pair<bool, std::string> result = Base->AddFilter(freeform, type, reason, duration, flags);
|
||||
if (result.first)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Added filter '%s', type '%s'%s%s, flags '%s', reason: '%s'", user->nick, freeform.c_str(),
|
||||
user->WriteServ("NOTICE %s :*** Added filter '%s', type '%s'%s%s, flags '%s', reason: '%s'", user->nick.c_str(), freeform.c_str(),
|
||||
type.c_str(), (duration ? " duration: " : ""), (duration ? parameters[3].c_str() : ""),
|
||||
flags.c_str(), reason.c_str());
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Filter '%s' could not be added: %s", user->nick, freeform.c_str(), result.second.c_str());
|
||||
user->WriteServ("NOTICE %s :*** Filter '%s' could not be added: %s", user->nick.c_str(), freeform.c_str(), result.second.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -203,7 +203,7 @@ class CommandFilter : public Command
|
||||
|
||||
void TooFewParams(User* user, const std::string &extra_text)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Not enough parameters%s", user->nick, extra_text.c_str());
|
||||
user->WriteServ("NOTICE %s :*** Not enough parameters%s", user->nick.c_str(), extra_text.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@ -289,7 +289,7 @@ int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::stri
|
||||
delete gl;
|
||||
}
|
||||
|
||||
ServerInstance->Logs->Log("FILTER",DEFAULT,"FILTER: "+std::string(user->nick)+std::string(" had their message filtered, target was ")+target+": "+f->reason+" Action: "+f->action);
|
||||
ServerInstance->Logs->Log("FILTER",DEFAULT,"FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + f->action);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -363,7 +363,7 @@ int FilterBase::OnPreCommand(const std::string &command, const std::vector<std::
|
||||
/* Are they parting, if so, kill is applicable */
|
||||
if ((parting) && (f->action == "kill"))
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** Your PART message was filtered: %s", user->nick, f->reason.c_str());
|
||||
user->WriteServ("NOTICE %s :*** Your PART message was filtered: %s", user->nick.c_str(), f->reason.c_str());
|
||||
ServerInstance->Users->QuitUser(user, "Filtered: " + f->reason);
|
||||
}
|
||||
if (f->action == "gline")
|
||||
|
@ -35,16 +35,16 @@ class CommandGloadmodule : public Command
|
||||
{
|
||||
if (ServerInstance->Modules->Load(parameters[0].c_str()))
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0].c_str(), user->nick);
|
||||
user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0].c_str(), user->nick.c_str());
|
||||
user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
user->WriteNumeric(974, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL LOAD BY '%s' (not loaded here)",parameters[0].c_str(), user->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL LOAD BY '%s' (not loaded here)",parameters[0].c_str(), user->nick.c_str());
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -69,16 +69,16 @@ class CommandGunloadmodule : public Command
|
||||
{
|
||||
if (ServerInstance->Modules->Unload(parameters[0].c_str()))
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0].c_str(), user->nick);
|
||||
user->WriteNumeric(973, "%s %s :Module successfully unloaded.",user->nick, parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0].c_str(), user->nick.c_str());
|
||||
user->WriteNumeric(973, "%s %s :Module successfully unloaded.",user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
user->WriteNumeric(972, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL UNLOAD BY '%s' (not unloaded here)",parameters[0].c_str(), user->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL UNLOAD BY '%s' (not unloaded here)",parameters[0].c_str(), user->nick.c_str());
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -103,17 +103,17 @@ class CommandGreloadmodule : public Command
|
||||
{
|
||||
if (!ServerInstance->Modules->Unload(parameters[0].c_str()))
|
||||
{
|
||||
user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
user->WriteNumeric(972, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
}
|
||||
if (!ServerInstance->Modules->Load(parameters[0].c_str()))
|
||||
{
|
||||
user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
user->WriteNumeric(974, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
|
||||
}
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY RELOADED BY '%s'",parameters[0].c_str(), user->nick);
|
||||
user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY RELOADED BY '%s'",parameters[0].c_str(), user->nick.c_str());
|
||||
user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
else
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL RELOAD BY '%s' (not reloaded here)",parameters[0].c_str(), user->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL RELOAD BY '%s' (not reloaded here)",parameters[0].c_str(), user->nick.c_str());
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ class MsgFlood : public ModeHandler
|
||||
int nsecs = atoi(secs);
|
||||
if ((nlines<1) || (nsecs<1))
|
||||
{
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick,channel->name);
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name);
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
@ -177,7 +177,7 @@ class MsgFlood : public ModeHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick,channel->name);
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name);
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ class NickFlood : public ModeHandler
|
||||
int nsecs = atoi(secs);
|
||||
if ((nnicks<1) || (nsecs<1))
|
||||
{
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick,channel->name);
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name);
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
@ -184,7 +184,7 @@ class NickFlood : public ModeHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick,channel->name);
|
||||
source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name);
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
}
|
||||
@ -238,7 +238,7 @@ class ModuleNickFlood : public Module
|
||||
|
||||
if (f->islocked())
|
||||
{
|
||||
user->WriteNumeric(447, "%s :%s has been locked for nickchanges for 60 seconds because there have been more than %d nick changes in %d seconds", user->nick, channel->name, f->nicks, f->secs);
|
||||
user->WriteNumeric(447, "%s :%s has been locked for nickchanges for 60 seconds because there have been more than %d nick changes in %d seconds", user->nick.c_str(), channel->name, f->nicks, f->secs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ class CommandNicklock : public Command
|
||||
// check if user is locked
|
||||
if (target->GetExt("nick_locked", dummy))
|
||||
{
|
||||
user->WriteNumeric(946, "%s %s :This user's nickname is already locked.",user->nick,target->nick);
|
||||
user->WriteNumeric(946, "%s %s :This user's nickname is already locked.",user->nick.c_str(),target->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ class CommandNickunlock : public Command
|
||||
if (target)
|
||||
{
|
||||
target->Shrink("nick_locked");
|
||||
user->WriteNumeric(945, "%s %s :Nickname now unlocked.",user->nick,target->nick);
|
||||
user->WriteNumeric(945, "%s %s :Nickname now unlocked.",user->nick.c_str(),target->nick.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used NICKUNLOCK on "+parameters[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@ -132,7 +132,7 @@ class ModuleNickLock : public Module
|
||||
|
||||
if (user->GetExt("nick_locked", n))
|
||||
{
|
||||
user->WriteNumeric(447, "%s :You cannot change your nickname (your nick is locked)",user->nick);
|
||||
user->WriteNumeric(447, "%s :You cannot change your nickname (your nick is locked)",user->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -57,7 +57,7 @@ class ModuleOperLevels : public Module
|
||||
for (int j =0; j < conf->Enumerate("type"); j++)
|
||||
{
|
||||
std::string typen = conf->ReadValue("type","name",j);
|
||||
if (!strcmp(typen.c_str(),dest->oper))
|
||||
if (typen == dest->oper)
|
||||
{
|
||||
dest_level = conf->ReadInteger("type","level",j,true);
|
||||
break;
|
||||
@ -66,7 +66,7 @@ class ModuleOperLevels : public Module
|
||||
for (int k =0; k < conf->Enumerate("type"); k++)
|
||||
{
|
||||
std::string typen = conf->ReadValue("type","name",k);
|
||||
if (!strcmp(typen.c_str(),source->oper))
|
||||
if (typen == source->oper)
|
||||
{
|
||||
source_level = conf->ReadInteger("type","level",k,true);
|
||||
break;
|
||||
@ -74,9 +74,9 @@ class ModuleOperLevels : public Module
|
||||
}
|
||||
if (dest_level > source_level)
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick,source_level,dest->nick,dest_level,reason.c_str());
|
||||
dest->WriteServ("NOTICE %s :Oper %s attempted to /kill you!",dest->nick,source->nick);
|
||||
source->WriteNumeric(481, "%s :Permission Denied - Oper %s is a higher level than you",source->nick,dest->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick.c_str(),source_level,dest->nick.c_str(),dest_level,reason.c_str());
|
||||
dest->WriteServ("NOTICE %s :Oper %s attempted to /kill you!",dest->nick.c_str(),source->nick.c_str());
|
||||
source->WriteNumeric(481, "%s :Permission Denied - Oper %s is a higher level than you",source->nick.c_str(),dest->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ class ModuleOperLog : public Module
|
||||
for (int j = 0; j < (int)parameters.size(); j++)
|
||||
plist.append(std::string(" ")+parameters[j]);
|
||||
|
||||
ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str());
|
||||
}
|
||||
ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick.c_str(), user->ident.c_str(), user->host, command.c_str(), plist.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -242,12 +242,12 @@ class ModuleOverride : public Module
|
||||
if (RequireKey && keygiven != "override")
|
||||
{
|
||||
// Can't join normally -- must use a special key to bypass restrictions
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick);
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +i on "+std::string(cname));
|
||||
}
|
||||
return -1;
|
||||
@ -258,12 +258,12 @@ class ModuleOverride : public Module
|
||||
if (RequireKey && keygiven != "override")
|
||||
{
|
||||
// Can't join normally -- must use a special key to bypass restrictions
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick);
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +k on "+std::string(cname));
|
||||
return -1;
|
||||
}
|
||||
@ -273,12 +273,12 @@ class ModuleOverride : public Module
|
||||
if (RequireKey && keygiven != "override")
|
||||
{
|
||||
// Can't join normally -- must use a special key to bypass restrictions
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick);
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +l on "+std::string(cname));
|
||||
return -1;
|
||||
}
|
||||
@ -290,13 +290,13 @@ class ModuleOverride : public Module
|
||||
if (RequireKey && keygiven != "override")
|
||||
{
|
||||
// Can't join normally -- must use a special key to bypass restrictions
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick, cname);
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -43,12 +43,12 @@ class CommandMkpasswd : public Command
|
||||
/* Yup, reset it first (Always ALWAYS do this) */
|
||||
HashResetRequest(Sender, x->second).Send();
|
||||
/* Now attempt to generate a hash */
|
||||
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",user->nick, algo, stuff, HashSumRequest(Sender, x->second, stuff).Send() );
|
||||
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",user->nick.c_str(), algo, stuff, HashSumRequest(Sender, x->second, stuff).Send() );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* I dont do flying, bob. */
|
||||
user->WriteServ("NOTICE %s :Unknown hash type, valid hash types are: %s", user->nick, irc::stringjoiner(", ", names, 0, names.size() - 1).GetJoined().c_str() );
|
||||
user->WriteServ("NOTICE %s :Unknown hash type, valid hash types are: %s", user->nick.c_str(), irc::stringjoiner(", ", names, 0, names.size() - 1).GetJoined().c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ class ModuleProxy : public Module
|
||||
p->Close();
|
||||
delete p;
|
||||
user->Shrink("proxy_socket");
|
||||
ServerInstance->Logs->Log("m_proxyscan",DEBUG, "Removed proxy socket from %s", user->nick);
|
||||
ServerInstance->Logs->Log("m_proxyscan",DEBUG, "Removed proxy socket from %s", user->nick.c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -40,11 +40,11 @@ class CommandRandquote : public Command
|
||||
{
|
||||
fsize = quotes->FileSize();
|
||||
str = quotes->GetLine(rand() % fsize);
|
||||
user->WriteServ("NOTICE %s :%s%s%s",user->nick,prefix.c_str(),str.c_str(),suffix.c_str());
|
||||
user->WriteServ("NOTICE %s :%s%s%s",user->nick.c_str(),prefix.c_str(),str.c_str(),suffix.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ("NOTICE %s :Your administrator specified an invalid quotes file, please bug them about this.", user->nick);
|
||||
user->WriteServ("NOTICE %s :Your administrator specified an invalid quotes file, please bug them about this.", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class Redirect : public ModeHandler
|
||||
|
||||
if (!ServerInstance->IsChannel(parameter.c_str()))
|
||||
{
|
||||
source->WriteNumeric(403, "%s %s :Invalid channel name",source->nick, parameter.c_str());
|
||||
source->WriteNumeric(403, "%s %s :Invalid channel name",source->nick.c_str(), parameter.c_str());
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
@ -57,7 +57,7 @@ class Redirect : public ModeHandler
|
||||
{
|
||||
if ((c == channel) || (c->IsModeSet('L')))
|
||||
{
|
||||
source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick,parameter.c_str());
|
||||
source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick.c_str(),parameter.c_str());
|
||||
parameter.clear();
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
@ -67,7 +67,7 @@ class Redirect : public ModeHandler
|
||||
{
|
||||
if ((i->second != channel) && (i->second->IsModeSet('L')) && (irc::string(i->second->GetModeParameter('L').c_str()) == irc::string(channel->name)))
|
||||
{
|
||||
source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick,parameter.c_str(),i->second->name);
|
||||
source->WriteNumeric(690, "%s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick.c_str(),parameter.c_str(),i->second->name);
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
}
|
||||
@ -127,11 +127,11 @@ class ModuleRedirect : public Module
|
||||
destchan = ServerInstance->FindChan(channel);
|
||||
if (destchan && destchan->IsModeSet('L'))
|
||||
{
|
||||
user->WriteNumeric(470, "%s :%s is full, but has a circular redirect (+L), not following redirection to %s", user->nick, cname, channel.c_str());
|
||||
user->WriteNumeric(470, "%s :%s is full, but has a circular redirect (+L), not following redirection to %s", user->nick.c_str(), cname, channel.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
user->WriteNumeric(470, "%s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick, cname, channel.c_str());
|
||||
user->WriteNumeric(470, "%s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick.c_str(), cname, channel.c_str());
|
||||
Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time());
|
||||
return 1;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class ModuleRegOnlyCreate : public Module
|
||||
|
||||
if ((!user->IsModeSet('r')) && (!user->GetExt("accountname")))
|
||||
{
|
||||
user->WriteNumeric(482, "%s %s :You must have a registered nickname to create a new channel", user->nick, cname);
|
||||
user->WriteNumeric(482, "%s %s :You must have a registered nickname to create a new channel", user->nick.c_str(), cname);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -99,13 +99,13 @@ class RemoveBase
|
||||
/* Fix by brain - someone needs to learn to validate their input! */
|
||||
if (!target || !channel)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, !target ? username : channame);
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), !target ? username : channame);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
if (!channel->HasUser(target))
|
||||
{
|
||||
user->WriteServ( "NOTICE %s :*** The user %s is not on channel %s", user->nick, target->nick, channel->name);
|
||||
user->WriteServ( "NOTICE %s :*** The user %s is not on channel %s", user->nick.c_str(), target->nick.c_str(), channel->name);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ class RemoveBase
|
||||
protectkey = "cm_protect_" + std::string(channel->name);
|
||||
founderkey = "cm_founder_" + std::string(channel->name);
|
||||
|
||||
if (ServerInstance->ULine(user->server) || ServerInstance->ULine(user->nick))
|
||||
if (ServerInstance->ULine(user->server) || ServerInstance->ULine(user->nick.c_str()))
|
||||
{
|
||||
ulevel = chartolevel("U");
|
||||
}
|
||||
@ -132,7 +132,7 @@ class RemoveBase
|
||||
}
|
||||
|
||||
/* Now it's the same idea, except for the target. If they're ulined make sure they get a higher level than the sender can */
|
||||
if (ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick))
|
||||
if (ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick.c_str()))
|
||||
{
|
||||
tlevel = chartolevel("U");
|
||||
}
|
||||
@ -177,22 +177,22 @@ class RemoveBase
|
||||
/* Build up the part reason string. */
|
||||
reason = std::string("Removed by ") + user->nick + ": " + reasonparam;
|
||||
|
||||
channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name, user->nick, target->nick);
|
||||
target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick, user->nick, channel->name, reasonparam.c_str());
|
||||
channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name, user->nick.c_str(), target->nick.c_str());
|
||||
target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name, reasonparam.c_str());
|
||||
|
||||
if (!channel->PartUser(target, reason.c_str()))
|
||||
delete channel;
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ( "NOTICE %s :*** You do not have access to /remove %s from %s", user->nick, target->nick, channel->name);
|
||||
user->WriteServ( "NOTICE %s :*** You do not have access to /remove %s from %s", user->nick.c_str(), target->nick.c_str(), channel->name);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* m_nokicks.so was loaded and +Q was set, block! */
|
||||
user->WriteServ( "484 %s %s :Can't remove user %s from channel (+Q set)", user->nick, channel->name, target->nick);
|
||||
user->WriteServ( "484 %s %s :Can't remove user %s from channel (+Q set)", user->nick.c_str(), channel->name, target->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class ModuleRestrictChans : public Module
|
||||
// channel does not yet exist (record is null, about to be created IF we were to allow it)
|
||||
if (!chan)
|
||||
{
|
||||
user->WriteNumeric(530, "%s %s :Only IRC operators may create new channels",user->nick,cname);
|
||||
user->WriteNumeric(530, "%s %s :Only IRC operators may create new channels",user->nick.c_str(),cname);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class ModuleRestrictMsg : public Module
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
user->WriteNumeric(531, "%s %s :You are not permitted to send private messages to this user",user->nick,u->nick);
|
||||
user->WriteNumeric(531, "%s %s :You are not permitted to send private messages to this user",user->nick.c_str(),u->nick.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -94,12 +94,12 @@ class cmd_shun : public Command
|
||||
{
|
||||
if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SHUN", user))
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('x',"%s Removed shun on %s.",user->nick,parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('x',"%s Removed shun on %s.",user->nick.c_str(),parameters[0].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// XXX todo implement stats
|
||||
user->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats s.",user->nick,parameters[0].c_str());
|
||||
user->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats s.",user->nick.c_str(),parameters[0].c_str());
|
||||
}
|
||||
|
||||
return CMD_SUCCESS;
|
||||
@ -112,7 +112,7 @@ class cmd_shun : public Command
|
||||
|
||||
try
|
||||
{
|
||||
r = new Shun(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2].c_str(), parameters[0].c_str());
|
||||
r = new Shun(ServerInstance, ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -125,12 +125,12 @@ class cmd_shun : public Command
|
||||
{
|
||||
if (!duration)
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent shun for %s.", user->nick, parameters[0].c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent shun for %s.", user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
time_t c_requires_crap = duration + ServerInstance->Time();
|
||||
ServerInstance->SNO->WriteToSnoMask('x', "%s added timed shun for %s, expires on %s", user->nick, parameters[0].c_str(),
|
||||
ServerInstance->SNO->WriteToSnoMask('x', "%s added timed shun for %s, expires on %s", user->nick.c_str(), parameters[0].c_str(),
|
||||
ServerInstance->TimeString(c_requires_crap).c_str());
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ class cmd_shun : public Command
|
||||
else
|
||||
{
|
||||
delete r;
|
||||
user->WriteServ("NOTICE %s :*** Shun for %s already exists", user->nick, parameters[0].c_str());
|
||||
user->WriteServ("NOTICE %s :*** Shun for %s already exists", user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,10 +110,10 @@ class CommandSilence : public Command
|
||||
{
|
||||
for (silencelist::const_iterator c = sl->begin(); c != sl->end(); c++)
|
||||
{
|
||||
user->WriteNumeric(271, "%s %s %s %s",user->nick, user->nick,c->first.c_str(), DecompPattern(c->second).c_str());
|
||||
user->WriteNumeric(271, "%s %s %s %s",user->nick.c_str(), user->nick.c_str(),c->first.c_str(), DecompPattern(c->second).c_str());
|
||||
}
|
||||
}
|
||||
user->WriteNumeric(272, "%s :End of Silence List",user->nick);
|
||||
user->WriteNumeric(272, "%s :End of Silence List",user->nick.c_str());
|
||||
|
||||
return CMD_LOCALONLY;
|
||||
}
|
||||
@ -153,7 +153,7 @@ class CommandSilence : public Command
|
||||
if (listitem == mask && i->second == pattern)
|
||||
{
|
||||
sl->erase(i);
|
||||
user->WriteNumeric(950, "%s %s :Removed %s %s from silence list",user->nick, user->nick, mask.c_str(), DecompPattern(pattern).c_str());
|
||||
user->WriteNumeric(950, "%s %s :Removed %s %s from silence list",user->nick.c_str(), user->nick.c_str(), mask.c_str(), DecompPattern(pattern).c_str());
|
||||
if (!sl->size())
|
||||
{
|
||||
delete sl;
|
||||
@ -163,7 +163,7 @@ class CommandSilence : public Command
|
||||
}
|
||||
}
|
||||
}
|
||||
user->WriteNumeric(952, "%s %s :%s %s does not exist on your silence list",user->nick, user->nick, mask.c_str(), DecompPattern(pattern).c_str());
|
||||
user->WriteNumeric(952, "%s %s :%s %s does not exist on your silence list",user->nick.c_str(), user->nick.c_str(), mask.c_str(), DecompPattern(pattern).c_str());
|
||||
}
|
||||
else if (action == '+')
|
||||
{
|
||||
@ -178,7 +178,7 @@ class CommandSilence : public Command
|
||||
}
|
||||
if (sl->size() > maxsilence)
|
||||
{
|
||||
user->WriteNumeric(952, "%s %s :Your silence list is full",user->nick, user->nick);
|
||||
user->WriteNumeric(952, "%s %s :Your silence list is full",user->nick.c_str(), user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
for (silencelist::iterator n = sl->begin(); n != sl->end(); n++)
|
||||
@ -186,7 +186,7 @@ class CommandSilence : public Command
|
||||
irc::string listitem = n->first.c_str();
|
||||
if (listitem == mask && n->second == pattern)
|
||||
{
|
||||
user->WriteNumeric(952, "%s %s :%s %s is already on your silence list",user->nick, user->nick, mask.c_str(), DecompPattern(pattern).c_str());
|
||||
user->WriteNumeric(952, "%s %s :%s %s is already on your silence list",user->nick.c_str(), user->nick.c_str(), mask.c_str(), DecompPattern(pattern).c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ class CommandSilence : public Command
|
||||
{
|
||||
sl->push_back(silenceset(mask,pattern));
|
||||
}
|
||||
user->WriteNumeric(951, "%s %s :Added %s %s to silence list",user->nick, user->nick, mask.c_str(), DecompPattern(pattern).c_str());
|
||||
user->WriteNumeric(951, "%s %s :Added %s %s to silence list",user->nick.c_str(), user->nick.c_str(), mask.c_str(), DecompPattern(pattern).c_str());
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class ModuleSSLDummy : public Module
|
||||
{
|
||||
if(dest->GetExt("ssl", dummy))
|
||||
{
|
||||
ServerInstance->SendWhoisLine(source, dest, 320, "%s %s :is using a secure connection", source->nick, dest->nick);
|
||||
ServerInstance->SendWhoisLine(source, dest, 320, "%s %s :is using a secure connection", source->nick.c_str(), dest->nick.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class SSLMode : public ModeHandler
|
||||
{
|
||||
if(!i->first->GetExt("ssl", dummy))
|
||||
{
|
||||
source->WriteNumeric(490, "%s %s :all members of the channel must be connected via SSL", source->nick, channel->name);
|
||||
source->WriteNumeric(490, "%s %s :all members of the channel must be connected via SSL", source->nick.c_str(), channel->name);
|
||||
return MODEACTION_DENY;
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ class ModuleSSLModes : public Module
|
||||
else
|
||||
{
|
||||
// Deny
|
||||
user->WriteServ( "489 %s %s :Cannot join channel; SSL users only (+z)", user->nick, cname);
|
||||
user->WriteServ( "489 %s %s :Cannot join channel; SSL users only (+z)", user->nick.c_str(), cname);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -82,11 +82,11 @@ class CommandSvshold : public Command
|
||||
if ((*iter)->length)
|
||||
{
|
||||
remaining = ((*iter)->set_on + (*iter)->length) - ServerInstance->Time();
|
||||
user->WriteServ( "386 %s %s :Removed SVSHOLD with %lu seconds left before expiry (%s)", user->nick, (*iter)->nickname.c_str(), (unsigned long)remaining, (*iter)->reason.c_str());
|
||||
user->WriteServ( "386 %s %s :Removed SVSHOLD with %lu seconds left before expiry (%s)", user->nick.c_str(), (*iter)->nickname.c_str(), (unsigned long)remaining, (*iter)->reason.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ( "386 %s %s :Removed permanent SVSHOLD (%s)", user->nick, (*iter)->nickname.c_str(), (*iter)->reason.c_str());
|
||||
user->WriteServ( "386 %s %s :Removed permanent SVSHOLD (%s)", user->nick.c_str(), (*iter)->nickname.c_str(), (*iter)->reason.c_str());
|
||||
}
|
||||
SVSHolds.erase(iter);
|
||||
break;
|
||||
@ -109,7 +109,7 @@ class CommandSvshold : public Command
|
||||
/* Already exists? */
|
||||
if (HoldMap.find(parameters[0].c_str()) != HoldMap.end())
|
||||
{
|
||||
user->WriteServ( "385 %s %s :SVSHOLD already exists", user->nick, parameters[0].c_str());
|
||||
user->WriteServ( "385 %s %s :SVSHOLD already exists", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -124,13 +124,13 @@ class CommandSvshold : public Command
|
||||
|
||||
if(length > 0)
|
||||
{
|
||||
user->WriteServ( "385 %s %s :Added %lu second SVSHOLD (%s)", user->nick, parameters[0].c_str(), length, reason.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s added %lu second SVSHOLD on %s (%s)", user->nick, length, parameters[0].c_str(), reason.c_str());
|
||||
user->WriteServ( "385 %s %s :Added %lu second SVSHOLD (%s)", user->nick.c_str(), parameters[0].c_str(), length, reason.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s added %lu second SVSHOLD on %s (%s)", user->nick.c_str(), length, parameters[0].c_str(), reason.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteServ( "385 %s %s :Added permanent SVSHOLD on %s (%s)", user->nick, parameters[0].c_str(), parameters[0].c_str(), reason.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s added permanent SVSHOLD on %s (%s)", user->nick, parameters[0].c_str(), reason.c_str());
|
||||
user->WriteServ( "385 %s %s :Added permanent SVSHOLD on %s (%s)", user->nick.c_str(), parameters[0].c_str(), parameters[0].c_str(), reason.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s added permanent SVSHOLD on %s (%s)", user->nick.c_str(), parameters[0].c_str(), reason.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -188,7 +188,7 @@ class ModuleSVSHold : public Module
|
||||
SVSHoldMap::iterator n = HoldMap.find(assign(newnick));
|
||||
if (n != HoldMap.end())
|
||||
{
|
||||
user->WriteServ( "432 %s %s :Reserved nickname: %s", user->nick, newnick.c_str(), n->second->reason.c_str());
|
||||
user->WriteServ( "432 %s %s :Reserved nickname: %s", user->nick.c_str(), newnick.c_str(), n->second->reason.c_str());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -34,7 +34,7 @@ class CommandSwhois : public Command
|
||||
|
||||
if (!dest)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ class CommandSwhois : public Command
|
||||
// We already had it set...
|
||||
if (!ServerInstance->ULine(user->server))
|
||||
// Ulines set SWHOISes silently
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick.c_str(), dest->nick.c_str(), text->c_str(), line.c_str());
|
||||
|
||||
dest->Shrink("swhois");
|
||||
delete text;
|
||||
@ -63,7 +63,7 @@ class CommandSwhois : public Command
|
||||
else if (!ServerInstance->ULine(user->server))
|
||||
{
|
||||
// Ulines set SWHOISes silently
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick, dest->nick, line.c_str());
|
||||
ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), line.c_str());
|
||||
}
|
||||
|
||||
text = new std::string(line);
|
||||
@ -124,7 +124,7 @@ class ModuleSWhois : public Module
|
||||
dest->GetExt("swhois", swhois);
|
||||
if (swhois)
|
||||
{
|
||||
ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick,dest->nick,swhois->c_str());
|
||||
ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick.c_str(), dest->nick.c_str(), swhois->c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class CommandDalinfo : public Command
|
||||
|
||||
CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
|
||||
{
|
||||
user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick);
|
||||
user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick.c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
};
|
||||
|
@ -90,18 +90,18 @@ class CommandTban : public Command
|
||||
T.mask = mask;
|
||||
T.expire = expire;
|
||||
TimedBanList.push_back(T);
|
||||
channel->WriteAllExcept(user, true, '@', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
|
||||
channel->WriteAllExcept(user, true, '@', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick.c_str(), mask.c_str(), duration);
|
||||
if (ServerInstance->Config->AllowHalfop)
|
||||
channel->WriteAllExcept(user, true, '%', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
|
||||
channel->WriteAllExcept(user, true, '%', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick.c_str(), mask.c_str(), duration);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
else user->WriteNumeric(482, "%s %s :You must be at least a%soperator to change modes on this channel",user->nick, channel->name,
|
||||
else user->WriteNumeric(482, "%s %s :You must be at least a%soperator to change modes on this channel",user->nick.c_str(), channel->name,
|
||||
ServerInstance->Config->AllowHalfop ? " half-" : " channel ");
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
user->WriteNumeric(401, "%s %s :No such channel",user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such channel",user->nick.c_str(), parameters[0].c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
};
|
||||
|
@ -53,9 +53,9 @@ class CommandTline : public Command
|
||||
}
|
||||
}
|
||||
if (n_matched)
|
||||
user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against %0.0f user(s) (%0.2f%% of the userbase). %0.0f by hostname and %0.0f by IP address.",user->nick, n_counted, parameters[0].c_str(), n_matched, (n_matched/n_counted)*100, n_match_host, n_match_ip);
|
||||
user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against %0.0f user(s) (%0.2f%% of the userbase). %0.0f by hostname and %0.0f by IP address.",user->nick.c_str(), n_counted, parameters[0].c_str(), n_matched, (n_matched/n_counted)*100, n_match_host, n_match_ip);
|
||||
else
|
||||
user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against no user(s).", user->nick, n_counted, parameters[0].c_str());
|
||||
user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against no user(s).", user->nick.c_str(), n_counted, parameters[0].c_str());
|
||||
|
||||
return CMD_LOCALONLY;
|
||||
}
|
||||
|
@ -36,11 +36,11 @@ class CommandUninvite : public Command
|
||||
{
|
||||
if (!c)
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[1].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), parameters[1].c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0].c_str());
|
||||
user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), parameters[0].c_str());
|
||||
}
|
||||
|
||||
return CMD_FAILURE;
|
||||
@ -50,7 +50,7 @@ class CommandUninvite : public Command
|
||||
{
|
||||
if (c->GetStatus(user) < STATUS_HOP)
|
||||
{
|
||||
user->WriteNumeric(482, "%s %s :You must be at least a%soperator to change modes on this channel",user->nick, c->name,
|
||||
user->WriteNumeric(482, "%s %s :You must be at least a%soperator to change modes on this channel",user->nick.c_str(), c->name,
|
||||
ServerInstance->Config->AllowHalfop ? " half-" : " channel ");
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
@ -60,19 +60,19 @@ class CommandUninvite : public Command
|
||||
|
||||
if (!u->IsInvited(xname))
|
||||
{
|
||||
user->WriteNumeric(491, "%s %s %s :Is not invited to channel %s",user->nick,u->nick,c->name,c->name);
|
||||
user->WriteNumeric(491, "%s %s %s :Is not invited to channel %s",user->nick.c_str(),u->nick.c_str(),c->name,c->name);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
if (!c->HasUser(user))
|
||||
{
|
||||
user->WriteNumeric(492, "%s %s :You're not on that channel!",user->nick, c->name);
|
||||
user->WriteNumeric(492, "%s %s :You're not on that channel!",user->nick.c_str(), c->name);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
u->RemoveInvite(xname);
|
||||
user->WriteNumeric(494, "%s %s %s :Uninvited",user->nick,c->name,u->nick);
|
||||
u->WriteNumeric(493, "%s :You were uninvited from %s by %s",u->nick,c->name,user->nick);
|
||||
c->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :*** %s uninvited %s.", c->name, user->nick, u->nick);
|
||||
user->WriteNumeric(494, "%s %s %s :Uninvited",user->nick.c_str(),c->name,u->nick.c_str());
|
||||
u->WriteNumeric(493, "%s :You were uninvited from %s by %s",u->nick.c_str(),c->name,user->nick.c_str());
|
||||
c->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :*** %s uninvited %s.", c->name, user->nick.c_str(), u->nick.c_str());
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ class CommandWatch : public Command
|
||||
// removing an item from the list
|
||||
if (!ServerInstance->IsNick(nick))
|
||||
{
|
||||
user->WriteNumeric(942, "%s %s :Invalid nickname", user->nick, nick);
|
||||
user->WriteNumeric(942, "%s %s :Invalid nickname", user->nick.c_str(), nick);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -155,9 +155,9 @@ class CommandWatch : public Command
|
||||
if (n != wl->end())
|
||||
{
|
||||
if (!n->second.empty())
|
||||
user->WriteNumeric(602, "%s %s %s :stopped watching", user->nick, n->first.c_str(), n->second.c_str());
|
||||
user->WriteNumeric(602, "%s %s %s :stopped watching", user->nick.c_str(), n->first.c_str(), n->second.c_str());
|
||||
else
|
||||
user->WriteNumeric(602, "%s %s * * 0 :stopped watching", user->nick, nick);
|
||||
user->WriteNumeric(602, "%s %s * * 0 :stopped watching", user->nick.c_str(), nick);
|
||||
|
||||
wl->erase(n);
|
||||
}
|
||||
@ -193,7 +193,7 @@ class CommandWatch : public Command
|
||||
{
|
||||
if (!ServerInstance->IsNick(nick))
|
||||
{
|
||||
user->WriteNumeric(942, "%s %s :Invalid nickname",user->nick,nick);
|
||||
user->WriteNumeric(942, "%s %s :Invalid nickname",user->nick.c_str(),nick);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ class CommandWatch : public Command
|
||||
|
||||
if (wl->size() == MAX_WATCH)
|
||||
{
|
||||
user->WriteNumeric(512, "%s %s :Too many WATCH entries", user->nick, nick);
|
||||
user->WriteNumeric(512, "%s %s :Too many WATCH entries", user->nick.c_str(), nick);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
@ -233,21 +233,21 @@ class CommandWatch : public Command
|
||||
if (target->Visibility && !target->Visibility->VisibleTo(user))
|
||||
{
|
||||
(*wl)[nick] = "";
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline",user->nick, nick);
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline",user->nick.c_str(), nick);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
(*wl)[nick] = std::string(target->ident).append(" ").append(target->dhost).append(" ").append(ConvToStr(target->age));
|
||||
user->WriteNumeric(604, "%s %s %s :is online",user->nick, nick, (*wl)[nick].c_str());
|
||||
user->WriteNumeric(604, "%s %s %s :is online",user->nick.c_str(), nick, (*wl)[nick].c_str());
|
||||
if (IS_AWAY(target))
|
||||
{
|
||||
user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick, target->nick, target->ident, target->dhost, (unsigned long) target->awaytime);
|
||||
user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick.c_str(), target->nick.c_str(), target->ident.c_str(), target->dhost.c_str(), (unsigned long) target->awaytime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(*wl)[nick] = "";
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline",user->nick, nick);
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline",user->nick.c_str(), nick);
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,10 +271,10 @@ class CommandWatch : public Command
|
||||
for (watchlist::iterator q = wl->begin(); q != wl->end(); q++)
|
||||
{
|
||||
if (!q->second.empty())
|
||||
user->WriteNumeric(604, "%s %s %s :is online", user->nick, q->first.c_str(), q->second.c_str());
|
||||
user->WriteNumeric(604, "%s %s %s :is online", user->nick.c_str(), q->first.c_str(), q->second.c_str());
|
||||
}
|
||||
}
|
||||
user->WriteNumeric(607, "%s :End of WATCH list",user->nick);
|
||||
user->WriteNumeric(607, "%s :End of WATCH list",user->nick.c_str());
|
||||
}
|
||||
else if (parameters.size() > 0)
|
||||
{
|
||||
@ -299,7 +299,7 @@ class CommandWatch : public Command
|
||||
i2->second.erase(n);
|
||||
|
||||
if (!i2->second.size())
|
||||
whos_watching_me->erase(user->nick);
|
||||
whos_watching_me->erase(user->nick.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,18 +316,18 @@ class CommandWatch : public Command
|
||||
{
|
||||
if (!q->second.empty())
|
||||
{
|
||||
user->WriteNumeric(604, "%s %s %s :is online", user->nick, q->first.c_str(), q->second.c_str());
|
||||
user->WriteNumeric(604, "%s %s %s :is online", user->nick.c_str(), q->first.c_str(), q->second.c_str());
|
||||
User *targ = ServerInstance->FindNick(q->first.c_str());
|
||||
if (IS_AWAY(targ))
|
||||
{
|
||||
user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick, targ->nick, targ->ident, targ->dhost, (unsigned long) targ->awaytime);
|
||||
user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick.c_str(), targ->nick.c_str(), targ->ident.c_str(), targ->dhost.c_str(), (unsigned long) targ->awaytime);
|
||||
}
|
||||
}
|
||||
else
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline", user->nick, q->first.c_str());
|
||||
user->WriteNumeric(605, "%s %s * * 0 :is offline", user->nick.c_str(), q->first.c_str());
|
||||
}
|
||||
}
|
||||
user->WriteNumeric(607, "%s :End of WATCH list",user->nick);
|
||||
user->WriteNumeric(607, "%s :End of WATCH list",user->nick.c_str());
|
||||
}
|
||||
else if (!strcasecmp(nick,"S"))
|
||||
{
|
||||
@ -343,13 +343,13 @@ class CommandWatch : public Command
|
||||
you_have = wl->size();
|
||||
}
|
||||
|
||||
watchentries::iterator i2 = whos_watching_me->find(user->nick);
|
||||
watchentries::iterator i2 = whos_watching_me->find(user->nick.c_str());
|
||||
if (i2 != whos_watching_me->end())
|
||||
youre_on = i2->second.size();
|
||||
|
||||
user->WriteNumeric(603, "%s :You have %d and are on %d WATCH entries", user->nick, you_have, youre_on);
|
||||
user->WriteNumeric(606, "%s :%s",user->nick, list.c_str());
|
||||
user->WriteNumeric(607, "%s :End of WATCH S",user->nick);
|
||||
user->WriteNumeric(603, "%s :You have %d and are on %d WATCH entries", user->nick.c_str(), you_have, youre_on);
|
||||
user->WriteNumeric(606, "%s :%s",user->nick.c_str(), list.c_str());
|
||||
user->WriteNumeric(607, "%s :End of WATCH S",user->nick.c_str());
|
||||
}
|
||||
else if (nick[0] == '-')
|
||||
{
|
||||
@ -412,7 +412,7 @@ class Modulewatch : public Module
|
||||
inum = 598;
|
||||
}
|
||||
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick);
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick.c_str());
|
||||
if (x != whos_watching_me->end())
|
||||
{
|
||||
for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
|
||||
@ -427,18 +427,18 @@ class Modulewatch : public Module
|
||||
|
||||
virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
|
||||
{
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick);
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick.c_str());
|
||||
if (x != whos_watching_me->end())
|
||||
{
|
||||
for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
|
||||
{
|
||||
if (!user->Visibility || user->Visibility->VisibleTo(user))
|
||||
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick ,user->nick, user->ident, user->dhost, (unsigned long) ServerInstance->Time());
|
||||
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick.c_str() ,user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) ServerInstance->Time());
|
||||
|
||||
watchlist* wl;
|
||||
if ((*n)->GetExt("watchlist", wl))
|
||||
/* We were on somebody's notify list, set ourselves offline */
|
||||
(*wl)[user->nick] = "";
|
||||
(*wl)[user->nick.c_str()] = "";
|
||||
}
|
||||
}
|
||||
|
||||
@ -459,7 +459,7 @@ class Modulewatch : public Module
|
||||
i2->second.erase(n);
|
||||
|
||||
if (!i2->second.size())
|
||||
whos_watching_me->erase(user->nick);
|
||||
whos_watching_me->erase(user->nick.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,26 +497,26 @@ class Modulewatch : public Module
|
||||
|
||||
virtual void OnPostConnect(User* user)
|
||||
{
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick);
|
||||
watchentries::iterator x = whos_watching_me->find(user->nick.c_str());
|
||||
if (x != whos_watching_me->end())
|
||||
{
|
||||
for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
|
||||
{
|
||||
if (!user->Visibility || user->Visibility->VisibleTo(user))
|
||||
(*n)->WriteNumeric(600, "%s %s %s %s %lu :arrived online", (*n)->nick, user->nick, user->ident, user->dhost, (unsigned long) user->age);
|
||||
(*n)->WriteNumeric(600, "%s %s %s %s %lu :arrived online", (*n)->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) user->age);
|
||||
|
||||
watchlist* wl;
|
||||
if ((*n)->GetExt("watchlist", wl))
|
||||
/* We were on somebody's notify list, set ourselves online */
|
||||
(*wl)[user->nick] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
|
||||
(*wl)[user->nick.c_str()] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnUserPostNick(User* user, const std::string &oldnick)
|
||||
{
|
||||
watchentries::iterator new_offline = whos_watching_me->find(assign(oldnick));
|
||||
watchentries::iterator new_online = whos_watching_me->find(user->nick);
|
||||
watchentries::iterator new_offline = whos_watching_me->find(oldnick.c_str());
|
||||
watchentries::iterator new_online = whos_watching_me->find(user->nick.c_str());
|
||||
|
||||
if (new_offline != whos_watching_me->end())
|
||||
{
|
||||
@ -526,7 +526,7 @@ class Modulewatch : public Module
|
||||
if ((*n)->GetExt("watchlist", wl))
|
||||
{
|
||||
if (!user->Visibility || user->Visibility->VisibleTo(user))
|
||||
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick, oldnick.c_str(), user->ident, user->dhost, (unsigned long) user->age);
|
||||
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick.c_str(), oldnick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) user->age);
|
||||
(*wl)[oldnick.c_str()] = "";
|
||||
}
|
||||
}
|
||||
@ -539,9 +539,9 @@ class Modulewatch : public Module
|
||||
watchlist* wl;
|
||||
if ((*n)->GetExt("watchlist", wl))
|
||||
{
|
||||
(*wl)[user->nick] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
|
||||
(*wl)[user->nick.c_str()] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
|
||||
if (!user->Visibility || user->Visibility->VisibleTo(user))
|
||||
(*n)->WriteNumeric(600, "%s %s %s :arrived online", (*n)->nick, user->nick, (*wl)[user->nick].c_str());
|
||||
(*n)->WriteNumeric(600, "%s %s %s :arrived online", (*n)->nick.c_str(), user->nick.c_str(), (*wl)[user->nick.c_str()].c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user