diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-29 21:07:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-29 21:07:07 +0000 |
commit | 2617e958bd0059dc3c0971b01de9c0059c1e1692 (patch) | |
tree | c6f03cbcd7b95503d3fe7608e492afd61d33764d /protocols/IRCG/src | |
parent | b4b636802237461d78dd0b8d33d5bedfd72a1025 (diff) |
unified project for IRC protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@13257 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/clist.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 8 | ||||
-rw-r--r-- | protocols/IRCG/src/input.cpp | 4 | ||||
-rw-r--r-- | protocols/IRCG/src/irclib.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/output.cpp | 6 | ||||
-rw-r--r-- | protocols/IRCG/src/scripting.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 20 | ||||
-rw-r--r-- | protocols/IRCG/src/stdafx.cxx (renamed from protocols/IRCG/src/stdafx.cpp) | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/stdafx.h (renamed from protocols/IRCG/src/irc.h) | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/tools.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/userinfo.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/windows.cpp | 4 |
15 files changed, 30 insertions, 32 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index e52c1c50d7..92fa0553df 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, unsigned long adr, int port)
{
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index eab057eac1..c6dbac79e0 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // This file holds functions that are called upon receiving
// certain commands from the server.
-#include "irc.h"
+#include "stdafx.h"
using namespace irc;
@@ -1591,7 +1591,7 @@ bool CIrcProto::OnIrc_BANLIST(const CIrcMessage* pmsg) S += pmsg->parameters[3];
if (pmsg->parameters.getCount() > 4) {
S += _T(" - ( ");
- time_t time = StrToInt(pmsg->parameters[4].c_str());
+ time_t time = _ttoi(pmsg->parameters[4].c_str());
S += _tctime(&time);
S.Replace(_T("\n"), _T(" "));
S += _T(")");
@@ -1703,7 +1703,7 @@ bool CIrcProto::OnIrc_WHOIS_END(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_WHOIS_IDLE(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0) {
- int S = StrToInt(pmsg->parameters[2].c_str());
+ int S = _ttoi(pmsg->parameters[2].c_str());
int D = S / (60 * 60 * 24);
S -= (D * 60 * 60 * 24);
int H = S / (60 * 60);
@@ -1880,7 +1880,7 @@ bool CIrcProto::OnIrc_ENDMOTD(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_NOOFCHANNELS(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1)
- m_noOfChannels = StrToInt(pmsg->parameters[1].c_str());
+ m_noOfChannels = _ttoi(pmsg->parameters[1].c_str());
if (pmsg->m_bIncoming && !bPerformDone)
DoOnConnect(pmsg);
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 58718df3cc..2d8a84dd97 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
#include "version.h"
#define NICKSUBSTITUTE _T("!_nick_!")
@@ -417,7 +417,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta CallFunctionAsync(sttSetTimerOff, this);
}
if (!mir_tstrcmpi(one.c_str(), _T("time")) && !two.IsEmpty()) {
- m_iTempCheckTime = StrToInt(two.c_str());
+ m_iTempCheckTime = _ttoi(two.c_str());
if (m_iTempCheckTime < 10 && m_iTempCheckTime != 0)
m_iTempCheckTime = 10;
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 97396f1b32..eaee830928 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "irc.h" +#include "stdafx.h" #define DCCCHATTIMEOUT 300 #define DCCSENDTIMEOUT 120 diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 7dd787fe5d..c70e78ab11 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
#include "version.h"
#include <m_genmenu.h>
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index 12760a4a8a..0da567113c 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
#include "version.h"
HINSTANCE hInst = NULL;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 3900273b4e..abc5ef02dd 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
#include <win2k.h>
static const CIrcProto* pZero = NULL;
diff --git a/protocols/IRCG/src/output.cpp b/protocols/IRCG/src/output.cpp index 016918f612..94eae7e12d 100644 --- a/protocols/IRCG/src/output.cpp +++ b/protocols/IRCG/src/output.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
static CMString FormatOutput(const CIrcMessage* pmsg)
{
@@ -50,7 +50,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) goto THE_END;
}
- int index = StrToInt(pmsg->sCommand.c_str());
+ int index = _ttoi(pmsg->sCommand.c_str());
if (index == 301 && pmsg->parameters.getCount() > 0) {
TCHAR temp[500]; *temp = '\0';
mir_sntprintf(temp, SIZEOF(temp), TranslateT("%s is away"), pmsg->parameters[1].c_str());
@@ -136,7 +136,7 @@ BOOL CIrcProto::ShowMessage(const CIrcMessage* pmsg) if (!pmsg->m_bIncoming)
mess.Replace(_T("%%"), _T("%"));
- int iTemp = StrToInt(pmsg->sCommand.c_str());
+ int iTemp = _ttoi(pmsg->sCommand.c_str());
//To active window
if ((iTemp > 400 || iTemp < 500) && pmsg->sCommand[0] == '4' //all error messages
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index 2da94329df..a88dbdbf4d 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
INT_PTR __cdecl CIrcProto::Scripting_InsertRawIn(WPARAM, LPARAM lParam)
{
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 9d0bed7754..0376a9d6a2 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
void CIrcProto::InitMainMenus(void)
{
@@ -446,11 +446,11 @@ static void DoChatFormatting(TCHAR* pszText) break;
case 'C':
if (p1[2] == '%' && p1[3] == 'F') {
- mir_tstrcpy(InsertThis, _T("\00399,99"));
+ mir_tstrcpy(InsertThis, _T("\x0399,99"));
iRemoveChars = 4;
}
else {
- mir_tstrcpy(InsertThis, _T("\00399"));
+ mir_tstrcpy(InsertThis, _T("\x0399"));
iRemoveChars = 2;
}
iFG = -1;
@@ -459,18 +459,18 @@ static void DoChatFormatting(TCHAR* pszText) if (p1 - 3 >= pszText && p1[-3] == '\003')
mir_tstrcpy(InsertThis, _T(","));
else if (iFG >= 0)
- mir_sntprintf(InsertThis, SIZEOF(InsertThis), _T("\003%u,"), iFG);
+ mir_sntprintf(InsertThis, SIZEOF(InsertThis), _T("\x03%u,"), iFG);
else
- mir_tstrcpy(InsertThis, _T("\00399,"));
+ mir_tstrcpy(InsertThis, _T("\x0399,"));
iRemoveChars = 2;
break;
case 'F':
if (iFG >= 0)
- mir_sntprintf(InsertThis, SIZEOF(InsertThis), _T("\003%u,99"), iFG);
+ mir_sntprintf(InsertThis, SIZEOF(InsertThis), _T("\x03%u,99"), iFG);
else
- mir_tstrcpy(InsertThis, _T("\00399,99"));
+ mir_tstrcpy(InsertThis, _T("\x0399,99"));
iRemoveChars = 2;
break;
@@ -1041,7 +1041,7 @@ void __cdecl CIrcProto::DisconnectServerThread(void*) void CIrcProto::ConnectToServer(void)
{
- m_portCount = StrToIntA(m_portStart);
+ m_portCount = atoi(m_portStart);
si.sServer = GetWord(m_serverName, 0);
si.iPort = m_portCount;
si.sNick = m_nick;
@@ -1049,7 +1049,7 @@ void CIrcProto::ConnectToServer(void) si.sFullName = m_name;
si.sPassword = m_password;
si.bIdentServer = ((m_ident) ? (true) : (false));
- si.iIdentServerPort = StrToInt(m_identPort);
+ si.iIdentServerPort = _ttoi(m_identPort);
si.sIdentServerType = m_identSystem;
si.m_iSSL = m_iSSL;
si.sNetwork = m_network;
@@ -1069,7 +1069,7 @@ void CIrcProto::ConnectToServer(void) InterlockedIncrement((long *)&m_bConnectRequested);
TCHAR szTemp[300];
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("\0033%s \002%s\002 (%S: %u)"),
+ mir_sntprintf(szTemp, SIZEOF(szTemp), _T("\033%s \002%s\002 (%S: %u)"),
TranslateT("Connecting to"), si.sNetwork.c_str(), si.sServer.c_str(), si.iPort);
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false);
}
diff --git a/protocols/IRCG/src/stdafx.cpp b/protocols/IRCG/src/stdafx.cxx index 432abe2979..0c766ea07f 100644 --- a/protocols/IRCG/src/stdafx.cpp +++ b/protocols/IRCG/src/stdafx.cxx @@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "irc.h"
\ No newline at end of file +#include "stdafx.h"
diff --git a/protocols/IRCG/src/irc.h b/protocols/IRCG/src/stdafx.h index 25518d16ec..1e6c4b683b 100644 --- a/protocols/IRCG/src/irc.h +++ b/protocols/IRCG/src/stdafx.h @@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _IRCWIN_H_
#define _IRCWIN_H_
-#define _CRT_SECURE_NO_WARNINGS
-
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index 45c7ded352..954665a01f 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index 6ea082678e..cbc85fe2c9 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
// 'User details' dialog
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index dc6e686b3e..ddac73b1c4 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "irc.h"
+#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
// Message Box
@@ -435,7 +435,7 @@ static int CALLBACK ListViewSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo return (*temp1 == 0) ? 1 : -1;
}
- return (StrToInt(temp1) < StrToInt(temp2)) ? 1 : -1;
+ return (_ttoi(temp1) < _ttoi(temp2)) ? 1 : -1;
}
int CListDlg::Resizer(UTILRESIZECONTROL *urc)
|