From 380023e8536a6e9bfb450586cb7911b6cd3f4c59 Mon Sep 17 00:00:00 2001 From: imaginos Date: Mon, 13 Feb 2006 06:01:57 +0000 Subject: [PATCH] use u_short git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@653 726aef4b-f618-498e-8847-2d620e286838 --- modules/modperl.cpp | 6 +++--- modules/schat.cpp | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/modperl.cpp b/modules/modperl.cpp index f34cf9cc..59663757 100644 --- a/modules/modperl.cpp +++ b/modules/modperl.cpp @@ -115,7 +115,7 @@ public: m_iParentFD = -1; SetSockName( ZNCSOCK ); } - CPerlSock( const CS_STRING & sHost, int iPort, int iTimeout = 60 ) + CPerlSock( const CS_STRING & sHost, u_short iPort, int iTimeout = 60 ) : Csock( sHost, iPort, iTimeout ) { m_iParentFD = -1; @@ -126,7 +126,7 @@ public: // # OnSockDestroy( $sockhandle ) virtual ~CPerlSock(); - virtual Csock *GetSockObj( const CS_STRING & sHostname, int iPort ); + virtual Csock *GetSockObj( const CS_STRING & sHostname, u_short iPort ); void SetParentFD( int iFD ) { m_iParentFD = iFD; } void SetUsername( const CString & sUsername ) { m_sUsername = sUsername; } @@ -138,7 +138,7 @@ public: // # OnConnect( $sockhandle, $parentsockhandle ) virtual void Connected(); // # OnConnectionFrom( $sockhandle, $remotehost, $remoteport ) - virtual bool ConnectionFrom( const CS_STRING & sHost, int iPort ); + virtual bool ConnectionFrom( const CS_STRING & sHost, u_short iPort ); // # OnError( $sockhandle, $errno ) virtual void SockError( int iErrno ); // # OnConnectionRefused( $sockhandle ) diff --git a/modules/schat.cpp b/modules/schat.cpp index 4c52996f..a6dc5f00 100644 --- a/modules/schat.cpp +++ b/modules/schat.cpp @@ -21,6 +21,9 @@ using std::pair; * Author: imaginos * * $Log$ + * Revision 1.22 2006/02/13 06:01:57 imaginos + * use u_short + * * Revision 1.21 2005/09/26 23:09:05 prozacx * Removed const from args in a bunch of hooks * @@ -127,14 +130,14 @@ public: m_pModule = NULL; EnableReadLine(); } - CSChatSock( const CS_STRING & sHost, int iPort, int iTimeout = 60 ) + CSChatSock( const CS_STRING & sHost, u_short iPort, int iTimeout = 60 ) : Csock( sHost, iPort, iTimeout ) { m_pModule = NULL; EnableReadLine(); } - virtual Csock *GetSockObj( const CS_STRING & sHostname, int iPort ) + virtual Csock *GetSockObj( const CS_STRING & sHostname, u_short iPort ) { CSChatSock *p = new CSChatSock( sHostname, iPort ); p->SetModule( m_pModule ); @@ -143,7 +146,7 @@ public: return( p ); } - virtual bool ConnectionFrom( const CS_STRING & sHost, int iPort ) + virtual bool ConnectionFrom( const CS_STRING & sHost, u_short iPort ) { Close(); // close the listener after the first connection return( true );