summaryrefslogtreecommitdiff
path: root/protocols/IRCG/commandmonitor.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
commitd5d023f683b23fe26ddea93738cb721d532804f0 (patch)
tree21e7398686c7a5d1604d58bfb71ca4329c84be66 /protocols/IRCG/commandmonitor.cpp
parente58823d961a630eb62e60d2ccb443761ba5f1704 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/commandmonitor.cpp')
-rw-r--r--protocols/IRCG/commandmonitor.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/protocols/IRCG/commandmonitor.cpp b/protocols/IRCG/commandmonitor.cpp
index 0f39828891..352d162c48 100644
--- a/protocols/IRCG/commandmonitor.cpp
+++ b/protocols/IRCG/commandmonitor.cpp
@@ -228,18 +228,11 @@ int CIrcProto::AddOutgoingMessageToDB(HANDLE hContact, TCHAR* msg)
dbei.szModule = m_szModuleName;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.timestamp = (DWORD)time(NULL);
- #if defined( _UNICODE )
- dbei.flags = DBEF_SENT + DBEF_UTF;
- dbei.pBlob = ( PBYTE )mir_utf8encodeW( S.c_str());
- #else
- dbei.flags = DBEF_SENT;
- dbei.pBlob = ( PBYTE )S.c_str();
- #endif
+ dbei.flags = DBEF_SENT + DBEF_UTF;
+ dbei.pBlob = ( PBYTE )mir_utf8encodeW( S.c_str());
dbei.cbBlob = (DWORD)strlen(( char* )dbei.pBlob) + 1;
CallService( MS_DB_EVENT_ADD, (WPARAM) hContact, (LPARAM) & dbei);
- #if defined( _UNICODE )
- mir_free( dbei.pBlob );
- #endif
+ mir_free( dbei.pBlob );
return 1;
}
@@ -733,18 +726,12 @@ bool CIrcProto::OnIrc_PRIVMSG( const CIrcMessage* pmsg )
ccs.hContact = CList_AddContact( &user, false, true );
ccs.lParam = (LPARAM)&pre;
pre.timestamp = (DWORD)time(NULL);
- #if defined( _UNICODE )
- pre.flags = PREF_UTF;
- pre.szMessage = mir_utf8encodeW( mess.c_str());
- #else
- pre.szMessage = ( char* )mess.c_str();
- #endif
+ pre.flags = PREF_UTF;
+ pre.szMessage = mir_utf8encodeW( mess.c_str());
setTString(ccs.hContact, "User", pmsg->prefix.sUser.c_str());
setTString(ccs.hContact, "Host", pmsg->prefix.sHost.c_str());
CallService( MS_PROTO_CHAINRECV, 0, (LPARAM) & ccs);
- #if defined( _UNICODE )
- mir_free( pre.szMessage );
- #endif
+ mir_free( pre.szMessage );
return true;
}
@@ -841,12 +828,8 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
else if (pmsg->m_bIncoming && command == _T("version")) {
PostIrcMessage( _T("/NOTICE %s \001VERSION Miranda IM %s (IRC v.%s%s), (c) 2003-09 J.Persson, G.Hazan\001"),
pmsg->prefix.sNick.c_str(), _T("%mirver"), _T("%version"),
- #if defined( _UNICODE )
- _T(" Unicode"));
- #else
- "" );
- #endif
-
+ _T(" Unicode"));
+
TCHAR temp[300];
mir_sntprintf( temp, SIZEOF(temp), TranslateT("CTCP VERSION requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);