]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
More done
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 19 May 2008 00:29:53 +0000 (00:29 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 19 May 2008 00:29:53 +0000 (00:29 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9759 e03df62e-2008-0410-955e-edbf42e46eb7

41 files changed:
src/modules/m_callerid.cpp
src/modules/m_chancreate.cpp
src/modules/m_chanfilter.cpp
src/modules/m_chanprotect.cpp
src/modules/m_check.cpp
src/modules/m_chghost.cpp
src/modules/m_chgident.cpp
src/modules/m_chgname.cpp
src/modules/m_cloaking.cpp
src/modules/m_close.cpp
src/modules/m_commonchans.cpp
src/modules/m_conn_waitpong.cpp
src/modules/m_customtitle.cpp
src/modules/m_cycle.cpp
src/modules/m_filter.h
src/modules/m_globalload.cpp
src/modules/m_messageflood.cpp
src/modules/m_nickflood.cpp
src/modules/m_nicklock.cpp
src/modules/m_operlevels.cpp
src/modules/m_operlog.cpp
src/modules/m_override.cpp
src/modules/m_password_hash.cpp
src/modules/m_proxyscan.cpp
src/modules/m_randquote.cpp
src/modules/m_redirect.cpp
src/modules/m_regonlycreate.cpp
src/modules/m_remove.cpp
src/modules/m_restrictchans.cpp
src/modules/m_restrictmsg.cpp
src/modules/m_shun.cpp
src/modules/m_silence.cpp
src/modules/m_ssl_dummy.cpp
src/modules/m_sslmodes.cpp
src/modules/m_svshold.cpp
src/modules/m_swhois.cpp
src/modules/m_testcommand.cpp
src/modules/m_timedbans.cpp
src/modules/m_tline.cpp
src/modules/m_uninvite.cpp
src/modules/m_watch.cpp

index aa7cc6162f0c04a324fbc92008dcfe3c177054b6..d41fcd5d0f5b01fbf429b32e968c74bdbe14ddb5 100644 (file)
@@ -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;
index b1008d72caaea46a594cfd1cd51f751f7af1ad53..d1e17497c288b358d92f45836abdcfda6f24bc18 100644 (file)
@@ -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);
                }
        }
 };
index b3f02b271d87f792e0f3d932f929bb99a1406b8f..ff3e4ca967b0b9b787f2315cf93f126c0b5ae92d 100644 (file)
@@ -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;
                                }
                        }
index 82c4e6940c330e6f8022d2c06cf763a811825c56..9363bac4be70d12e3f4b4402c0f9d294794170d6 100644 (file)
@@ -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 &parameter, 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);
index 258660a926b0a5cb0ae2936d42068163f2ff54fe..81354609f2c751a7a952d202c753a5e94dc6b27c 100644 (file)
@@ -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);
                        }
                }
index 763bb2f26b940f5994597bdf90c671d314fa2215..e927ca69ae0da8be7fa28292b45fbd994e54bc74 100644 (file)
@@ -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;
                }
 
index 3a39c2f132bca7e0da83bc7589bc5b0fa84876ac..d0d77f1939b22661db1b1274e8c1793cb25fa541 100644 (file)
@@ -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;
index a8a85282068b3e6d687f74eef33f9b2b16494f85..233bb15b677f3498e127bfe7de2f10a11b134f80 100644 (file)
@@ -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 */
                }
 
index 7a500c1b30695b01570cc6960c64f0de0beaa75d..b5b677172232a569cd2426a689552c4e76fe99c4 100644 (file)
@@ -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))
index fb4b0368286d5a109720f331369a4dbd61b463ce..016bfe2697756e74700e0fd61a4d06d8c79cb70d 100644 (file)
@@ -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;
        }
index 4153fa3550927c823e6c5ae12b22b3e88ce4c2b3..9e31d428e6ad3fc1b392baa75bdde5302d62bddb 100644 (file)
@@ -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;
                        }
                }
index 2373c8163b2d7126eeab2833b45e0585eb01ed0e..4fe71f1629dca01ec869717128ba6bc060853ffe 100644 (file)
@@ -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;
index e195a490b0b79babc4b090cdb6c4972955a8e94a..07055f40aeba4e47b84cb72ef850d57a9476bd16 100644 (file)
@@ -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 */
index 6c4ec72ac34f12b61741fb80d99bea08bb71e5fd..80be98223b5a703397a9b4b766fca03ae126d1b8 100644 (file)
@@ -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;
index 7af2204bbc8df18abc0b2b4d39016a54660e9257..ba23dd08d66f7869fb731d7f234d2908cfc5baed 100644 (file)
@@ -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")
index 1c08a48c66f9c6223dd6650c771b2c91800b02be..2f39a66e6000d6e05caf8e50c3157a12827ffe81 100644 (file)
@@ -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;
        }
