diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-27 15:26:59 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-27 15:26:59 +0000 |
commit | 653638c68684ec035fd58bc2d0d91c9bf9aa2ab9 (patch) | |
tree | 364fd9cce4e2e8d6e86ddc3f1267b98dbed51854 /src/commands.cpp | |
parent | 469c2e7f5ad7d3f4d7d150d643ce363a650f19b9 (diff) |
Improved IP handling. Now uses in_addr to store client ip, not char[16]!
Added global and local session limits
All of this needs TESTING.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2934 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index e9b921beb..37f1fcef2 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -119,7 +119,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i WriteServ(user->fd,"311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname); if ((user == dest) || (strchr(user->modes,'o'))) { - WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, dest->ip); + WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, (char*)inet_ntoa(dest->ip4)); } std::string cl = chlist(dest,user); if (cl.length()) @@ -309,7 +309,7 @@ bool ip_matches_everyone(std::string ip, userrec* user) long matches = 0; for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++) { - if (match(u->second->ip,ip.c_str())) + if (match((char*)inet_ntoa(u->second->ip4),ip.c_str())) matches++; } float percent = ((float)matches / (float)clientlist.size()) * 100; |