diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-24 15:13:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-24 15:13:17 +0000 |
commit | 343f12b9b2d4e519b09877f76a00f6a0714509f2 (patch) | |
tree | b51aee0ca78a19fd356cdc2788cab4530c7928c1 /src/users.cpp | |
parent | 638381c529a2f19c699718234d689e54ad459c97 (diff) |
Add stuff so that modules can hook users by altering a pointer in the User class. Note that ssl modules still bind by port, but the idea of doing this change is so we can remove that logic next
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9187 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 46665396f..f8a95af49 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -193,6 +193,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance Visibility = NULL; ip = NULL; MyClass = NULL; + io = NULL; AllowedUserModes = NULL; AllowedChanModes = NULL; AllowedOperCommands = NULL; @@ -1165,14 +1166,14 @@ void User::Write(std::string text) return; } - if (ServerInstance->Config->GetIOHook(this->GetPort())) + if (this->io) { /* XXX: The lack of buffering here is NOT a bug, modules implementing this interface have to * implement their own buffering mechanisms */ try { - ServerInstance->Config->GetIOHook(this->GetPort())->OnRawSocketWrite(this->fd, text.data(), text.length()); + this->io->OnRawSocketWrite(this->fd, text.data(), text.length()); } catch (CoreException& modexcept) { |