diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-16 19:58:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-16 19:58:25 +0000 |
commit | 09dbf0f94815b40f6d2d1cdff272c7e45892f963 (patch) | |
tree | a8517155b3b241431a1516655301c5159d893826 /src/users.cpp | |
parent | d8fbbeafdf66acc0a47e59f6a06ae7813542c7ab (diff) |
Remove some casts
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4427 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp index fedc541af..c3d763855 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -431,7 +431,7 @@ void userrec::ClearBuffer() std::string userrec::GetBuffer() { - if (recvq == "") + if (!recvq.length()) return ""; /* Strip any leading \r or \n off the string. @@ -504,7 +504,7 @@ void userrec::SetWriteError(const std::string &error) { log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); // don't try to set the error twice, its already set take the first string. - if (this->WriteError == "") + if (!this->WriteError.length()) this->WriteError = error; } @@ -854,13 +854,13 @@ void FullConnectUser(userrec* user, CullList* Goners) if (FindMatchingLocal(user) > a.maxlocal) { Goners->AddItem(user,"No more connections allowed from your host via this connect class (local)"); - WriteOpers("*** WARNING: maximum LOCAL connections (%ld) exceeded for IP %s",a.maxlocal,(char*)inet_ntoa(user->ip4)); + WriteOpers("*** WARNING: maximum LOCAL connections (%ld) exceeded for IP %s",a.maxlocal,inet_ntoa(user->ip4)); return; } else if (FindMatchingGlobal(user) > a.maxglobal) { Goners->AddItem(user,"No more connections allowed from your host via this connect class (global)"); - WriteOpers("*** WARNING: maximum GLOBAL connections (%ld) exceeded for IP %s",a.maxglobal,(char*)inet_ntoa(user->ip4)); + WriteOpers("*** WARNING: maximum GLOBAL connections (%ld) exceeded for IP %s",a.maxglobal,inet_ntoa(user->ip4)); return; } @@ -928,7 +928,7 @@ void FullConnectUser(userrec* user, CullList* Goners) FOREACH_MOD(I_OnUserConnect,OnUserConnect(user)); FOREACH_MOD(I_OnGlobalConnect,OnGlobalConnect(user)); user->registered = 7; - WriteOpers("*** Client connecting on port %lu: %s!%s@%s [%s]",(unsigned long)user->port,user->nick,user->ident,user->host,(char*)inet_ntoa(user->ip4)); + WriteOpers("*** Client connecting on port %lu: %s!%s@%s [%s]",(unsigned long)user->port,user->nick,user->ident,user->host,inet_ntoa(user->ip4)); } /** ReHashNick() |