index 25350b15b006b6445b285d0b693bb4c550b55303..d6820b8ad6b30113170bdfbcce0a58d484dad0c5 100644 (file)
@@ -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;
                        }
index 09570c104fd24d3c074a68ab6a44f8d2363947bd..2eb631fb2aae42731c5f29249a91e49653891d2b 100644 (file)
@@ -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;
                                }
 
index 7f64cba597f4fa6db36dc6bee9252c511dd8bb86..adeab2691febc35aae7fcbecc612bcf290870d10 100644 (file)
@@ -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;
index b436b953bb21dad3931003ba2e8cf7919c0d1f45..e50087dbf4936aaec32b44d9ebfab72fd1acbfe9 100644 (file)
@@ -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;
                                }
                        }
index 25a3f1203a4a018e2aad2058dbf5f4bdc903a839..2aef64d7aceb23e70f1cdf7c235e570662a5f478 100644 (file)
@@ -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;
index 054d56a4b1d4be9238deb4e2103a0675c064e95f..8cbc1836ddb49963b4edc178f5197db376fae858 100644 (file)
@@ -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;
                                }
index bc0a14f8685add8caaf5de953b5893de51e7f6d5..93c7ca00a66d50e8e941ccc3e02c3872df6f3c7e 100644 (file)
@@ -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() );
                }
        }
 
index ba6f17daaf1bacda3754ca8d2bbcf591bf44d98c..dfccd8781fa04e8a17c0ae50911ea1404be53635 100644 (file)
@@ -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());
                }
        }
 };
index 38c11ff959a110dcf80aee6cf8501d3b6dba0b0d..d7acfadbe584c8da6c0e507af9e7c74c55a0a3e7 100644 (file)
@@ -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;
                }
 
index 44cea9b0bd64bd8cbc9a263433cec708cefd2193..2a7ef4b549d58e5116ee966c4178a6d1aade174d 100644 (file)
@@ -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;
                                }
index eea6b7876f92ecefc1e013e7fab4eb0c8810315e..5c7b825b0d6494dc50eeedcab66aaaf2af8d032a 100644 (file)
@@ -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;
                }
 
index 008b4c82db1d28755e5802162da5a29d1d52b8b6..9450899ed73ad9bf10b1ff2c0ae61396685069af 100644 (file)
@@ -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;
                }
 
index 1838338bd66fca5d814382d2c7ae9465784644b1..c0409168f1fdfba987285e13ccbf5f60d3d411cd 100644 (file)
@@ -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;
                        }
                }
index fd885cd5814f05e2d08a43d9044b39e9435f86d8..eb2026203f8b3be4aa9f72807295bfa85e049ec3 100644 (file)
@@ -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;
                }
 
index d5ad01dc0dc11d8f337e1caf2c1f2b37f889cd1c..be77f9d772beb69b65c46ebe8f24080cffc2c0d3 100644 (file)
@@ -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());
                                }
                        }
                }
index 7d1e80d62f0a5a116c75ea14ab6d06de17990764..310f2d95aa2f16e48bee1d40e491783dd1a54f77 100644 (file)
@@ -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;
                        }
                }
index 9efb9f88d6554e7e571c38a62a0913680d8e5017..143e1199d7e5b6b5982d4d1061e2dd68761193db 100644 (file)
@@ -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());
                }
        }
        
index 8e043916906fdec702e963b6a445da5fbfd4d763..e8a40e844fa1f73f081cb9e007c27b48dd828a31 100644 (file)
@@ -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;
                        }
                }
index ed4fa86cf2e17ed98d1d0eb4ae038484948cd8ee..ce19a67a346eec6fb42b242518a7c4529718f875 100644 (file)
@@ -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;
index 630729e7080fa2ccf7422aeff247b9019ac90013..b2de8d288c0960768b080e95eb3e7e8280d19431 100644 (file)
@@ -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());
                        }
                }
 
index b38171593d34ed4c7a94a972bbaa13aea3614afc..54a3ceba391dbf780d0c0c8773c6a4a24bed8532 100644 (file)
@@ -28,7 +28,7 @@ class CommandDalinfo : public Command
 
        CmdResult Handle (const std::vector<std::string> &parameters, 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;
        }
 };
index 78915e3ef5280956fd8a7933beb8c16f2d3b9ad0..d69533846fd5839032bfe78e6b84824be19d6d76 100644 (file)
@@ -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;
        }
 };
index 755b3a58d832b4381e69dfa5a7e9774980eb0718..79f9dff3c9dc99c45eeddc3104b0b947ea0c4e82 100644 (file)
@@ -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;                   
        }
index 680b774a4e5a371b0e4fbacdef1dbe2e8bd08974..ed65ce96477f4624150b3ae3a9f6a03ea200847f 100644 (file)
@@ -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;
        }
index ddb6f26670eabdb085101613c76de437213f5fe0..3ae856b5e7ac6d9d8704743d6cf76868806862c7 100644 (file)
@@ -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());
                                }
                        }
                }