summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-23 13:20:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-23 13:20:57 +0000
commita3fb932831ca09b2a931616f1701ea39429356c2 (patch)
tree99fb547dcc6a6df1081891102ebb1494f6195b68 /src/modules/m_alias.cpp
parent4e1ae0981e1d6b306d316b2f66a2fc72a36e0e87 (diff)
Fix m_nationalchars using a copy and paste of my unsafe copy and paste algorithm, that will lock up if the string to replace contains the string to search for.
Finally make this function a core utility function and remove the copies from 3 modules m_alias m_nationalchars and m_sqlauth git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10990 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index c914aad66..76aceffc9 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -132,17 +132,6 @@ class ModuleAlias : public Module
return word;
}
- void SearchAndReplace(std::string& newline, const std::string &find, const std::string &replace)
- {
- std::string::size_type x = newline.find(find);
- while (x != std::string::npos)
- {
- newline.erase(x, find.length());
- newline.insert(x, replace);
- x = newline.find(find);
- }
- }
-
virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
{
std::multimap<std::string, Alias>::iterator i, upperbound;