summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2010-08-11 14:37:27 -0400
committerDaniel De Graaf <danieldg@inspircd.org>2010-08-11 14:37:37 -0400
commit0643e7289ab302f07b7a6c2491bdae4a05934796 (patch)
tree275190a18001111dc35cee28a68eb75488d226f9 /src/modules
parentb700971c382d5b30cd5b5e85b478bde2fd505594 (diff)
Fix NotifyOpers setting not being applied correctly
Diffstat (limited to 'src/modules')
-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 7042bc7a7..f1ead276d 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)
@@ -321,13 +320,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());
}
@@ -373,7 +372,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);
}
@@ -381,7 +380,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());
}