diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-04 01:59:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-04 01:59:41 +0000 |
commit | f25755bbe748f65eb17f8e25507160569f8f4041 (patch) | |
tree | 31c4e662f99cd6e2b3c38ab01b32c55a29f9f3eb /src/userprocess.cpp | |
parent | e5843dde4dda51de3160de62b7b8811cb9465d1b (diff) |
Change to using userrec::ip as a sockaddr to store port, ip and address family, rather than userrec::ip4 and userrec::port.
This allows us to handle remote ipv6 users on an ipv4 server, and vice versa.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4694 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r-- | src/userprocess.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 22a48fdcc..7468d0890 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -79,14 +79,14 @@ void ProcessUser(userrec* cu) log(DEBUG,"Processing user with fd %d",cu->fd); - if (Config->GetIOHook(cu->port)) + if (Config->GetIOHook(cu->GetPort())) { int result2 = 0; int MOD_RESULT = 0; try { - MOD_RESULT = Config->GetIOHook(cu->port)->OnRawSocketRead(cu->fd,data,65535,result2); + MOD_RESULT = Config->GetIOHook(cu->GetPort())->OnRawSocketRead(cu->fd,data,65535,result2); log(DEBUG,"Data result returned by module: %d",MOD_RESULT); } catch (ModuleException& modexcept) @@ -168,9 +168,9 @@ void ProcessUser(userrec* cu) } else { - WriteOpers("*** Excess flood from %s",(char*)insp_ntoa(current->ip4)); - log(DEFAULT,"Excess flood from: %s",(char*)insp_ntoa(current->ip4)); - add_zline(120,Config->ServerName,"Flood from unregistered connection",(char*)insp_ntoa(current->ip4)); + WriteOpers("*** Excess flood from %s",current->GetIPString()); + log(DEFAULT,"Excess flood from: %s",current->GetIPString()); + add_zline(120,Config->ServerName,"Flood from unregistered connection",current->GetIPString()); apply_lines(APPLY_ZLINES); } @@ -185,9 +185,9 @@ void ProcessUser(userrec* cu) } else { - WriteOpers("*** Excess flood from %s",(char*)insp_ntoa(current->ip4)); - log(DEFAULT,"Excess flood from: %s",(char*)insp_ntoa(current->ip4)); - add_zline(120,Config->ServerName,"Flood from unregistered connection",(char*)insp_ntoa(current->ip4)); + WriteOpers("*** Excess flood from %s",current->GetIPString()); + log(DEFAULT,"Excess flood from: %s",current->GetIPString()); + add_zline(120,Config->ServerName,"Flood from unregistered connection",current->GetIPString()); apply_lines(APPLY_ZLINES); } @@ -221,7 +221,7 @@ void ProcessUser(userrec* cu) } else { - add_zline(120,Config->ServerName,"Flood from unregistered connection",(char*)insp_ntoa(current->ip4)); + add_zline(120,Config->ServerName,"Flood from unregistered connection",current->GetIPString()); apply_lines(APPLY_ZLINES); } |