+ struct sockaddr_in addr;
+ long x = 0;
+
+ if (inet_aton(parameters[0], &addr.sin_addr) == 0)
+ {
+ /* hostname or other */
+ for (user_hash::const_iterator a = clientlist.begin(); a != clientlist.end(); a++)
+ {
+ if (match(a->second->host, parameters[0]) || match(a->second->dhost, parameters[0]))
+ {
+ /* host or vhost matches mask */
+ Srv->SendTo(NULL, user, checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
+ }
+ }
+ }
+ else
+ {
+ /* IP address */
+ for (user_hash::const_iterator a = clientlist.begin(); a != clientlist.end(); a++)
+ {
+ if (addr.sin_addr.s_addr == a->second->ip4.s_addr)
+ {
+ /* same IP. */
+ Srv->SendTo(NULL, user, checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
+ }
+ }
+ }
+
+ Srv->SendTo(NULL, user, checkstr + " matches " + ConvToStr(x));