summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-23 17:42:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-23 17:42:48 +0000
commitf86d7e3982a9fa0cfe6fde81e7abf9403ed193f1 (patch)
treea8cd0d1614d769193d98827af220b104c12a02fa
parent5aaa38bea4ff3556dc3bff8c09c72a8067368c17 (diff)
A couple of tweaks that i did earlier as diffs. ISON didnt always respect invisibility state of users. socketengine iocp didnt range check fd's before passing them for array lookup
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7502 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cmd_ison.cpp3
-rw-r--r--src/socketengine_iocp.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd_ison.cpp b/src/cmd_ison.cpp
index 0cee160c7..d050af982 100644
--- a/src/cmd_ison.cpp
+++ b/src/cmd_ison.cpp
@@ -36,6 +36,9 @@ CmdResult cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
if (u)
{
+ if (u->Visibility && !u->Visibility->VisibleTo(user))
+ continue;
+
reply.append(u->nick).append(" ");
if (reply.length() > 450)
{
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp
index c5c589e5f..ab894299c 100644
--- a/src/socketengine_iocp.cpp
+++ b/src/socketengine_iocp.cpp
@@ -257,6 +257,9 @@ int IOCPEngine::DispatchEvents()
while (GetQueuedCompletionStatus(m_completionPort, &len, &intfd, &overlap, 1000))
{
+ if (intfd < 0 || intfd > MAX_DESCRIPTORS)
+ continue;
+
// woot, we got an event on a socket :P
eh = ref[intfd];
ov = CONTAINING_RECORD(overlap, Overlapped, m_overlap);