summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-18 20:10:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-18 20:10:12 +0000
commitfa70e3360757075e45b08340b0ab3a5b585af826 (patch)
tree11ffd3a26f6b727d33f8a89db98f8f96ae5f9907 /src/modules/m_alias.cpp
parent1cb625e2a216704f9e59f2b9cfb2b0611e4f12f5 (diff)
Hmm, why didnt this go through before?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10973 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index e3e2e9a5d..c914aad66 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -51,6 +51,9 @@ class Alias : public classbase
class ModuleAlias : public Module
{
private:
+
+ char fprefix;
+
/* We cant use a map, there may be multiple aliases with the same name.
* We can, however, use a fancy invention: the multimap. Maps a key to one or more values.
* -- w00t
@@ -60,6 +63,9 @@ class ModuleAlias : public Module
virtual void ReadAliases()
{
ConfigReader MyConf(ServerInstance);
+
+ std::string fpre = MyConf.ReadValue("fantasy","prefix",0);
+ fprefix = fpre.empty() ? '!' : fpre[0];
Aliases.clear();
for (int i = 0; i < MyConf.Enumerate("alias"); i++)
@@ -214,13 +220,13 @@ class ModuleAlias : public Module
ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: looking at fcommand %s", fcommand.c_str());
// we don't want to touch non-fantasy stuff
- if (*fcommand.c_str() != '!')
+ if (*fcommand.c_str() != fprefix)
{
ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: not a fcommand");
return 0;
}
- // nor do we give a shit about the !
+ // nor do we give a shit about the prefix
fcommand.erase(fcommand.begin());
std::transform(fcommand.begin(), fcommand.end(), fcommand.begin(), ::toupper);
ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: now got %s", fcommand.c_str());