From 9a526c77cc57921d81f4d8617b7e42bdb72dc79c Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Mar 2006 14:47:26 +0000 Subject: Start of conversion to const refs for std::strings in module api - A LOT OF STUFF WONT WORK YET git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3654 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_alias.cpp | 4 ++-- src/modules/m_blockamsg.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index db3d75bae..80b55e0a4 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -87,7 +87,7 @@ class ModuleAlias : public Module return Version(1,0,0,1,VF_VENDOR); } - 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) { userrec *u = NULL; irc::string c = command.c_str(); @@ -148,7 +148,7 @@ class ModuleAlias : public Module return 0; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { delete MyConf; MyConf = new ConfigReader; diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index bb9512754..95dfa40c4 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -70,7 +70,7 @@ public: return Version(1,0,0,0,VF_VENDOR); } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { ConfigReader* Conf = new ConfigReader; @@ -94,7 +94,7 @@ public: delete Conf; } - 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) { // Don't do anything with unregistered users, or remote ones. if(!user || (user->registered != 7) || !IS_LOCAL(user)) -- cgit v1.2.3