diff options
author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
tree | e145e04fa3d041cf92ce46da4ac790b63231059c /modules/commands/os_ignore.cpp | |
parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) |
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/os_ignore.cpp')
-rw-r--r-- | modules/commands/os_ignore.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp index 3d84a4635..68f4c5517 100644 --- a/modules/commands/os_ignore.cpp +++ b/modules/commands/os_ignore.cpp @@ -19,7 +19,7 @@ class OSIgnoreService : public IgnoreService public: OSIgnoreService(Module *o) : IgnoreService(o) { } - void AddIgnore(const Anope::string &mask, const Anope::string &creator, const Anope::string &reason, time_t delta = Anope::CurTime) anope_override + IgnoreData* AddIgnore(const Anope::string &mask, const Anope::string &creator, const Anope::string &reason, time_t delta = Anope::CurTime) anope_override { /* If it s an existing user, we ignore the hostmask. */ Anope::string realmask = mask; @@ -36,7 +36,7 @@ class OSIgnoreService : public IgnoreService { /* this should never happen */ if (user > host) - return; + return NULL; } else /* We have user@host. Add nick wildcard. */ @@ -54,6 +54,7 @@ class OSIgnoreService : public IgnoreService ign->time = 0; else ign->time = Anope::CurTime + delta; + return ign; } /* Create new entry.. */ else @@ -64,6 +65,7 @@ class OSIgnoreService : public IgnoreService newign.reason = reason; newign.time = delta ? Anope::CurTime + delta : 0; this->ignores.push_back(newign); + return &this->ignores.back(); } } |