]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
and a little tweak to remote MOTD too.
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index c26feade333245329bbf73332e54af646e86f8fb..3ab2f50be9b8d0b8a0dc2941f5130d7750e4c84e 100644 (file)
@@ -341,7 +341,7 @@ public:
                                        CGIResolver* r = new CGIResolver(this, ServerInstance, NotifyOpers, user->password, false, user, user->GetFd(), "PASS", cached);
                                        ServerInstance->AddResolver(r, cached);
                                }
-                               catch (ModuleException)
+                               catch (...)
                                {
                                        if (NotifyOpers)
                                                ServerInstance->WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), but i could not resolve their hostname!", user->nick, user->host);
@@ -385,10 +385,8 @@ public:
                if (user->GetProtocolFamily() == AF_INET6)
                        inet_pton(AF_INET6, newip, &((sockaddr_in6*)user->ip)->sin6_addr);
                else
-                       inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
-#else
-               inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
 #endif
+               inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
                                        
                try
                {
@@ -400,7 +398,7 @@ public:
                        CGIResolver* r = new CGIResolver(this, ServerInstance, NotifyOpers, newip, false, user, user->GetFd(), "IDENT", cached);
                        ServerInstance->AddResolver(r, cached);
                }
-               catch (ModuleException)
+               catch (...)
                {
                        strlcpy(user->host, newip, 16);
                        strlcpy(user->dhost, newip, 16);