summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_messageflood.cpp6
-rw-r--r--src/modules/m_nicklock.cpp4
-rw-r--r--src/modules/m_nonicks.cpp2
-rw-r--r--src/modules/m_operjoin.cpp4
-rw-r--r--src/modules/m_operlevels.cpp4
-rw-r--r--src/modules/m_opermd5.cpp2
-rw-r--r--src/modules/m_opermodes.cpp4
-rw-r--r--src/modules/m_opermotd.cpp4
-rw-r--r--src/modules/m_operwho.cpp2
-rw-r--r--src/modules/m_override.cpp4
-rw-r--r--src/modules/m_park.cpp8
-rw-r--r--src/modules/m_restrictchans.cpp2
-rw-r--r--src/modules/m_safelist.cpp4
-rw-r--r--src/modules/m_services.cpp2
-rw-r--r--src/modules/m_silence.cpp2
-rw-r--r--src/modules/m_spanningtree.cpp54
-rwxr-xr-xsrc/svn-rev.sh2
17 files changed, 55 insertions, 55 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 282a42a3b..681ba616a 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -172,7 +172,7 @@ class ModuleMsgFlood : public Module
return 0;
}
- void ProcessMessages(userrec* user,chanrec* dest,std::string &text)
+ void ProcessMessages(userrec* user,chanrec* dest, const std::string &text)
{
if (IS_LOCAL(user))
{
@@ -198,7 +198,7 @@ class ModuleMsgFlood : public Module
}
}
- virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text, char status)
+ virtual void OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status)
{
if (target_type == TYPE_CHANNEL)
{
@@ -206,7 +206,7 @@ class ModuleMsgFlood : public Module
}
}
- virtual void OnUserNotice(userrec* user, void* dest, int target_type, std::string text, char status)
+ virtual void OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status)
{
if (target_type == TYPE_CHANNEL)
{
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 0f0b87445..cd36f1747 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -113,7 +113,7 @@ class ModuleNickLock : public Module
List[I_OnUserPreNick] = List[I_OnUserQuit] = List[I_OnCleanup] = 1;
}
- virtual int OnUserPreNick(userrec* user, std::string newnick)
+ virtual int OnUserPreNick(userrec* user, const std::string &newnick)
{
if (user->GetExt("nick_locked"))
{
@@ -123,7 +123,7 @@ class ModuleNickLock : public Module
return 0;
}
- virtual void OnUserQuit(userrec* user, std::string reason)
+ virtual void OnUserQuit(userrec* user, const std::string &reason)
{
user->Shrink("nick_locked");
}
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index a252dc6da..94e0fe4b9 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -58,7 +58,7 @@ class ModuleNoNickChange : public Module
InsertMode(output,"N",4);
}
- virtual int OnUserPreNick(userrec* user, std::string newnick)
+ virtual int OnUserPreNick(userrec* user, const std::string &newnick)
{
irc::string server = user->server;
irc::string me = Srv->GetServerName().c_str();
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index ee237f635..cba931257 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -30,7 +30,7 @@ class ModuleOperjoin : public Module
List[I_OnPostOper] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
delete conf;
conf = new ConfigReader;
@@ -46,7 +46,7 @@ class ModuleOperjoin : public Module
return Version(1,0,0,1,VF_VENDOR);
}
- virtual void OnPostOper(userrec* user, std::string opertype)
+ virtual void OnPostOper(userrec* user, const std::string &opertype)
{
if(operChan != "")
{
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index b598dec1f..b4a76d5c0 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -36,7 +36,7 @@ class ModuleOperLevels : public Module
List[I_OnRehash] = List[I_OnKill] = 1;
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
delete conf;
conf = new ConfigReader;
@@ -47,7 +47,7 @@ class ModuleOperLevels : public Module
return Version(1,0,0,1,VF_VENDOR);
}
- virtual int OnKill(userrec* source, userrec* dest, std::string reason)
+ virtual int OnKill(userrec* source, userrec* dest, const std::string &reason)
{
long dest_level = 0,source_level = 0;
// oper killing an oper?
diff --git a/src/modules/m_opermd5.cpp b/src/modules/m_opermd5.cpp
index 9dd2960ff..42683ac19 100644
--- a/src/modules/m_opermd5.cpp
+++ b/src/modules/m_opermd5.cpp
@@ -298,7 +298,7 @@ class ModuleOperMD5 : public Module
List[I_OnOperCompare] = 1;
}
- virtual int OnOperCompare(std::string data, std::string input)
+ virtual int OnOperCompare(const std::string &data, const std::string &input)
{
char buffer[MAXBUF];
if (data.length() == 32) // if its 32 chars long, try it as an md5
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index c7ca62a69..d99a7ad8a 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -43,7 +43,7 @@ class ModuleModesOnOper : public Module
List[I_OnPostOper] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
delete Conf;
Conf = new ConfigReader;
@@ -59,7 +59,7 @@ class ModuleModesOnOper : public Module
return Version(1,0,0,1,VF_VENDOR);
}
- virtual void OnPostOper(userrec* user, std::string opertype)
+ virtual void OnPostOper(userrec* user, const std::string &opertype)
{
// whenever a user opers, go through the oper types, find their <type:modes>,
// and if they have one apply their modes. The mode string can contain +modes
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 0cf4efdc0..c43775db8 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -85,12 +85,12 @@ class ModuleOpermotd : public Module
List[I_OnRehash] = List[I_OnOper] = 1;
}
- virtual void OnOper(userrec* user, std::string opertype)
+ virtual void OnOper(userrec* user, const std::string &opertype)
{
ShowOperMOTD(user);
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
LoadOperMOTD();
}
diff --git a/src/modules/m_operwho.cpp b/src/modules/m_operwho.cpp
index 53f87b087..626c03df6 100644
--- a/src/modules/m_operwho.cpp
+++ b/src/modules/m_operwho.cpp
@@ -61,7 +61,7 @@ class ModuleOperWho : public Module
List[I_OnPreCommand] = 1;
}
- virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
{
if ((!*user->oper) || (command != "WHO"))
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index d764f553b..58fa0ac48 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -49,7 +49,7 @@ class ModuleOverride : public Module
OnRehash("");
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
// on a rehash we delete our classes for good measure and create them again.
delete Conf;
@@ -88,7 +88,7 @@ class ModuleOverride : public Module
return false;
}
- virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
+ virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
{
if ((*source->oper) && (CanOverride(source,"KICK")))
{
diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp
index 29ce2c1eb..4cd163af1 100644
--- a/src/modules/m_park.cpp
+++ b/src/modules/m_park.cpp
@@ -235,7 +235,7 @@ class ModulePark : public Module
List[I_On005Numeric] = List[I_OnRehash] = List[I_OnUserQuit] = List[I_OnUserPreMessage] = List[I_OnUserPreNick] = List[I_OnBackgroundTimer] = List[I_OnWhois] = 1;
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
this->ReadSettings();
}
@@ -245,7 +245,7 @@ class ModulePark : public Module
output = output + std::string(" PARK");
}
- virtual void OnUserQuit(userrec* user, std::string reason)
+ virtual void OnUserQuit(userrec* user, const std::string &reason)
{
std::string nick = user->nick;
// track quits in our parked user list
@@ -260,7 +260,7 @@ class ModulePark : public Module
}
- virtual void OnPrePrivmsg(userrec* user, userrec* dest, std::string text)
+ virtual void OnPrePrivmsg(userrec* user, userrec* dest, const std::string &text)
{
awaylog* awy = (awaylog*)dest->GetExt("park_awaylog");
if (awy)
@@ -278,7 +278,7 @@ class ModulePark : public Module
}
}
- virtual int OnUserPreNick(userrec* user, std::string newnick)
+ virtual int OnUserPreNick(userrec* user, const std::string &newnick)
{
// track nickchanges in our parked user list
// (this isnt too efficient, i'll tidy it up some time)
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index b6d34bf25..cd94ba3fe 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -53,7 +53,7 @@ class ModuleRestrictChans : public Module
ReadConfig();
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
ReadConfig();
}
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index 5b7e0f87c..ca820e86e 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -166,7 +166,7 @@ class ModuleSafeList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -255,7 +255,7 @@ class ModuleSafeList : public Module
output.append(" SAFELIST");
}
- virtual void OnUserQuit(userrec* user, std::string message)
+ virtual void OnUserQuit(userrec* user, const std::string &message)
{
this->OnCleanup(TYPE_USER,user);
}
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 3253d34dd..ead96ae98 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -66,7 +66,7 @@ class ModuleServices : public Module
List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_OnExtendedMode] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1;
}
- virtual void OnUserPostNick(userrec* user, std::string oldnick)
+ virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
{
/* On nickchange, if they have +r, remove it */
if (strchr(user->modes,'r'))
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index e785265ac..b4118da07 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -146,7 +146,7 @@ class ModuleSilence : public Module
List[I_OnUserQuit] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreMessage] = 1;
}
- virtual void OnUserQuit(userrec* user, std::string reason)
+ virtual void OnUserQuit(userrec* user, const std::string &reason)
{
// when the user quits tidy up any silence list they might have just to keep things tidy
// and to prevent a HONKING BIG MEMORY LEAK!
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index a71dd30bf..3f3613dd2 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3361,7 +3361,7 @@ class ModuleSpanningTree : public Module
return 0;
}
- virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -3433,7 +3433,7 @@ class ModuleSpanningTree : public Module
return 0;
}
- virtual void OnGetServerDescription(std::string servername,std::string &description)
+ virtual void OnGetServerDescription(const std::string &servername,std::string &description)
{
TreeServer* s = FindServer(servername);
if (s)
@@ -3453,7 +3453,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, std::string topic)
+ virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic)
{
std::deque<std::string> params;
params.push_back(chan->name);
@@ -3461,7 +3461,7 @@ class ModuleSpanningTree : public Module
DoOneToMany(user->nick,"TOPIC",params);
}
- virtual void OnWallops(userrec* user, std::string text)
+ virtual void OnWallops(userrec* user, const std::string &text)
{
if (user->fd > -1)
{
@@ -3471,7 +3471,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnUserNotice(userrec* user, void* dest, int target_type, std::string text, char status)
+ virtual void OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status)
{
if (target_type == TYPE_USER)
{
@@ -3506,7 +3506,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text, char status)
+ virtual void OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status)
{
if (target_type == TYPE_USER)
{
@@ -3582,7 +3582,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnChangeHost(userrec* user, std::string newhost)
+ virtual void OnChangeHost(userrec* user, const std::string &newhost)
{
// only occurs for local clients
if (user->registered != 7)
@@ -3592,7 +3592,7 @@ class ModuleSpanningTree : public Module
DoOneToMany(user->nick,"FHOST",params);
}
- virtual void OnChangeName(userrec* user, std::string gecos)
+ virtual void OnChangeName(userrec* user, const std::string &gecos)
{
// only occurs for local clients
if (user->registered != 7)
@@ -3602,7 +3602,7 @@ class ModuleSpanningTree : public Module
DoOneToMany(user->nick,"FNAME",params);
}
- virtual void OnUserPart(userrec* user, chanrec* channel, std::string partmessage)
+ virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage)
{
if (user->fd > -1)
{
@@ -3641,7 +3641,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnUserQuit(userrec* user, std::string reason)
+ virtual void OnUserQuit(userrec* user, const std::string &reason)
{
if ((user->fd > -1) && (user->registered == 7))
{
@@ -3658,7 +3658,7 @@ class ModuleSpanningTree : public Module
}
- virtual void OnUserPostNick(userrec* user, std::string oldnick)
+ virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
{
if (user->fd > -1)
{
@@ -3668,7 +3668,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
+ virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
{
if ((source) && (source->fd > -1))
{
@@ -3688,7 +3688,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnRemoteKill(userrec* source, userrec* dest, std::string reason)
+ virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason)
{
std::deque<std::string> params;
params.push_back(dest->nick);
@@ -3696,7 +3696,7 @@ class ModuleSpanningTree : public Module
DoOneToMany(source->nick,"KILL",params);
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string &parameter)
{
if (parameter != "")
{
@@ -3716,7 +3716,7 @@ class ModuleSpanningTree : public Module
// note: the protocol does not allow direct umode +o except
// via NICK with 8 params. sending OPERTYPE infers +o modechange
// locally.
- virtual void OnOper(userrec* user, std::string opertype)
+ virtual void OnOper(userrec* user, const std::string &opertype)
{
if (user->fd > -1)
{
@@ -3726,7 +3726,7 @@ class ModuleSpanningTree : public Module
}
}
- void OnLine(userrec* source, std::string host, bool adding, char linetype, long duration, std::string reason)
+ void OnLine(userrec* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason)
{
if (source->fd > -1)
{
@@ -3752,47 +3752,47 @@ class ModuleSpanningTree : public Module
}
}
- virtual void OnAddGLine(long duration, userrec* source, std::string reason, std::string hostmask)
+ virtual void OnAddGLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask)
{
OnLine(source,hostmask,true,'G',duration,reason);
}
- virtual void OnAddZLine(long duration, userrec* source, std::string reason, std::string ipmask)
+ virtual void OnAddZLine(long duration, userrec* source, const std::string &reason, const std::string &ipmask)
{
OnLine(source,ipmask,true,'Z',duration,reason);
}
- virtual void OnAddQLine(long duration, userrec* source, std::string reason, std::string nickmask)
+ virtual void OnAddQLine(long duration, userrec* source, const std::string &reason, const std::string &nickmask)
{
OnLine(source,nickmask,true,'Q',duration,reason);
}
- virtual void OnAddELine(long duration, userrec* source, std::string reason, std::string hostmask)
+ virtual void OnAddELine(long duration, userrec* source, const std::string &reason, const std::string &hostmask)
{
OnLine(source,hostmask,true,'E',duration,reason);
}
- virtual void OnDelGLine(userrec* source, std::string hostmask)
+ virtual void OnDelGLine(userrec* source, const std::string &hostmask)
{
OnLine(source,hostmask,false,'G',0,"");
}
- virtual void OnDelZLine(userrec* source, std::string ipmask)
+ virtual void OnDelZLine(userrec* source, const std::string &ipmask)
{
OnLine(source,ipmask,false,'Z',0,"");
}
- virtual void OnDelQLine(userrec* source, std::string nickmask)
+ virtual void OnDelQLine(userrec* source, const std::string &nickmask)
{
OnLine(source,nickmask,false,'Q',0,"");
}
- virtual void OnDelELine(userrec* source, std::string hostmask)
+ virtual void OnDelELine(userrec* source, const std::string &hostmask)
{
OnLine(source,hostmask,false,'E',0,"");
}
- virtual void OnMode(userrec* user, void* dest, int target_type, std::string text)
+ virtual void OnMode(userrec* user, void* dest, int target_type, const std::string &text)
{
if ((user->fd > -1) && (user->registered == 7))
{
@@ -3835,7 +3835,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline)
+ virtual void ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline)
{
TreeSocket* s = (TreeSocket*)opaque;
if (target)
@@ -3853,7 +3853,7 @@ class ModuleSpanningTree : public Module
}
}
- virtual void ProtoSendMetaData(void* opaque, int target_type, void* target, std::string extname, std::string extdata)
+ virtual void ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata)
{
TreeSocket* s = (TreeSocket*)opaque;
if (target)
diff --git a/src/svn-rev.sh b/src/svn-rev.sh
index 447b6169a..5e7ae95cc 100755
--- a/src/svn-rev.sh
+++ b/src/svn-rev.sh
@@ -1 +1 @@
-echo 3655
+echo 3657