summaryrefslogtreecommitdiffstats
path: root/src/modules/m_cgiirc.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-08-11 14:37:27 -0400
committerGravatar Daniel De Graaf2010-08-11 14:37:27 -0400
commitce47d15bbd7b062a3fd006b0964e02a4f9d2621e (patch)
tree284bb4e90470253b214f38c0b99edc5aad8a695a /src/modules/m_cgiirc.cpp
parentDon't try to merge an unset of a parameterized mode (diff)
downloadinspircd++-ce47d15bbd7b062a3fd006b0964e02a4f9d2621e.tar.gz
inspircd++-ce47d15bbd7b062a3fd006b0964e02a4f9d2621e.tar.bz2
inspircd++-ce47d15bbd7b062a3fd006b0964e02a4f9d2621e.zip
Fix NotifyOpers setting not being applied correctly
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
-rw-r--r--src/modules/m_cgiirc.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 7612b7fcc..84a4fa1f9 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -53,16 +53,16 @@ typedef std::vector<CGIhost> CGIHostlist;
*/
class CommandWebirc : public Command
{
- bool notify;
public:
+ bool notify;
StringExtItem realhost;
StringExtItem realip;
LocalStringExt webirc_hostname;
LocalStringExt webirc_ip;
CGIHostlist Hosts;
- CommandWebirc(Module* Creator, bool bnotify)
- : Command(Creator, "WEBIRC", 4), notify(bnotify),
+ CommandWebirc(Module* Creator)
+ : Command(Creator, "WEBIRC", 4),
realhost("cgiirc_realhost", Creator), realip("cgiirc_realip", Creator),
webirc_hostname("cgiirc_webirc_hostname", Creator), webirc_ip("cgiirc_webirc_ip", Creator)
{
@@ -156,9 +156,8 @@ class ModuleCgiIRC : public Module
{
CommandWebirc cmd;
LocalIntExt waiting;
- bool NotifyOpers;
public:
- ModuleCgiIRC() : cmd(this, NotifyOpers), waiting("cgiirc-delay", this)
+ ModuleCgiIRC() : cmd(this), waiting("cgiirc-delay", this)
{
}
@@ -187,7 +186,7 @@ public:
cmd.Hosts.clear();
// Do we send an oper notice when a CGI:IRC has their host changed?
- NotifyOpers = ServerInstance->Config->ConfValue("cgiirc")->getBool("opernotice", true);
+ cmd.notify = ServerInstance->Config->ConfValue("cgiirc")->getBool("opernotice", true);
ConfigTagList tags = ServerInstance->Config->ConfTags("cgihost");
for (ConfigIter i = tags.first; i != tags.second; ++i)
@@ -320,13 +319,13 @@ public:
try
{
bool cached;
- CGIResolver* r = new CGIResolver(this, NotifyOpers, user->password, false, user, "PASS", cached, waiting);
+ CGIResolver* r = new CGIResolver(this, cmd.notify, user->password, false, user, "PASS", cached, waiting);
ServerInstance->AddResolver(r, cached);
waiting.set(user, waiting.get(user) + 1);
}
catch (...)
{
- if (NotifyOpers)
+ if (cmd.notify)
ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host.c_str());
}
@@ -372,7 +371,7 @@ public:
{
bool cached;
- CGIResolver* r = new CGIResolver(this, NotifyOpers, newipstr, false, user, "IDENT", cached, waiting);
+ CGIResolver* r = new CGIResolver(this, cmd.notify, newipstr, false, user, "IDENT", cached, waiting);
ServerInstance->AddResolver(r, cached);
waiting.set(user, waiting.get(user) + 1);
}
@@ -380,7 +379,7 @@ public:
{
user->InvalidateCache();
- if(NotifyOpers)
+ if(cmd.notify)
ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host.c_str());
}