summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-06 22:18:38 -0400
committerAdam <Adam@anope.org>2013-05-06 22:18:38 -0400
commit6578829fa6d278cae0307676f29ab4e76d2d2518 (patch)
tree48b177005721b02b95a815f72cac0363a3bf00e0
parentef06226521d27de88a49a84d8224568fec7624c3 (diff)
Use I_OnUserQuit for os_session because I_OnPreUserLogoff gets called too late, after the users server can be gone. Fix a couple other small things
-rw-r--r--data/modules.example.conf4
-rw-r--r--modules/commands/os_session.cpp4
-rw-r--r--modules/protocol/inspircd20.cpp3
-rw-r--r--src/config.cpp2
4 files changed, 7 insertions, 6 deletions
diff --git a/data/modules.example.conf b/data/modules.example.conf
index ab05542b2..01730ce29 100644
--- a/data/modules.example.conf
+++ b/data/modules.example.conf
@@ -463,7 +463,7 @@ module { name = "help" }
* This module allows granting users services operator privileges and possibly IRC Operator
* privileges based on an external SQL database using a custom query.
*/
-module
+#module
{
name = "m_sql_oper"
@@ -560,7 +560,7 @@ module { name = "m_rewrite" }
*
* This module uses SSL to connect to the uplink server(s).
*/
-module
+#module
{
name = "m_ssl"
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp
index 1e0e7c59c..18393daec 100644
--- a/modules/commands/os_session.cpp
+++ b/modules/commands/os_session.cpp
@@ -640,7 +640,7 @@ class OSSession : public Module
{
this->SetPermanent(true);
- Implementation i[] = { I_OnReload, I_OnUserConnect, I_OnPreUserLogoff };
+ Implementation i[] = { I_OnReload, I_OnUserConnect, I_OnUserQuit };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
ModuleManager::SetPriority(this, PRIORITY_FIRST);
}
@@ -734,7 +734,7 @@ class OSSession : public Module
catch (const SocketException &) { }
}
- void OnPreUserLogoff(User *u) anope_override
+ void OnUserQuit(User *u, const Anope::string &msg) anope_override
{
if (!session_limit || !u->server || u->server->IsULined())
return;
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index 3998486e3..5f86b151e 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -815,7 +815,8 @@ class ProtoInspIRCd : public Module
void OnChannelCreate(Channel *c) anope_override
{
- this->OnChanRegistered(c->ci);
+ if (c->ci)
+ this->OnChanRegistered(c->ci);
}
void OnChanRegistered(ChannelInfo *ci) anope_override
diff --git a/src/config.cpp b/src/config.cpp
index e2243b236..46ad48d43 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -237,7 +237,7 @@ Conf::Conf() : Block("")
ot->AddCommand(str);
spacesepstream privstr(privs);
- for (Anope::string str; cmdstr.GetToken(str);)
+ for (Anope::string str; privstr.GetToken(str);)
ot->AddPriv(str);
commasepstream inheritstr(inherits);