summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
commit30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch)
treeb1dae7a6d545cdf622a165ba4c576d3a41d71221 /protocols
parent65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff)
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/JSON_CAJUN/elements.inl14
-rw-r--r--protocols/FacebookRM/chat.cpp12
-rw-r--r--protocols/FacebookRM/communication.cpp68
-rw-r--r--protocols/FacebookRM/connection.cpp22
-rw-r--r--protocols/FacebookRM/contacts.cpp18
-rw-r--r--protocols/FacebookRM/definitions.h2
-rw-r--r--protocols/FacebookRM/dialogs.cpp18
-rw-r--r--protocols/FacebookRM/events.cpp22
-rw-r--r--protocols/FacebookRM/json.cpp78
-rw-r--r--protocols/FacebookRM/list.hpp2
-rw-r--r--protocols/FacebookRM/main.cpp6
-rw-r--r--protocols/FacebookRM/messages.cpp20
-rw-r--r--protocols/FacebookRM/process.cpp48
-rw-r--r--protocols/FacebookRM/proto.cpp26
-rw-r--r--protocols/FacebookRM/theme.cpp2
-rw-r--r--protocols/FacebookRM/utils.cpp20
-rw-r--r--protocols/Gadu-Gadu/libgadu/sha1.c4
-rw-r--r--protocols/IRCG/MString.h150
-rw-r--r--protocols/IRCG/clist.cpp2
-rw-r--r--protocols/IRCG/commandmonitor.cpp66
-rw-r--r--protocols/IRCG/input.cpp28
-rw-r--r--protocols/IRCG/irclib.cpp14
-rw-r--r--protocols/IRCG/ircproto.cpp2
-rw-r--r--protocols/IRCG/options.cpp16
-rw-r--r--protocols/IRCG/output.cpp8
-rw-r--r--protocols/IRCG/scripting.cpp8
-rw-r--r--protocols/IRCG/services.cpp50
-rw-r--r--protocols/IRCG/tools.cpp8
-rw-r--r--protocols/IRCG/ui_utils.cpp2
-rw-r--r--protocols/IRCG/windows.cpp34
-rw-r--r--protocols/JabberG/MString.h150
-rw-r--r--protocols/JabberG/jabber.cpp2
-rw-r--r--protocols/JabberG/jabber_adhoc.cpp30
-rw-r--r--protocols/JabberG/jabber_agent.cpp14
-rw-r--r--protocols/JabberG/jabber_bookmarks.cpp6
-rw-r--r--protocols/JabberG/jabber_caps.cpp52
-rw-r--r--protocols/JabberG/jabber_captcha.cpp4
-rw-r--r--protocols/JabberG/jabber_chat.cpp20
-rw-r--r--protocols/JabberG/jabber_console.cpp6
-rw-r--r--protocols/JabberG/jabber_disco.cpp70
-rw-r--r--protocols/JabberG/jabber_disco.h10
-rw-r--r--protocols/JabberG/jabber_events.cpp2
-rw-r--r--protocols/JabberG/jabber_form.cpp32
-rw-r--r--protocols/JabberG/jabber_ft.cpp4
-rw-r--r--protocols/JabberG/jabber_groupchat.cpp12
-rw-r--r--protocols/JabberG/jabber_icolib.cpp6
-rw-r--r--protocols/JabberG/jabber_iq.cpp4
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp40
-rw-r--r--protocols/JabberG/jabber_iqid.cpp98
-rw-r--r--protocols/JabberG/jabber_list.cpp6
-rw-r--r--protocols/JabberG/jabber_menu.cpp12
-rw-r--r--protocols/JabberG/jabber_message_handlers.cpp12
-rw-r--r--protocols/JabberG/jabber_message_manager.cpp6
-rw-r--r--protocols/JabberG/jabber_misc.cpp8
-rw-r--r--protocols/JabberG/jabber_notes.cpp2
-rw-r--r--protocols/JabberG/jabber_opt.cpp16
-rw-r--r--protocols/JabberG/jabber_privacy.cpp94
-rw-r--r--protocols/JabberG/jabber_privacy.h12
-rw-r--r--protocols/JabberG/jabber_proto.cpp16
-rw-r--r--protocols/JabberG/jabber_rc.cpp74
-rw-r--r--protocols/JabberG/jabber_rc.h10
-rw-r--r--protocols/JabberG/jabber_search.cpp2
-rw-r--r--protocols/JabberG/jabber_svc.cpp6
-rw-r--r--protocols/JabberG/jabber_thread.cpp88
-rw-r--r--protocols/JabberG/jabber_userinfo.cpp28
-rw-r--r--protocols/JabberG/jabber_util.cpp24
-rw-r--r--protocols/JabberG/jabber_vcard.cpp6
-rw-r--r--protocols/JabberG/jabber_xml.cpp8
-rw-r--r--protocols/JabberG/jabber_xstatus.cpp16
-rw-r--r--protocols/JabberG/ui_utils.cpp2
-rw-r--r--protocols/MRA/MraAntiSpam.cpp4
-rw-r--r--protocols/MRA/MraAvatars.cpp2
-rw-r--r--protocols/MRA/MraFilesQueue.cpp2
-rw-r--r--protocols/MRA/MraPopUp.cpp2
-rw-r--r--protocols/MRA/Mra_options.cpp4
-rw-r--r--protocols/MRA/Mra_svcs.cpp4
-rw-r--r--protocols/MRA/Readme_MRA.txt2
-rw-r--r--protocols/MSN/msn_proto.cpp6
-rw-r--r--protocols/NewsAggregator/Src/Utils.cpp2
-rw-r--r--protocols/Omegle/chat.cpp12
-rw-r--r--protocols/Omegle/communication.cpp30
-rw-r--r--protocols/Omegle/connection.cpp6
-rw-r--r--protocols/Omegle/dialogs.cpp2
-rw-r--r--protocols/Omegle/main.cpp6
-rw-r--r--protocols/Omegle/messages.cpp2
-rw-r--r--protocols/Omegle/proto.cpp8
-rw-r--r--protocols/Omegle/theme.cpp2
-rw-r--r--protocols/Omegle/utils.cpp18
-rw-r--r--protocols/Twitter/chat.cpp10
-rw-r--r--protocols/Twitter/connection.cpp18
-rw-r--r--protocols/Twitter/contacts.cpp16
-rw-r--r--protocols/Twitter/http.cpp2
-rw-r--r--protocols/Twitter/main.cpp4
-rw-r--r--protocols/Twitter/proto.cpp10
-rw-r--r--protocols/Twitter/theme.cpp2
-rw-r--r--protocols/Twitter/twitter.cpp18
-rw-r--r--protocols/Twitter/twitter.h2
-rw-r--r--protocols/Twitter/ui.cpp24
-rw-r--r--protocols/Twitter/utility.cpp4
-rw-r--r--protocols/Weather/weather.cpp4
-rw-r--r--protocols/YAMN/browser/mailbrowser.cpp2
-rw-r--r--protocols/YAMN/main.cpp23
-rw-r--r--protocols/YAMN/proto/pop3/pop3comm.cpp2
-rw-r--r--protocols/Yahoo/avatar.cpp2
-rw-r--r--protocols/Yahoo/file_transfer.cpp2
-rw-r--r--protocols/Yahoo/http_gateway.cpp4
-rw-r--r--protocols/Yahoo/libyahoo2/libyahoo2.c6
-rw-r--r--protocols/Yahoo/libyahoo2/yahoo_httplib.c10
-rw-r--r--protocols/Yahoo/options.cpp2
-rw-r--r--protocols/Yahoo/proto.cpp6
-rw-r--r--protocols/Yahoo/server.cpp2
-rw-r--r--protocols/Yahoo/services.cpp4
-rw-r--r--protocols/Yahoo/util.cpp6
113 files changed, 1028 insertions, 1051 deletions
diff --git a/protocols/FacebookRM/JSON_CAJUN/elements.inl b/protocols/FacebookRM/JSON_CAJUN/elements.inl
index deb838cb3f..7febabc3a2 100644
--- a/protocols/FacebookRM/JSON_CAJUN/elements.inl
+++ b/protocols/FacebookRM/JSON_CAJUN/elements.inl
@@ -108,14 +108,14 @@ public:
-inline UnknownElement::UnknownElement() : m_pImp( new Imp_T<Null>( Null() ) ) {}
+inline UnknownElement::UnknownElement() : m_pImp( new Imp_T<Null>( Null()) ) {}
inline UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp( unknown.m_pImp->Clone()) {}
-inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T<Object>(object) ) {}
-inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T<Array>(array) ) {}
-inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T<Number>(number) ) {}
-inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T<Boolean>(boolean) ) {}
-inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T<String>(string) ) {}
-inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T<Null>(null) ) {}
+inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T<Object>(object)) {}
+inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T<Array>(array)) {}
+inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T<Number>(number)) {}
+inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T<Boolean>(boolean)) {}
+inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T<String>(string)) {}
+inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T<Null>(null)) {}
inline UnknownElement::~UnknownElement() { delete m_pImp; }
diff --git a/protocols/FacebookRM/chat.cpp b/protocols/FacebookRM/chat.cpp
index 2b66e730a1..db50207076 100644
--- a/protocols/FacebookRM/chat.cpp
+++ b/protocols/FacebookRM/chat.cpp
@@ -48,7 +48,7 @@ void FacebookProto::UpdateChat(const char *chat_id, const char *id, const char *
// Close chat window, if set
- ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(chat_id, FACEBOOK_SEND_MESSAGE ) );
+ ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(chat_id, FACEBOOK_SEND_MESSAGE ));
}
int FacebookProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
@@ -75,7 +75,7 @@ int FacebookProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
if (isOnline()) {
LOG("**Chat - Outgoing message: %s", text);
- ForkThread(&FacebookProto::SendChatMsgWorker, this, new send_chat(chat_id, msg) );
+ ForkThread(&FacebookProto::SendChatMsgWorker, this, new send_chat(chat_id, msg));
}
break;
@@ -198,9 +198,9 @@ void FacebookProto::AddChat(const char *id, const char *name)
// Create a user statuses
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
// Finish initialization
gcd.iType = GC_EVENT_CONTROL;
@@ -258,10 +258,10 @@ int FacebookProto::OnJoinChat(WPARAM,LPARAM suppress)
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
SetTopic("Omegle is a great way of meeting new friends!");
diff --git a/protocols/FacebookRM/communication.cpp b/protocols/FacebookRM/communication.cpp
index 90296b18e0..7cbaed3f8d 100644
--- a/protocols/FacebookRM/communication.cpp
+++ b/protocols/FacebookRM/communication.cpp
@@ -144,7 +144,7 @@ bool facebook_client::validate_response( http::response* resp )
try
{
pos += 8;
- int error_num = atoi( resp->data.substr( pos, resp->data.find( ",", pos ) - pos ).c_str() );
+ int error_num = atoi( resp->data.substr( pos, resp->data.find( ",", pos ) - pos ).c_str());
if ( error_num != 0 )
{
std::string error = "";
@@ -154,7 +154,7 @@ bool facebook_client::validate_response( http::response* resp )
error = resp->data.substr( pos, resp->data.find( "\"", pos ) - pos );
error = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( error ) ) );
+ utils::text::slashu_to_utf8( error )) );
}
@@ -215,7 +215,7 @@ DWORD facebook_client::choose_security_level( int request_type )
if (this->https_)
{
if ( request_type != FACEBOOK_REQUEST_MESSAGES_RECEIVE
- || DBGetContactSettingByte( NULL, parent->m_szModuleName, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL ) )
+ || DBGetContactSettingByte( NULL, parent->m_szModuleName, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL ))
return NLHRF_SSL;
}
@@ -451,7 +451,7 @@ std::string facebook_client::choose_action( int request_type, std::string* data,
action = "/pull?clientid=&channel=p_%s&seq=%s&cb=&state=active";
//utils::text::replace_first( &action, "%s", dtsg_ );
} else {
- utils::text::replace_first( &action, "%s", utils::time::unix_timestamp() );
+ utils::text::replace_first( &action, "%s", utils::time::unix_timestamp());
}
utils::text::replace_first( &action, "%s", self_.user_id );
@@ -485,8 +485,8 @@ std::string facebook_client::choose_action( int request_type, std::string* data,
std::string facebook_client::choose_request_url( int request_type, std::string* data, std::string* get_data )
{
std::string url = choose_proto( request_type );
- url.append( choose_server( request_type, data, get_data ) );
- url.append( choose_action( request_type, data, get_data ) );
+ url.append( choose_server( request_type, data, get_data ));
+ url.append( choose_action( request_type, data, get_data ));
return url;
}
@@ -497,7 +497,7 @@ NETLIBHTTPHEADER* facebook_client::get_request_headers( int request_type, int* h
else
*headers_count = 4;
- NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ) );
+ NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ));
if (request_type == REQUEST_POST)
{
@@ -531,7 +531,7 @@ char* facebook_client::load_cookies( )
std::string cookieString = "isfbe=false;";
- if ( !cookies.empty( ) )
+ if ( !cookies.empty( ))
for ( std::map< std::string, std::string >::iterator iter = cookies.begin(); iter != cookies.end(); ++iter )
{
cookieString.append( iter->first );
@@ -554,7 +554,7 @@ void facebook_client::store_headers( http::response* resp, NETLIBHTTPHEADER* hea
if ( header_name == "Set-Cookie" )
{
- std::string cookie_name = header_value.substr( 0, header_value.find( "=" ) );
+ std::string cookie_name = header_value.substr( 0, header_value.find( "=" ));
std::string cookie_value = header_value.substr( header_value.find( "=" ) + 1, header_value.find( ";" ) - header_value.find( "=" ) - 1 );
if ( cookie_value == "deleted" )
{
@@ -567,7 +567,7 @@ void facebook_client::store_headers( http::response* resp, NETLIBHTTPHEADER* hea
}
else
{ // TODO RM: (un)comment
- //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str() );
+ //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str());
resp->headers[header_name] = header_value;
}
}
@@ -577,7 +577,7 @@ void facebook_client::clear_cookies( )
{
ScopedLock s( cookies_lock_ );
- if ( !cookies.empty( ) )
+ if ( !cookies.empty( ))
cookies.clear( );
}
@@ -602,12 +602,12 @@ bool facebook_client::login(const std::string &username,const std::string &passw
// Process result data
validate_response(&resp);
- if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end() )
+ if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end())
{
// Check whether some Facebook things are required
if ( resp.headers["Location"].find("help.php") != std::string::npos )
{
- client_notify( TranslateT("Login error: Some Facebook things are required.") );
+ client_notify( TranslateT("Login error: Some Facebook things are required."));
parent->Log(" ! ! Login error: Some Facebook things are required.");
// return handle_error( "login", FORCE_DISCONNECT );
}
@@ -646,7 +646,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
}
}
- if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end() )
+ if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end())
{
// Check whether HTTPS connection is required and we don't have enabled it
if (!this->https_)
@@ -662,15 +662,15 @@ bool facebook_client::login(const std::string &username,const std::string &passw
}
// Check for Device ID
- if ( cookies["datr"].length() )
- DBWriteContactSettingString( NULL, parent->m_szModuleName, FACEBOOK_KEY_DEVICE_ID, cookies["datr"].c_str() );
+ if ( cookies["datr"].length())
+ DBWriteContactSettingString( NULL, parent->m_szModuleName, FACEBOOK_KEY_DEVICE_ID, cookies["datr"].c_str());
switch ( resp.code )
{
case HTTP_CODE_FAKE_DISCONNECTED:
{
// When is error only because timeout, try login once more
- if ( handle_error( "login" ) )
+ if ( handle_error( "login" ))
return login(username, password);
else
return false;
@@ -681,7 +681,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
// Check whether captcha code is required
if ( resp.data.find("id=\"captcha\"") != std::string::npos )
{
- client_notify( TranslateT("Login error: Captcha code is required. Bad login credentials?") );
+ client_notify( TranslateT("Login error: Captcha code is required. Bad login credentials?"));
parent->Log(" ! ! Login error: Captcha code is required.");
return handle_error( "login", FORCE_DISCONNECT );
}
@@ -691,9 +691,9 @@ bool facebook_client::login(const std::string &username,const std::string &passw
utils::text::special_expressions_decode(
utils::text::remove_html(
utils::text::edit_html(
- utils::text::source_get_value( &resp.data, 2, "id=\"standard_error\">", "</h2>" ) ) ) ) );
+ utils::text::source_get_value( &resp.data, 2, "id=\"standard_error\">", "</h2>" )) )) );
- if ( !error_str.length() )
+ if ( !error_str.length())
error_str = Translate("Unknown login error");
parent->Log(" ! ! Login error: %s", error_str.c_str());
@@ -708,7 +708,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
return handle_error( "login", FORCE_DISCONNECT );
case HTTP_CODE_FOUND: // Found and redirected to Home, Logged in, everything is OK
- if ( cookies.find("c_user") != cookies.end() )
+ if ( cookies.find("c_user") != cookies.end())
{
this->self_.user_id = cookies.find("c_user")->second;
DBWriteContactSettingString(NULL,parent->m_szModuleName,FACEBOOK_KEY_ID,this->self_.user_id.c_str());
@@ -724,7 +724,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
bool facebook_client::logout( )
{
- if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, FACEBOOK_KEY_DISABLE_LOGOUT, 0) )
+ if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, FACEBOOK_KEY_DISABLE_LOGOUT, 0))
return true;
handle_entry( "logout" );
@@ -769,13 +769,13 @@ bool facebook_client::home( )
if ( resp.data.find( "id=\"navAccountName\"" ) != std::string::npos )
{ // Backup for old fb version
// Get real_name
- this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 2, " id=\"navAccountName\">", "</a" ) ) );
+ this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 2, " id=\"navAccountName\">", "</a" )) );
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NAME,this->self_.real_name.c_str());
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NICK,this->self_.real_name.c_str());
parent->Log(" Got self real name: %s", this->self_.real_name.c_str());
} else if ( resp.data.find("id=\"pageNav\"") != std::string::npos ) {
// Get real_name
- this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 3, " class=\"headerTinymanName\"", ">", "</a" ) ) );
+ this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 3, " class=\"headerTinymanName\"", ">", "</a" )) );
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NAME,this->self_.real_name.c_str());
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NICK,this->self_.real_name.c_str());
parent->Log(" Got self real name: %s", this->self_.real_name.c_str());
@@ -789,7 +789,7 @@ bool facebook_client::home( )
if (avatar.empty())
avatar = utils::text::source_get_value( &resp.data, 3, "class=\"fbxWelcomeBoxImg", "src=\"", "\"" );
- this->self_.image_url = utils::text::trim( utils::text::special_expressions_decode( avatar ) );
+ this->self_.image_url = utils::text::trim( utils::text::special_expressions_decode( avatar ));
parent->Log(" Got self avatar: %s", this->self_.image_url.c_str());
parent->CheckAvatarChange(NULL, this->self_.image_url);
@@ -810,18 +810,18 @@ bool facebook_client::home( )
if (!DBGetContactSettingByte(NULL,parent->m_szModuleName,FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES))
{
str_count = utils::text::source_get_value( &resp.data, 2, "<span id=\"messagesCountValue\">", "</span>" );
- if ( str_count.length() && str_count != std::string( "0" ) )
+ if ( str_count.length() && str_count != std::string( "0" ))
{
std::string message = Translate("Got new messages: ") + str_count;
TCHAR* tmessage = mir_a2t(message.c_str());
- parent->NotifyEvent( parent->m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER, TEXT(FACEBOOK_URL_MESSAGES) );
+ parent->NotifyEvent( parent->m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER, TEXT(FACEBOOK_URL_MESSAGES));
mir_free( tmessage );
}
}
str_count = utils::text::source_get_value( &resp.data, 2, "<span id=\"notificationsCountValue\">", "</span>" );
- if ( str_count.length() && str_count != std::string( "0" ) )
+ if ( str_count.length() && str_count != std::string( "0" ))
{
// Parse notifications directly to popups
ForkThread( &FacebookProto::ProcessNotifications, this->parent, NULL );
@@ -839,7 +839,7 @@ bool facebook_client::home( )
if (!id.empty()) {
std::string name = utils::text::source_get_value( &item, 3, "class=\"linkWrap", ">", "</div>" );
- name = utils::text::special_expressions_decode(utils::text::slashu_to_utf8( name ) );
+ name = utils::text::special_expressions_decode(utils::text::slashu_to_utf8( name ));
parent->Log(" Got new group chat: %s (id: %s)", name.c_str(), id.c_str());
if (!name.empty())
parent->AddChat(id.c_str(), name.c_str());
@@ -1112,9 +1112,9 @@ bool facebook_client::send_message( std::string message_recipient, std::string m
data += "&recipients[0]=";
data += message_recipient;
data += "&lsd=&fb_dtsg=";
- data += ( dtsg_.length( ) ) ? dtsg_ : "0";
+ data += ( dtsg_.length( )) ? dtsg_ : "0";
data += "&post_form_id=";
- data += ( post_form_id_.length( ) ) ? post_form_id_ : "0";
+ data += ( post_form_id_.length( )) ? post_form_id_ : "0";
resp = flap( FACEBOOK_REQUEST_ASYNC, &data );
}
@@ -1215,7 +1215,7 @@ bool facebook_client::set_status(const std::string &status_text)
data += "&fb_dtsg=" + (this->dtsg_.length() ? this->dtsg_ : "0");
data += "&target_id=" + this->self_.user_id;
- if ( status_text.length( ) )
+ if ( status_text.length( ))
{
data += "&action=PROFILE_UPDATE&app_id=&hey_kid_im_a_composer=true&display_context=profile&_log_display_context=profile&ajax_log=1";
data += "&status=" + utils::url::encode( status_text );
@@ -1250,12 +1250,12 @@ bool facebook_client::save_url(const std::string &url,const std::tstring &filena
req.nlc = nlc;
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(this->parent->m_hNetlibUser), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(this->parent->m_hNetlibUser), reinterpret_cast<LPARAM>(&req)));
if ( resp )
{
nlc = resp->nlc;
- parent->Log( "@@@@@ Saving avatar URL %s to path %s", url.c_str(), filename.c_str() );
+ parent->Log( "@@@@@ Saving avatar URL %s to path %s", url.c_str(), filename.c_str());
// Create folder if necessary
std::tstring dir = filename.substr(0,filename.rfind('\\'));
diff --git a/protocols/FacebookRM/connection.cpp b/protocols/FacebookRM/connection.cpp
index 5d955d917f..4ae173d60d 100644
--- a/protocols/FacebookRM/connection.cpp
+++ b/protocols/FacebookRM/connection.cpp
@@ -43,7 +43,7 @@ void FacebookProto::ChangeStatus(void*)
SetEvent(update_loop_lock_);
Netlib_Shutdown(facy.hMsgCon);
- if ( getByte(FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT) )
+ if ( getByte(FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT))
facy.chat_state( false );
facy.logout( );
@@ -82,7 +82,7 @@ void FacebookProto::ChangeStatus(void*)
ResetEvent(update_loop_lock_);
- if ( NegotiateConnection( ) )
+ if ( NegotiateConnection( ))
{
facy.last_feeds_update_ = ::time( NULL );
@@ -97,7 +97,7 @@ void FacebookProto::ChangeStatus(void*)
if (getByte(FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES))
ForkThread( &FacebookProto::ProcessUnreadMessages, this );
- setDword( "LogonTS", (DWORD)time(NULL) );
+ setDword( "LogonTS", (DWORD)time(NULL));
ForkThread( &FacebookProto::UpdateLoop, this );
ForkThread( &FacebookProto::MessageLoop, this );
@@ -146,7 +146,7 @@ bool FacebookProto::NegotiateConnection( )
DBVARIANT dbv = {0};
error = true;
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_LOGIN,&dbv))
{
user = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -159,7 +159,7 @@ bool FacebookProto::NegotiateConnection( )
}
error = true;
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -174,7 +174,7 @@ bool FacebookProto::NegotiateConnection( )
}
// Load machine name
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_DEVICE_ID,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_DEVICE_ID,&dbv))
{
facy.cookies["datr"] = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -195,11 +195,11 @@ void FacebookProto::UpdateLoop(void *)
{
if ( i != -1 ) {
if ( !facy.invisible_ )
- if ( !facy.buddy_list( ) )
+ if ( !facy.buddy_list( ))
break;
}
- if ( i == 2 && getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ) )
- if ( !facy.feeds( ) )
+ if ( i == 2 && getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ))
+ if ( !facy.feeds( ))
break;
if ( i == 49 )
@@ -220,9 +220,9 @@ void FacebookProto::MessageLoop(void *)
time_t tim = ::time(NULL);
LOG( ">>>>> Entering Facebook::MessageLoop[%d]", tim );
- while ( facy.channel( ) )
+ while ( facy.channel( ))
{
- if ( isOffline() )
+ if ( isOffline())
break;
LOG( "***** FacebookProto::MessageLoop[%d] refreshing...", tim );
}
diff --git a/protocols/FacebookRM/contacts.cpp b/protocols/FacebookRM/contacts.cpp
index 32cc1ce269..ab953e809d 100644
--- a/protocols/FacebookRM/contacts.cpp
+++ b/protocols/FacebookRM/contacts.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if( proto && strcmp(m_szModuleName,proto) == 0 )
{
@@ -42,13 +42,13 @@ HANDLE FacebookProto::ChatIDToHContact(std::string chat_id)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact, true))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,"ChatRoomID",&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,"ChatRoomID",&dbv))
{
if( strcmp(chat_id.c_str(),dbv.pszVal) == 0 )
{
@@ -67,13 +67,13 @@ HANDLE FacebookProto::ContactIDToHContact(std::string user_id)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
if( strcmp(user_id.c_str(),dbv.pszVal) == 0 )
{
@@ -115,7 +115,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, BYTE type, bool dont_
DBDeleteContactSetting(hContact, "CList", "MyHandle");
DBVARIANT dbv;
- if( !DBGetContactSettingTString(NULL,m_szModuleName,FACEBOOK_KEY_DEF_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(NULL,m_szModuleName,FACEBOOK_KEY_DEF_GROUP,&dbv))
{
DBWriteContactSettingTString(hContact,"CList","Group",dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -200,7 +200,7 @@ void FacebookProto::DeleteContactFromServer(void *data)
NotifyEvent(m_tszUserName, TranslateT("Contact was removed from your server list."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when removing contact from server.") );
+ facy.client_notify( TranslateT("Error occured when removing contact from server."));
}
if (resp.code != HTTP_CODE_OK)
@@ -244,7 +244,7 @@ void FacebookProto::AddContactToServer(void *data)
NotifyEvent(m_tszUserName, TranslateT("Request for friendship was sent."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when requesting friendship.") );
+ facy.client_notify( TranslateT("Error occured when requesting friendship."));
}
if (resp.code != HTTP_CODE_OK)
@@ -314,7 +314,7 @@ void FacebookProto::CancelFriendsRequest(void *data)
DBWriteContactSettingByte(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, FACEBOOK_CONTACT_NONE);
NotifyEvent(m_tszUserName, TranslateT("Request for friendship was canceled."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when canceling friendship request.") );
+ facy.client_notify( TranslateT("Error occured when canceling friendship request."));
}
if (resp.code != HTTP_CODE_OK)
diff --git a/protocols/FacebookRM/definitions.h b/protocols/FacebookRM/definitions.h
index 5a862438d8..94efdb128b 100644
--- a/protocols/FacebookRM/definitions.h
+++ b/protocols/FacebookRM/definitions.h
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CODE_BLOCK_END }
#define FLAG_CONTAINS(x,y) ( ( x & y ) == y )
-#define REMOVE_FLAG(x,y) ( x = ( x & ~y ) )
+#define REMOVE_FLAG(x,y) ( x = ( x & ~y ))
#define LOG Log
diff --git a/protocols/FacebookRM/dialogs.cpp b/protocols/FacebookRM/dialogs.cpp
index 02ce022d5b..9eb1b3b2d5 100644
--- a/protocols/FacebookRM/dialogs.cpp
+++ b/protocols/FacebookRM/dialogs.cpp
@@ -50,13 +50,13 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv))
{
SetDlgItemTextA(hwnd,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -74,11 +74,11 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
if ( LOWORD( wparam ) == IDC_NEWACCOUNTLINK )
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ( FACEBOOK_URL_HOMEPAGE ) );
+ ( FACEBOOK_URL_HOMEPAGE ));
return TRUE;
}
- if ( HIWORD( wparam ) == EN_CHANGE && reinterpret_cast<HWND>(lparam) == GetFocus() )
+ if ( HIWORD( wparam ) == EN_CHANGE && reinterpret_cast<HWND>(lparam) == GetFocus())
{
switch(LOWORD(wparam))
{
@@ -195,13 +195,13 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv))
{
SetDlgItemTextA(hwnd,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,reinterpret_cast<LPARAM>(dbv.pszVal));
SetDlgItemTextA(hwnd,IDC_PW,dbv.pszVal);
@@ -216,7 +216,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SendDlgItemMessage(hwnd, IDC_GROUP, EM_LIMITTEXT, FACEBOOK_GROUP_NAME_LIMIT, 0);
- if ( !DBGetContactSettingTString(0,proto->ModuleName(),FACEBOOK_KEY_DEF_GROUP,&dbv) )
+ if ( !DBGetContactSettingTString(0,proto->ModuleName(),FACEBOOK_KEY_DEF_GROUP,&dbv))
{
SetDlgItemText(hwnd,IDC_GROUP,dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -232,7 +232,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
if ( LOWORD( wparam ) == IDC_NEWACCOUNTLINK )
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ( FACEBOOK_URL_HOMEPAGE ) );
+ ( FACEBOOK_URL_HOMEPAGE ));
return TRUE;
}
@@ -412,7 +412,7 @@ INT_PTR CALLBACK FBEventsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
} return TRUE;
case WM_COMMAND: {
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_PREVIEW:
{
diff --git a/protocols/FacebookRM/events.cpp b/protocols/FacebookRM/events.cpp
index 2f93a58335..5d01df88df 100644
--- a/protocols/FacebookRM/events.cpp
+++ b/protocols/FacebookRM/events.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int FacebookProto::Log(const char *fmt,...)
{
- if ( !getByte( FACEBOOK_KEY_LOGGING_ENABLE, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_LOGGING_ENABLE, 0 ))
return EXIT_SUCCESS;
va_list va;
@@ -52,7 +52,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
if ( url.substr(0,4) != "http" )
url = FACEBOOK_URL_HOMEPAGE + url; // make absolute url
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) url.c_str() );
+ CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) url.c_str());
}
// After a click, destroy popup
@@ -85,9 +85,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
switch ( flags )
{
case FACEBOOK_EVENT_CLIENT:
- if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_CLIENT_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_CLIENT_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -97,9 +97,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_NEWSFEED:
- if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_FEEDS_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_FEEDS_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -110,9 +110,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_NOTIFICATION:
- if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -123,9 +123,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_OTHER:
- if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_OTHER_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_OTHER_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -136,7 +136,7 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
}
- if ( !getByte(FACEBOOK_KEY_SYSTRAY_NOTIFY,DEFAULT_SYSTRAY_NOTIFY) )
+ if ( !getByte(FACEBOOK_KEY_SYSTRAY_NOTIFY,DEFAULT_SYSTRAY_NOTIFY))
{
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
diff --git a/protocols/FacebookRM/json.cpp b/protocols/FacebookRM/json.cpp
index bb92cb4434..b9bf8915a8 100644
--- a/protocols/FacebookRM/json.cpp
+++ b/protocols/FacebookRM/json.cpp
@@ -40,14 +40,14 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
const Object& objRoot = objDocument;
/* const Array& wasAvailableIDs = objRoot["payload"]["buddy_list"]["wasAvailableIDs"];
- for ( Array::const_iterator itWasAvailable( wasAvailableIDs.Begin() );
+ for ( Array::const_iterator itWasAvailable( wasAvailableIDs.Begin());
itWasAvailable != wasAvailableIDs.End(); ++itWasAvailable)
{
const Number& member = *itWasAvailable;
char was_id[32];
lltoa( member.Value(), was_id, 10 );
- current = buddy_list->find( std::string( was_id ) );
+ current = buddy_list->find( std::string( was_id ));
if ( current != NULL )
current->status_id = ID_STATUS_OFFLINE;
}*/ // Facebook removed support for "wasAvailableIDs"
@@ -61,7 +61,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
if (DBGetContactSettingByte(NULL,proto->m_szModuleName,FACEBOOK_KEY_LOAD_MOBILE, DEFAULT_LOAD_MOBILE)) {
const Array& mobileFriends = objRoot["payload"]["buddy_list"]["mobile_friends"];
- for ( Array::const_iterator buddy( mobileFriends.Begin() ); buddy != mobileFriends.End(); ++buddy) {
+ for ( Array::const_iterator buddy( mobileFriends.Begin()); buddy != mobileFriends.End(); ++buddy) {
const Number& member = *buddy;
char was_id[32];
lltoa( member.Value(), was_id, 10 );
@@ -71,7 +71,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
current = buddy_list->find( id );
if ( current == NULL) {
- buddy_list->insert( std::make_pair( id, new facebook_user( ) ) );
+ buddy_list->insert( std::make_pair( id, new facebook_user( )) );
current = buddy_list->find( id );
current->user_id = id;
}
@@ -94,7 +94,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
if ( current == NULL) {
if (idle) continue; // Just little optimalization
- buddy_list->insert( std::make_pair( member.name, new facebook_user( ) ) );
+ buddy_list->insert( std::make_pair( member.name, new facebook_user( )) );
current = buddy_list->find( member.name );
current->user_id = current->real_name = member.name;
}
@@ -118,23 +118,23 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
const String& imageUrl = objMember["thumbSrc"];
current->real_name = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( realName.Value( ) ) );
+ utils::text::special_expressions_decode( realName.Value( )) );
current->image_url = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( imageUrl.Value( ) ) );
+ utils::text::special_expressions_decode( imageUrl.Value( )) );
}
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -154,7 +154,7 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
const Object& objRoot = objDocument;
const Object& payload = objRoot["payload"];
- for ( Object::const_iterator payload_item( payload.Begin() ); payload_item != payload.End(); ++payload_item)
+ for ( Object::const_iterator payload_item( payload.Begin()); payload_item != payload.End(); ++payload_item)
{
const Object::Member& member = *payload_item;
@@ -169,9 +169,9 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
fbu->user_id = member.name;
fbu->real_name = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( realName.Value() ) );
+ utils::text::special_expressions_decode( realName.Value()) );
fbu->image_url = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( imageUrl.Value() ) );
+ utils::text::special_expressions_decode( imageUrl.Value()) );
if (gender.Value() == 1) {
fbu->gender = 70; // female
@@ -179,21 +179,21 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
fbu->gender = 77; // male
}
- friends->insert( std::make_pair( member.name, fbu ) );
+ friends->insert( std::make_pair( member.name, fbu ));
}
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -214,7 +214,7 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
const Object& objRoot = objDocument;
const Object& payload = objRoot["payload"]["notifications"];
- for ( Object::const_iterator payload_item( payload.Begin() ); payload_item != payload.End(); ++payload_item)
+ for ( Object::const_iterator payload_item( payload.Begin()); payload_item != payload.End(); ++payload_item)
{
const Object::Member& member = *payload_item;
@@ -227,11 +227,11 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
continue;
std::string text = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( content.Value() ) );
+ utils::text::special_expressions_decode( content.Value()) );
facebook_notification* notification = new facebook_notification( );
- notification->text = utils::text::remove_html( utils::text::source_get_value(&text, 1, "<abbr") );
+ notification->text = utils::text::remove_html( utils::text::source_get_value(&text, 1, "<abbr"));
notification->link = utils::text::source_get_value(&text, 3, "<a ", "href=\"", "\"");
notifications->push_back( notification );
@@ -240,16 +240,16 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -301,8 +301,8 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
last_msg = text.Value();
facebook_message* message = new facebook_message( );
message->message_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
- message->time = utils::time::fix_timestamp( time_sent.Value() );
+ utils::text::slashu_to_utf8( text.Value( )) );
+ message->time = utils::time::fix_timestamp( time_sent.Value());
message->user_id = was_id;
messages->push_back( message );
@@ -344,19 +344,19 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
facebook_message* message = new facebook_message( );
message->message_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
message->sender_name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( sender_name.Value( ) ) );
+ utils::text::slashu_to_utf8( sender_name.Value( )) );
- message->time = utils::time::fix_timestamp( time_sent.Value() );
+ message->time = utils::time::fix_timestamp( time_sent.Value());
message->user_id = was_id; // TODO: Check if we have contact with this ID in friendlist and then do something different?
if (row.find("uiSplitPic",0) != std::string::npos) {
// This is multiuser message
std::string authors = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( row ) );
+ utils::text::slashu_to_utf8( row ));
authors = utils::text::source_get_value(&authors, 2, "<strong class=\"authors\">", "<");
const String& to_id = messageContent["tid"];
@@ -410,17 +410,17 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
const String& text = messageContent["text"];
std::string msg = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
std::string name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( ) ) );
+ utils::text::slashu_to_utf8( from_name.Value( )) );
// Add contact into chat, if isn't there already
if (!proto->IsChatContact(group_id, was_id))
proto->AddChatContact(group_id, was_id, name.c_str());
const Number& time_sent = messageContent["time"];
- DWORD timestamp = utils::time::fix_timestamp( time_sent.Value() );
+ DWORD timestamp = utils::time::fix_timestamp( time_sent.Value());
// Add message into chat
proto->UpdateChat(group_id, was_id, name.c_str(), msg.c_str(), timestamp);
@@ -447,15 +447,15 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
std::string popup_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( ) ) );
+ utils::text::slashu_to_utf8( from_name.Value( )) );
popup_text += ": ";
popup_text += utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
std::string title = Translate("Multichat");
title += ": ";
title += utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( to_name.Value( ) ) );
+ utils::text::slashu_to_utf8( to_name.Value( )) );
std::string url = "/?action=read&sk=inbox&page&query&tid=";
url += to_id.Value();
@@ -487,9 +487,9 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
facebook_notification* notification = new facebook_notification( );
notification->text = utils::text::remove_html(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) ));
- notification->link = utils::text::special_expressions_decode( link.Value( ) );
+ notification->link = utils::text::special_expressions_decode( link.Value( ));
notifications->push_back( notification );
}
@@ -526,12 +526,12 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log ( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log ( "!!!!! Caught json::Exception: %s", e.what());
}
return EXIT_SUCCESS;
diff --git a/protocols/FacebookRM/list.hpp b/protocols/FacebookRM/list.hpp
index 597a2b413e..7a26aec1ec 100644
--- a/protocols/FacebookRM/list.hpp
+++ b/protocols/FacebookRM/list.hpp
@@ -86,7 +86,7 @@ namespace List
void insert( Item< T >* item )
{
- if ( this->empty( ) )
+ if ( this->empty( ))
{
this->first = this->last = item;
this->count = 1;
diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp
index b6f4c3af1b..8725af285e 100644
--- a/protocols/FacebookRM/main.cpp
+++ b/protocols/FacebookRM/main.cpp
@@ -98,7 +98,7 @@ static int protoUninit(PROTO_INTERFACE* proto)
int OnModulesLoaded(WPARAM,LPARAM)
{
- if ( ServiceExists( MS_UPDATE_REGISTER ) )
+ if ( ServiceExists( MS_UPDATE_REGISTER ))
{
Update upd = {sizeof(upd)};
char curr_version[30];
@@ -114,7 +114,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
#else
upd.szBetaUpdateURL = "http://robyer.info/stahni/facebookRM.zip";
#endif
- upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -134,7 +134,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/protocols/FacebookRM/messages.cpp b/protocols/FacebookRM/messages.cpp
index def7a6b64b..1f6d80a6d5 100644
--- a/protocols/FacebookRM/messages.cpp
+++ b/protocols/FacebookRM/messages.cpp
@@ -26,9 +26,9 @@ int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
DBVARIANT dbv;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
- ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ) );
+ ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ));
DBFreeVariant(&dbv);
}
@@ -49,11 +49,11 @@ void FacebookProto::SendMsgWorker(void *p)
DBVARIANT dbv;
- if ( !isOnline( ) )
+ if ( !isOnline( ))
{
ProtoBroadcastAck(m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
}
- else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
int retries = 5;
std::string error_text = "";
@@ -64,7 +64,7 @@ void FacebookProto::SendMsgWorker(void *p)
}
if (result) {
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS, data->msgid,0);
- MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ) );
+ MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ));
} else {
char *err = mir_utf8decodeA(error_text.c_str());
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, data->msgid,(LPARAM)err);
@@ -118,7 +118,7 @@ int FacebookProto::SendMsg(HANDLE hContact, int flags, const char *msg)
msg = mir_utf8encode(msg);
facy.msgid_ = (facy.msgid_ % 1024)+1;
- ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_) );
+ ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_));
return facy.msgid_;
}
@@ -146,14 +146,14 @@ void FacebookProto::SendTypingWorker(void *p)
facy.is_typing_ = (typing->status == PROTOTYPE_SELFTYPING_ON);
SleepEx( 2000, true );
- if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON) )
+ if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON))
{
delete typing;
return;
}
DBVARIANT dbv;
- if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string data = "typ=";
data += ( typing->status == PROTOTYPE_SELFTYPING_ON ) ? "1" : "0"; // PROTOTYPE_SELFTYPING_OFF
@@ -162,7 +162,7 @@ void FacebookProto::SendTypingWorker(void *p)
data += "&source=mercury-chat";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&post_form_id=";
- data += ( facy.post_form_id_.length( ) ) ? facy.post_form_id_ : "0";
+ data += ( facy.post_form_id_.length( )) ? facy.post_form_id_ : "0";
data += "&post_form_id_source=AsyncRequest&lsd=&phstamp=0&__user=";
data += facy.self_.user_id;
@@ -184,7 +184,7 @@ void FacebookProto::MessagingWorker(void *p)
if (data->type == FACEBOOK_RECV_MESSAGE)
facy.chat_mark_read( data->user_id );
-// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ) )
+// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ))
// facy.close_chat( data->user_id );
delete data;
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp
index 09bdd2ac79..f8ffa7e1ce 100644
--- a/protocols/FacebookRM/process.cpp
+++ b/protocols/FacebookRM/process.cpp
@@ -31,7 +31,7 @@ void FacebookProto::ProcessBuddyList( void* data )
std::string* resp = (std::string*)data;
- if ( isOffline() )
+ if ( isOffline())
goto exit;
LOG("***** Starting processing buddy list");
@@ -81,7 +81,7 @@ void FacebookProto::ProcessBuddyList( void* data )
}
// Wasn't contact removed from "server-list" someday?
- if ( DBGetContactSettingDword(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED, 0) ) {
+ if ( DBGetContactSettingDword(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED, 0)) {
DBDeleteContactSetting(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED);
std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
@@ -131,14 +131,14 @@ void FacebookProto::ProcessFriendList( void* data )
// Check and update old contacts
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if (!IsMyContact(hContact))
continue;
DBVARIANT dbv;
facebook_user *fbu;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv)) {
std::string id = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -158,9 +158,9 @@ void FacebookProto::ProcessFriendList( void* data )
DBWriteContactSettingByte(hContact, m_szModuleName, "Gender", fbu->gender);
// Update real name
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) )
+ if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv))
{
- update_required = strcmp( dbv.pszVal, fbu->real_name.c_str() ) != 0;
+ update_required = strcmp( dbv.pszVal, fbu->real_name.c_str()) != 0;
DBFreeVariant(&dbv);
}
if ( update_required )
@@ -175,7 +175,7 @@ void FacebookProto::ProcessFriendList( void* data )
}
// Wasn't contact removed from "server-list" someday?
- if ( DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_DELETED, 0) ) {
+ if ( DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_DELETED, 0)) {
DBDeleteContactSetting(hContact, m_szModuleName, FACEBOOK_KEY_DELETED);
std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
@@ -204,7 +204,7 @@ void FacebookProto::ProcessFriendList( void* data )
DBWriteContactSettingByte(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, FACEBOOK_CONTACT_NONE);
std::string contactname = id;
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
+ if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
contactname = dbv.pszVal;
DBFreeVariant(&dbv);
}
@@ -253,7 +253,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string get_data = "sk=inbox&query=is%3Aunread";
std::string data = "post_form_id=";
- data += ( facy.post_form_id_.length( ) ) ? facy.post_form_id_ : "0";
+ data += ( facy.post_form_id_.length( )) ? facy.post_form_id_ : "0";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&post_form_id_source=AsyncRequest&lsd=&phstamp=";
data += utils::time::mili_timestamp();
@@ -277,7 +277,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string::size_type pos = 0;
- while ( ( pos = threadlist.find( "<li class=\\\"threadRow noDraft unread", pos ) ) != std::string::npos )
+ while ( ( pos = threadlist.find( "<li class=\\\"threadRow noDraft unread", pos )) != std::string::npos )
{
std::string::size_type pos2 = threadlist.find( "/li>", pos );
std::string thread_content = threadlist.substr( pos, pos2 - pos );
@@ -313,7 +313,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
// TODO: maybe create new "receiveMsg" function and use it for offline and channel messages?
pos2 = 0;
- while ( ( pos2 = messageslist.find( "class=\\\"MessagingMessage ", pos2 ) ) != std::string::npos ) {
+ while ( ( pos2 = messageslist.find( "class=\\\"MessagingMessage ", pos2 )) != std::string::npos ) {
pos2 += 8;
std::string strclass = messageslist.substr(pos2, messageslist.find("\\\"", pos2) - pos2);
@@ -325,10 +325,10 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string messagesgroup = messageslist.substr( pos2, pos3 - pos2 );
DWORD timestamp = utils::conversion::to_timestamp(
- utils::text::source_get_value( &messagesgroup, 2, "data-utime=\\\"", "\\\"" ) );
+ utils::text::source_get_value( &messagesgroup, 2, "data-utime=\\\"", "\\\"" ));
pos3 = 0;
- while ( ( pos3 = messagesgroup.find( "class=\\\"content noh", pos3 ) ) != std::string::npos )
+ while ( ( pos3 = messagesgroup.find( "class=\\\"content noh", pos3 )) != std::string::npos )
{
std::string message_attachments = "";
@@ -337,17 +337,17 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string attachments = messagesgroup.substr( pos4, messagesgroup.find("<\\/ul", pos4) - pos4 );
pos4 = 0;
- while ( ( pos4 = attachments.find("<li", pos4) ) != std::string::npos ) {
+ while ( ( pos4 = attachments.find("<li", pos4)) != std::string::npos ) {
std::string attachment = attachments.substr( pos4, attachments.find("<\\/li>", pos4) - pos4 );
std::string link = utils::text::source_get_value( &attachment, 4, "<a class=", "attachment", "href=\\\"", "\\\"" );
link = utils::text::trim(
- utils::text::special_expressions_decode( link ) );
+ utils::text::special_expressions_decode( link ));
// or first: std::string name = utils::text::source_get_value( &attachment, 4, "<a class=", "attachment", ">", "<\\/a>" );
std::string name = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( attachment ) ) );
+ utils::text::remove_html( attachment )) );
if (link.find("/ajax/messaging/attachments/photo/dialog.php?uri=") != std::string::npos) {
link = link.substr(49);
@@ -366,7 +366,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
message_text = utils::text::source_get_value( &message_text, 2, "\\\">", "<\\/div" );
message_text = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( message_text ) ) );
+ utils::text::remove_html( message_text )) );
if (!message_attachments.empty()) {
if (!message_text.empty())
@@ -404,7 +404,7 @@ void FacebookProto::ProcessMessages( void* data )
std::string* resp = (std::string*)data;
- if ( isOffline() )
+ if ( isOffline())
goto exit;
LOG("***** Starting processing messages");
@@ -476,7 +476,7 @@ exit:
void FacebookProto::ProcessNotifications( void* )
{
- if ( isOffline() )
+ if ( isOffline())
return;
if (!getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ))
@@ -643,7 +643,7 @@ void FacebookProto::ProcessFeeds( void* data )
*resp = utils::text::slashu_to_utf8(*resp);
*resp = utils::text::source_get_value(resp, 2, "\"html\":\"", ">\"");
- while ( ( pos = resp->find( "<div class=\\\"mainWrapper\\\"", pos ) ) != std::string::npos && limit <= 25 )
+ while ( ( pos = resp->find( "<div class=\\\"mainWrapper\\\"", pos )) != std::string::npos && limit <= 25 )
{
std::string::size_type pos2 = resp->find( "<div class=\\\"mainWrapper\\\"", pos+5 );
if (pos2 == std::string::npos)
@@ -669,19 +669,19 @@ void FacebookProto::ProcessFeeds( void* data )
nf->title = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( post_header ) ) );
+ utils::text::remove_html( post_header )) );
nf->user_id = utils::text::source_get_value( &post_header, 2, "user.php?id=", "\\\"" );
nf->link = utils::text::special_expressions_decode(
- utils::text::source_get_value( &post_link, 2, "href=\\\"", "\\\">" ) );
+ utils::text::source_get_value( &post_link, 2, "href=\\\"", "\\\">" ));
nf->text = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::remove_html(
- utils::text::edit_html( post_message ) ) ) );
+ utils::text::edit_html( post_message )) ));
- if ( !nf->title.length() || !nf->text.length() )
+ if ( !nf->title.length() || !nf->text.length())
{
delete nf;
continue;
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp
index e51a39f1dd..cc5f446662 100644
--- a/protocols/FacebookRM/proto.cpp
+++ b/protocols/FacebookRM/proto.cpp
@@ -69,9 +69,9 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username)
facy.set_handle(m_hNetlibUser);
- SkinAddNewSoundExT( "Notification", m_tszUserName, LPGENT( "Notification" ) );
- SkinAddNewSoundExT( "NewsFeed", m_tszUserName, LPGENT( "News Feed" ) );
- SkinAddNewSoundExT( "OtherEvent", m_tszUserName, LPGENT( "Other Event" ) );
+ SkinAddNewSoundExT( "Notification", m_tszUserName, LPGENT( "Notification" ));
+ SkinAddNewSoundExT( "NewsFeed", m_tszUserName, LPGENT( "News Feed" ));
+ SkinAddNewSoundExT( "OtherEvent", m_tszUserName, LPGENT( "Other Event" ));
TCHAR *profile = Utils_ReplaceVarsT( _T("%miranda_avatarcache%"));
def_avatar_folder_ = std::tstring(profile) + _T("\\") + m_tszUserName;
@@ -115,7 +115,7 @@ DWORD_PTR FacebookProto::GetCaps( int type, HANDLE hContact )
{
DWORD_PTR flags = PF1_IM | PF1_CHAT | PF1_SERVERCLIST | PF1_AUTHREQ | /*PF1_ADDED |*/ PF1_BASICSEARCH | PF1_USERIDISEMAIL | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_ADDSEARCHRES; // | PF1_VISLIST | PF1_INVISLIST;
- if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ) )
+ if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ))
return flags |= PF1_MODEMSG;
else
return flags |= PF1_MODEMSGRECV;
@@ -123,7 +123,7 @@ DWORD_PTR FacebookProto::GetCaps( int type, HANDLE hContact )
case PFLAGNUM_2:
return PF2_ONLINE | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE; // | PF2_SHORTAWAY;
case PFLAGNUM_3:
- if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ) )
+ if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ))
return PF2_ONLINE; // | PF2_SHORTAWAY;
else
return 0;
@@ -222,7 +222,7 @@ int FacebookProto::SetAwayMsg( int status, const PROTOCHAR *msg )
void FacebookProto::SetAwayMsgWorker(void *)
{
- if ( !last_status_msg_.empty() )
+ if ( !last_status_msg_.empty())
facy.set_status( last_status_msg_ );
}
@@ -446,7 +446,7 @@ int FacebookProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
int FacebookProto::OnMind(WPARAM,LPARAM)
{
HWND hDlg = CreateDialogParam( g_hInstance, MAKEINTRESOURCE( IDD_MIND ),
- ( HWND )0, FBMindProc, reinterpret_cast<LPARAM>( this ) );
+ ( HWND )0, FBMindProc, reinterpret_cast<LPARAM>( this ));
ShowWindow( hDlg, SW_SHOW );
return FALSE;
}
@@ -456,7 +456,7 @@ int FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if ( wParam != 0 && !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv) )
+ if ( wParam != 0 && !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv))
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>(dbv.pszVal));
DBFreeVariant(&dbv);
@@ -494,22 +494,22 @@ int FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam)
DBVARIANT dbv;
TCHAR tstr[256];
- if ( !DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
+ if ( !DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
- } else if ( !DBGetContactSettingTString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
+ } else if ( !DBGetContactSettingTString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv)) {
mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
}
if (MessageBox( 0, tstr, m_tszUserName, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2 ) == IDYES) {
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string* id = new std::string(dbv.pszVal);
if (deleting) {
- facebook_user* fbu = facy.buddies.find( (*id) );
+ facebook_user* fbu = facy.buddies.find( (*id));
if (fbu != NULL) {
fbu->handle = NULL;
}
@@ -532,7 +532,7 @@ int FacebookProto::RequestFriendship(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string* id = new std::string(dbv.pszVal);
ForkThread( &FacebookProto::AddContactToServer, this, ( void* )id );
diff --git a/protocols/FacebookRM/theme.cpp b/protocols/FacebookRM/theme.cpp
index 02c28a4b8e..c3d2fca65b 100644
--- a/protocols/FacebookRM/theme.cpp
+++ b/protocols/FacebookRM/theme.cpp
@@ -117,7 +117,7 @@ HANDLE g_hContactMenuSvc[CMITEMS_COUNT];
static FacebookProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(!proto)
return 0;
diff --git a/protocols/FacebookRM/utils.cpp b/protocols/FacebookRM/utils.cpp
index e34238a372..8e33b26e01 100644
--- a/protocols/FacebookRM/utils.cpp
+++ b/protocols/FacebookRM/utils.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
@@ -114,7 +114,7 @@ void utils::text::replace_all( std::string* data, std::string from, std::string
{
std::string::size_type position = 0;
- while ( ( position = data->find( from, position ) ) != std::string::npos )
+ while ( ( position = data->find( from, position )) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -126,7 +126,7 @@ unsigned int utils::text::count_all( std::string* data, std::string term )
unsigned int count = 0;
std::string::size_type position = 0;
- while ( ( position = data->find( term, position ) ) != std::string::npos )
+ while ( ( position = data->find( term, position )) != std::string::npos )
{
count++;
position++;
@@ -282,14 +282,14 @@ std::string utils::text::slashu_to_utf8( std::string data )
if ( udn >= 128 && udn <= 2047 )
{ // U+0080 .. U+07FF
- new_string += ( char )( 192 + ( udn / 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 192 + ( udn / 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn >= 2048 && udn <= 65535 )
{ // U+0800 .. U+FFFF
- new_string += ( char )( 224 + ( udn / 4096 ) );
- new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 224 + ( udn / 4096 ));
+ new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn <= 127 )
{ // U+0000 .. U+007F (should not appear)
@@ -380,7 +380,7 @@ std::string utils::text::source_get_value2( std::string* data, const char *term,
int utils::number::random( )
{
- srand( ::time( NULL ) );
+ srand( ::time( NULL ));
return rand( );
}
@@ -389,7 +389,7 @@ int utils::debug::log(std::string file_name, std::string text)
char szFile[MAX_PATH];
GetModuleFileNameA(g_hInstance, szFile, SIZEOF(szFile));
std::string path = szFile;
- path = path.substr( 0, path.rfind( "\\" ) );
+ path = path.substr( 0, path.rfind( "\\" ));
path = path.substr( 0, path.rfind( "\\" ) + 1 );
path = path + file_name.c_str() + ".txt";
diff --git a/protocols/Gadu-Gadu/libgadu/sha1.c b/protocols/Gadu-Gadu/libgadu/sha1.c
index d68efc5b98..124a1cffaa 100644
--- a/protocols/Gadu-Gadu/libgadu/sha1.c
+++ b/protocols/Gadu-Gadu/libgadu/sha1.c
@@ -195,7 +195,7 @@ unsigned char finalcount[8];
for (i = 0; i < 8; i++) {
finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
- >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
+ >> ((3-(i & 3)) * 8)) & 255); /* Endian independent */
}
SHA1_Update(context, (unsigned char *)"\200", 1);
while ((context->count[0] & 504) != 448) {
@@ -204,7 +204,7 @@ unsigned char finalcount[8];
SHA1_Update(context, finalcount, 8); /* Should cause a SHA1_Transform() */
for (i = 0; i < 20; i++) {
digest[i] = (unsigned char)
- ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+ ((context->state[i>>2] >> ((3-(i & 3)) * 8)) & 255);
}
/* Wipe variables */
i = j = 0;
diff --git a/protocols/IRCG/MString.h b/protocols/IRCG/MString.h
index 6f90b7741b..7cc16ff4a3 100644
--- a/protocols/IRCG/MString.h
+++ b/protocols/IRCG/MString.h
@@ -115,7 +115,7 @@ public:
CMSimpleStringT(PCXSTR pszSrc)
{
int nLength = StringLength( pszSrc );
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if (pData != NULL)
{
Attach( pData );
@@ -125,7 +125,7 @@ public:
}
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if ( pData != NULL )
{
Attach( pData );
@@ -150,8 +150,8 @@ public:
CMStringData* pOldData = GetData();
if ( pSrcData != pOldData)
{
- if ( pOldData->IsLocked() )
- SetString( strSrc.GetString(), strSrc.GetLength() );
+ if ( pOldData->IsLocked())
+ SetString( strSrc.GetString(), strSrc.GetLength());
else
{
CMStringData* pNewData = CloneData( pSrcData );
@@ -218,7 +218,7 @@ public:
void Append( PCXSTR pszSrc )
{
- Append( pszSrc, StringLength( pszSrc ) );
+ Append( pszSrc, StringLength( pszSrc ));
}
void Append( PCXSTR pszSrc, int nLength )
{
@@ -257,7 +257,7 @@ public:
}
void Append( const CMSimpleStringT& strSrc )
{
- Append( strSrc.GetString(), strSrc.GetLength() );
+ Append( strSrc.GetString(), strSrc.GetLength());
}
void Empty()
{
@@ -265,7 +265,7 @@ public:
if ( pOldData->nDataLength == 0 )
return;
- if ( pOldData->IsLocked() )
+ if ( pOldData->IsLocked())
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -284,15 +284,15 @@ public:
if ( pOldData->nAllocLength == nLength )
return;
- if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked()) // Don't reallocate a locked buffer that's shrinking
{
- CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ));
if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
- CopyChars( PXSTR( pNewData->data() ), nLength, PCXSTR( pOldData->data() ), nLength );
+ CopyChars( PXSTR( pNewData->data()), nLength, PCXSTR( pOldData->data()), nLength );
pOldData->Release();
Attach( pNewData );
@@ -311,7 +311,7 @@ public:
PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public:
PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -389,7 +389,7 @@ public:
}
void SetString( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void SetString( PCXSTR pszSrc, int nLength )
{
@@ -421,7 +421,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength());
return s;
}
@@ -430,7 +430,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return s;
}
@@ -439,7 +439,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength());
return s;
}
@@ -527,7 +527,7 @@ private:
if (pNewData != NULL)
{
int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
- CopyChars( PXSTR( pNewData->data() ), nCharsToCopy, PCXSTR( pOldData->data() ), nCharsToCopy );
+ CopyChars( PXSTR( pNewData->data()), nCharsToCopy, PCXSTR( pOldData->data()), nCharsToCopy );
pNewData->nDataLength = nOldLength;
pOldData->Release();
Attach(pNewData);
@@ -578,7 +578,7 @@ private:
if ( pOldData->nAllocLength >= nLength || nLength <= 0)
return;
- CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ));
if ( pNewData != NULL )
Attach( pNewData );
}
@@ -676,19 +676,19 @@ public:
static int __stdcall StringSpanIncluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static int __stdcall StringSpanExcluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static LPSTR __stdcall StringUppercase( LPSTR psz )
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -696,7 +696,7 @@ public:
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -722,7 +722,7 @@ public:
static LPSTR __stdcall StringReverse( LPSTR psz )
{
- return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz )) );
}
static int __stdcall GetFormattedLength( LPCSTR pszFormat, va_list args );
@@ -741,7 +741,7 @@ public:
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc )
{
// Returns required buffer length in XCHARs
- return int( strlen( pszSrc ) );
+ return int( strlen( pszSrc ));
}
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc, int nLength )
@@ -768,7 +768,7 @@ public:
if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s( pszDest, nDestLength*sizeof( char ),
- pszSrc, nSrcLength*sizeof( char ) );
+ pszSrc, nSrcLength*sizeof( char ));
}
static void __stdcall ConvertToBaseType( LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
@@ -835,13 +835,13 @@ public:
static int __stdcall SafeStringLen( LPCSTR psz )
{
// returns length in bytes
- return (psz != NULL) ? int( strlen( psz ) ) : 0;
+ return (psz != NULL) ? int( strlen( psz )) : 0;
}
static int __stdcall SafeStringLen( LPCWSTR psz )
{
// returns length in wchar_ts
- return (psz != NULL) ? int( wcslen( psz ) ) : 0;
+ return (psz != NULL) ? int( wcslen( psz )) : 0;
}
static int __stdcall GetCharLen( const wchar_t* pch )
@@ -853,7 +853,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return int( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return int( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize )
@@ -879,12 +879,12 @@ public:
static int __stdcall IsDigit( wchar_t ch )
{
- return iswdigit( static_cast<unsigned short>(ch) );
+ return iswdigit( static_cast<unsigned short>(ch));
}
static int __stdcall IsSpace( wchar_t ch )
{
- return iswspace( static_cast<unsigned short>(ch) );
+ return iswspace( static_cast<unsigned short>(ch));
}
static int __stdcall StringCompare( LPCWSTR pszA, LPCWSTR pszB )
@@ -1068,7 +1068,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize )
@@ -1362,7 +1362,7 @@ public:
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
PXSTR pszBuffer = this->GetBuffer();
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#else
memmove( pszBuffer+iIndex, pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#endif
@@ -1378,7 +1378,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1387,9 +1387,9 @@ public:
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#endif
pszBuffer[iIndex] = ch;
@@ -1403,7 +1403,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
{
iIndex = this->GetLength();
}
@@ -1418,10 +1418,10 @@ public:
PXSTR pszBuffer = this->GetBuffer( nNewLength );
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy_s( pszBuffer+iIndex, nInsertLength*sizeof( XCHAR ), psz, nInsertLength*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy( pszBuffer+iIndex, psz, nInsertLength*sizeof( XCHAR ));
#endif
this->ReleaseBufferSetLength( nNewLength );
@@ -1440,7 +1440,7 @@ public:
{
// otherwise modify each character that matches in the string
bool bCopied = false;
- PXSTR pszBuffer = const_cast< PXSTR >( this->GetString() ); // We don't actually write to pszBuffer until we've called GetBuffer().
+ PXSTR pszBuffer = const_cast< PXSTR >( this->GetString()); // We don't actually write to pszBuffer until we've called GetBuffer().
int nLength = this->GetLength();
int iChar = 0;
@@ -1488,7 +1488,7 @@ public:
while( pszStart < pszEnd )
{
PCXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL)
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL)
{
nCount++;
pszStart = pszTarget+nSourceLen;
@@ -1505,7 +1505,7 @@ public:
int nOldLength = this->GetLength();
int nNewLength = nOldLength+(nReplacementLen-nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ) );
+ PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart+nOldLength;
@@ -1514,13 +1514,13 @@ public:
while( pszStart < pszEnd )
{
PXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL )
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL )
{
int nBalance = nOldLength-int(pszTarget-pszBuffer+nSourceLen);
memmove_s( pszTarget+nReplacementLen, nBalance*sizeof( XCHAR ),
- pszTarget+nSourceLen, nBalance*sizeof( XCHAR ) );
+ pszTarget+nSourceLen, nBalance*sizeof( XCHAR ));
memcpy_s( pszTarget, nReplacementLen*sizeof( XCHAR ),
- pszNew, nReplacementLen*sizeof( XCHAR ) );
+ pszNew, nReplacementLen*sizeof( XCHAR ));
pszStart = pszTarget+nReplacementLen;
pszTarget[nReplacementLen+nBalance] = 0;
nOldLength += (nReplacementLen-nSourceLen);
@@ -1571,7 +1571,7 @@ public:
CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0))
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1707,7 +1707,7 @@ public:
while( *psz != 0 )
{
- if ( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ))
{
if ( pszLast == NULL )
pszLast = psz;
@@ -1722,7 +1722,7 @@ public:
if ( pszLast != NULL )
{
// truncate at trailing space start
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1737,20 +1737,20 @@ public:
PCXSTR psz = this->GetString();
- while( StringTraits::IsSpace( *psz ) )
+ while( StringTraits::IsSpace( *psz ))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1805,7 +1805,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1816,7 +1816,7 @@ public:
CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
@@ -1846,7 +1846,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1864,15 +1864,15 @@ public:
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1883,26 +1883,26 @@ public:
CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
PCXSTR psz = this->GetString();
- while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL) )
+ while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1946,14 +1946,14 @@ public:
if (nCount < 0)
nCount = 0;
- if ( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength())
nCount = this->GetLength()-iFirst;
- if ( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength())
nCount = 0;
// optimize case of returning entire string
- if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()))
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -2030,13 +2030,13 @@ public:
// Allocate a BSTR containing a copy of the string
BSTR AllocSysString() const
{
- BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength() );
+ BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength());
return bstrResult;
}
BSTR SetSysString( BSTR* pbstr ) const
{
- StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength() );
+ StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength());
return *pbstr;
}
@@ -2075,7 +2075,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength());
return strResult;
}
@@ -2084,7 +2084,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return strResult;
}
@@ -2093,7 +2093,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength());
return strResult;
}
@@ -2123,7 +2123,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
@@ -2133,7 +2133,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
diff --git a/protocols/IRCG/clist.cpp b/protocols/IRCG/clist.cpp
index 8dc683caa6..31c81db884 100644
--- a/protocols/IRCG/clist.cpp
+++ b/protocols/IRCG/clist.cpp
@@ -114,7 +114,7 @@ HANDLE CIrcProto::CList_AddContact(CONTACT * user, bool InList, bool SetOnline)
setTString(hContact, "Nick", user->name);
setTString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE:ID_STATUS_OFFLINE);
- if ( !InList && getByte( "MirVerAutoRequestTemp", 0) )
+ if ( !InList && getByte( "MirVerAutoRequestTemp", 0))
PostIrcMessage( _T("/PRIVMSG %s \001VERSION\001"), user->name);
return hContact;
}
diff --git a/protocols/IRCG/commandmonitor.cpp b/protocols/IRCG/commandmonitor.cpp
index 57e9aa3517..dac26d1349 100644
--- a/protocols/IRCG/commandmonitor.cpp
+++ b/protocols/IRCG/commandmonitor.cpp
@@ -53,7 +53,7 @@ VOID CALLBACK TimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
if ( ppro->m_forceVisible )
ppro->PostIrcMessage( _T("/MODE %s -i"), ppro->m_info.sNick.c_str());
- if ( lstrlenA( ppro->m_myHost ) == 0 && ppro->IsConnected() )
+ if ( lstrlenA( ppro->m_myHost ) == 0 && ppro->IsConnected())
ppro->DoUserhostWithReason(2, (_T("S") + ppro->m_info.sNick).c_str(), true, _T("%s"), ppro->m_info.sNick.c_str());
}
@@ -243,7 +243,7 @@ void __cdecl CIrcProto::ResolveIPThread(LPVOID di)
EnterCriticalSection( &m_resolve);
if ( ipr != NULL && (ipr->iType == IP_AUTO && lstrlenA(m_myHost) == 0 || ipr->iType == IP_MANUAL )) {
- hostent* myhost = gethostbyname( ipr->sAddr.c_str() );
+ hostent* myhost = gethostbyname( ipr->sAddr.c_str());
if ( myhost ) {
IN_ADDR in;
memcpy( &in, myhost->h_addr, 4 );
@@ -422,7 +422,7 @@ bool CIrcProto::OnIrc_KICK( const CIrcMessage* pmsg )
GCDEST gcd = {0};
GCEVENT gce = {0};
- CMString S = MakeWndID( pmsg->parameters[0].c_str() );
+ CMString S = MakeWndID( pmsg->parameters[0].c_str());
gce.cbSize = sizeof(GCEVENT);
gce.dwFlags = GC_TCHAR;
gcd.ptszID = ( TCHAR* )S.c_str();
@@ -513,7 +513,7 @@ bool CIrcProto::OnIrc_MODE( const CIrcMessage* pmsg )
if ( strchr( sUserModes.c_str(), (char)*p1 )) {
CMString sStatus = ModeToStatus( *p1 );
if (( int )pmsg->parameters.getCount() > iParametercount ) {
- if ( !_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str() )) {
+ if ( !_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
char cModeBit = -1;
CHANNELINFO* wi = (CHANNELINFO *)DoEvent( GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, false, false, 0 );
switch (*p1) {
@@ -907,12 +907,12 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
} } }
}
// ... or try another method of separating the dcc command
- else if ( !GetWord(mess.c_str(), (bIsChat) ? 4 : 5 ).IsEmpty() ) {
+ else if ( !GetWord(mess.c_str(), (bIsChat) ? 4 : 5 ).IsEmpty()) {
int index = (bIsChat) ? 4 : 5;
bool bFlag = false;
// look for the part of the ctcp command that contains adress, port and size
- while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty() ) {
+ while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty()) {
CMString sTemp;
if ( type == _T("chat"))
@@ -928,7 +928,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
ind++;
}
- if ( sTemp[ind] == '\0' && GetWord( mess.c_str(), index + ((bIsChat) ? 1 : 2 )).IsEmpty() )
+ if ( sTemp[ind] == '\0' && GetWord( mess.c_str(), index + ((bIsChat) ? 1 : 2 )).IsEmpty())
bFlag = true;
index++;
}
@@ -976,12 +976,12 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
} } }
}
// ... or try another method of separating the dcc command
- else if ( !GetWord(mess.c_str(), 4).IsEmpty() ) {
+ else if ( !GetWord(mess.c_str(), 4).IsEmpty()) {
int index = 4;
bool bFlag = false;
// look for the part of the ctcp command that contains adress, port and size
- while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty() ) {
+ while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty()) {
CMString sTemp = GetWord(mess.c_str(), index-1) + GetWord(mess.c_str(), index);
// if all characters are number it indicates we have found the adress, port and size parameters
@@ -993,7 +993,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
ind++;
}
- if ( sTemp[ind] == '\0' && GetWord(mess.c_str(), index + 2).IsEmpty() )
+ if ( sTemp[ind] == '\0' && GetWord(mess.c_str(), index + 2).IsEmpty())
bFlag = true;
index++;
}
@@ -1165,7 +1165,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
di->bSender = false;
di->bTurbo = bTurbo;
di->bSSL = false;
- di->bReverse = (iPort == 0 && !sToken.IsEmpty() ) ? true : false;
+ di->bReverse = (iPort == 0 && !sToken.IsEmpty()) ? true : false;
if ( di->bReverse )
di->sToken = sTokenBackup;
@@ -1210,16 +1210,16 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
}
// if the whois window is visible and the ctcp reply belongs to the user in it, then show the reply in the whois window
- if ( m_whoisDlg && IsWindowVisible( m_whoisDlg->GetHwnd() )) {
+ if ( m_whoisDlg && IsWindowVisible( m_whoisDlg->GetHwnd())) {
m_whoisDlg->m_InfoNick.GetText( szTemp, SIZEOF(szTemp));
if ( lstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0 ) {
if ( pmsg->m_bIncoming && (command == _T("version") || command == _T("userinfo") || command == _T("time"))) {
- SetActiveWindow( m_whoisDlg->GetHwnd() );
+ SetActiveWindow( m_whoisDlg->GetHwnd());
m_whoisDlg->m_Reply.SetText( DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE));
return true;
}
if (pmsg->m_bIncoming && command == _T("ping")) {
- SetActiveWindow( m_whoisDlg->GetHwnd() );
+ SetActiveWindow( m_whoisDlg->GetHwnd());
int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1));
TCHAR szTemp[30];
if ( s == 1 )
@@ -1261,10 +1261,10 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
BOOL bFlag = false;
// Is the user on the names list?
- while ( !name.IsEmpty() ) {
+ while ( !name.IsEmpty()) {
name = GetWord( sNamesList.c_str(), i );
i++;
- if ( !name.IsEmpty() ) {
+ if ( !name.IsEmpty()) {
int index = 0;
while ( _tcschr( sUserModePrefixes.c_str(), name[index] ))
index++;
@@ -1325,7 +1325,7 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
sTemp = GetWord(sNamesList.c_str(), i);
// Fill the nicklist
- while ( !sTemp.IsEmpty() ) {
+ while ( !sTemp.IsEmpty()) {
CMString sStat;
CMString sTemp2 = sTemp;
sStat = PrefixToStatus(sTemp[0]);
@@ -1412,10 +1412,10 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
CMString save = _T("");
int i = 0;
- while ( !command.IsEmpty() ) {
+ while ( !command.IsEmpty()) {
command = GetWord( dbv.ptszVal, i );
i++;
- if ( !command.IsEmpty() ) {
+ if ( !command.IsEmpty()) {
CMString S = command.Mid(1, command.GetLength());
if ( !lstrcmpi( sChanName, S.c_str()))
break;
@@ -1423,7 +1423,7 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
save += command + _T(" ");
} }
- if ( !command.IsEmpty() ) {
+ if ( !command.IsEmpty()) {
save += GetWordAddress( dbv.ptszVal, i );
switch ( command[0] ) {
case 'M':
@@ -1788,7 +1788,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER( const CIrcMessage* pmsg )
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false};
HANDLE hContact = CList_FindContact( &user );
if ( hContact ) {
- AddOutgoingMessageToDB( hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str() );
+ AddOutgoingMessageToDB( hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str());
DBVARIANT dbv;
if ( !getTString( hContact, "Default", &dbv )) {
@@ -1832,10 +1832,10 @@ static void __stdcall sttShowNickWnd( void* param )
bool CIrcProto::OnIrc_NICK_ERR( const CIrcMessage* pmsg )
{
if ( pmsg->m_bIncoming ) {
- if ( nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick)) ) {
+ if ( nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
TCHAR m[200];
mir_sntprintf( m, SIZEOF(m), _T("NICK %s"), m_alternativeNick );
- if ( IsConnected() )
+ if ( IsConnected())
SendIrcMessage( m );
}
else {
@@ -1856,7 +1856,7 @@ bool CIrcProto::OnIrc_JOINERROR( const CIrcMessage* pmsg )
CMString save = _T("");
int i = 0;
- while ( !command.IsEmpty() ) {
+ while ( !command.IsEmpty()) {
command = GetWord( dbv.ptszVal, i );
i++;
@@ -1960,7 +1960,7 @@ bool CIrcProto::OnIrc_WHO_END( const CIrcMessage* pmsg )
}
/// if it is not a channel
- TCHAR* UserList = mir_tstrdup( m_whoReply.c_str() );
+ TCHAR* UserList = mir_tstrdup( m_whoReply.c_str());
const TCHAR* p1= UserList;
m_whoReply = _T("");
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false};
@@ -2108,8 +2108,8 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
// Cycle through results
j = 0;
sTemp = GetWord( pmsg->parameters[1].c_str(), j );
- while ( !sTemp.IsEmpty() ) {
- p1 = mir_tstrdup( sTemp.c_str() );
+ while ( !sTemp.IsEmpty()) {
+ p1 = mir_tstrdup( sTemp.c_str());
p2 = p1;
// Pull out host, user and nick
@@ -2132,7 +2132,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
}
mess = _T("");
mask = nick + _T("!") + user + _T("@") + host;
- if ( host.IsEmpty() || user.IsEmpty() || nick.IsEmpty() ) {
+ if ( host.IsEmpty() || user.IsEmpty() || nick.IsEmpty()) {
mir_free( p1 );
continue;
}
@@ -2154,7 +2154,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
// If user found, remove from checklist
for ( i = 0; i < checklist.getCount(); i++ )
- if ( !lstrcmpi(checklist[i].c_str(), nick.c_str() ))
+ if ( !lstrcmpi(checklist[i].c_str(), nick.c_str()))
checklist.remove( i );
}
break;
@@ -2237,7 +2237,7 @@ bool CIrcProto::OnIrc_SUPPORT( const CIrcMessage* pmsg )
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 0 ) {
CMString S;
for ( int i = 0; i < pmsg->parameters.getCount(); i++ ) {
- TCHAR* temp = mir_tstrdup( pmsg->parameters[i].c_str() );
+ TCHAR* temp = mir_tstrdup( pmsg->parameters[i].c_str());
if ( _tcsstr( temp, _T("CHANTYPES="))) {
TCHAR* p1 = _tcschr( temp, '=' );
p1++;
@@ -2332,7 +2332,7 @@ void CIrcProto::OnIrcDisconnected()
CallChatEvent( SESSION_OFFLINE, (LPARAM)&gce);
}
- if ( !Miranda_Terminated() )
+ if ( !Miranda_Terminated())
CList_SetAllOffline( m_disconnectDCCChats );
// restore the original nick, cause it might be changed
@@ -2386,7 +2386,7 @@ bool CIrcProto::DoOnConnect( const CIrcMessage* )
if ( m_perform ) {
DoPerform( "ALL NETWORKS" );
- if ( IsConnected() ) {
+ if ( IsConnected()) {
DoPerform( _T2A( m_info.sNetwork.c_str()));
switch( m_iStatus ) {
case ID_STATUS_FREECHAT: DoPerform( "Event: Free for chat" ); break;
@@ -2473,7 +2473,7 @@ int CIrcProto::IsIgnored( CMString user, char type )
if ( !_tcschr( C.flags.c_str(), type ))
continue;
- if ( C.network.IsEmpty() )
+ if ( C.network.IsEmpty())
return i+1;
if ( IsConnected() && !lstrcmpi( C.network.c_str(), m_info.sNetwork.c_str()))
diff --git a/protocols/IRCG/input.cpp b/protocols/IRCG/input.cpp
index bdcedaae82..88c980149d 100644
--- a/protocols/IRCG/input.cpp
+++ b/protocols/IRCG/input.cpp
@@ -249,11 +249,11 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
if (command == _T("/clear")) {
CMString S;
- if ( !one.IsEmpty() ) {
+ if ( !one.IsEmpty()) {
if ( one == _T("server"))
S = SERVERWINDOW;
else
- S = MakeWndID( one.c_str() );
+ S = MakeWndID( one.c_str());
}
else if ( lstrcmpi( window, SERVERWINDOW) == 0 )
S = window;
@@ -273,10 +273,10 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
}
if ( command == _T("/ignore")) {
- if ( IsConnected() ) {
+ if ( IsConnected()) {
CMString IgnoreFlags;
TCHAR temp[500];
- if ( one.IsEmpty() ) {
+ if ( one.IsEmpty()) {
if ( m_ignore )
DoEvent( GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is enabled"), NULL, NULL, NULL, true, false);
else
@@ -313,12 +313,12 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
else IgnoreFlags = _T("qnidc");
CMString m_network;
- if ( three.IsEmpty() )
+ if ( three.IsEmpty())
m_network = m_info.sNetwork;
else
m_network = three;
- AddIgnore( one.c_str(), IgnoreFlags.c_str(), m_network.c_str() );
+ AddIgnore( one.c_str(), IgnoreFlags.c_str(), m_network.c_str());
mir_sntprintf(temp, SIZEOF(temp), TranslateT("%s on %s is now ignored (+%s)"), one.c_str(), m_network.c_str(), IgnoreFlags.c_str());
DoEvent( GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), temp, NULL, NULL, NULL, true, false);
@@ -450,9 +450,9 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
if ( command == _T("/channelmanager")) {
if ( window && !hContact && IsChannel( window )) {
- if ( IsConnected() ) {
+ if ( IsConnected()) {
if ( m_managerDlg != NULL ) {
- SetActiveWindow( m_managerDlg->GetHwnd() );
+ SetActiveWindow( m_managerDlg->GetHwnd());
m_managerDlg->Close();
}
else {
@@ -507,7 +507,7 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
m_listDlg = new CListDlg( this );
m_listDlg->Show();
}
- SetActiveWindow( m_listDlg->GetHwnd() );
+ SetActiveWindow( m_listDlg->GetHwnd());
int minutes = ( int )m_noOfChannels/4000;
int minutes2 = ( int )m_noOfChannels/9000;
@@ -841,7 +841,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
CMString Message = szBuf;
AddCR( Message );
RemoveLinebreaks( Message );
- if ( !hContact && IsConnected() ) {
+ if ( !hContact && IsConnected()) {
Message = DoAlias( Message.c_str(), windowname );
if ( Message.Find( _T("%question")) != -1 ) {
@@ -887,10 +887,10 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
// Do this if the message is not a command
if ( (GetWord( DoThis.c_str(), 0)[0] != '/') || // not a command
- ( (GetWord( DoThis.c_str(), 0)[0] == '/') && (GetWord( DoThis.c_str(), 0)[1] == '/') ) || // or double backslash at the beginning
+ ( (GetWord( DoThis.c_str(), 0)[0] == '/') && (GetWord( DoThis.c_str(), 0)[1] == '/')) || // or double backslash at the beginning
hContact ) {
CMString S = _T("/PRIVMSG ");
- if ( lstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty() )
+ if ( lstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty())
S += m_info.sServerName + _T(" ") + DoThis;
else
S += CMString(windowname) + _T(" ") + DoThis;
@@ -906,7 +906,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
if ( !IsConnected() && !bDCC )
continue;
- if ( !flag && IsConnected() )
+ if ( !flag && IsConnected())
DoThis = DoIdentifiers(DoThis, windowname);
if ( hContact ) {
@@ -921,7 +921,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
dcc->SendStuff( mess.c_str());
}
}
- else if ( IsConnected() ) {
+ else if ( IsConnected()) {
FormatMsg( DoThis );
SendIrcMessage( DoThis.c_str(), false, codepage );
}
diff --git a/protocols/IRCG/irclib.cpp b/protocols/IRCG/irclib.cpp
index 78d33f11dc..c018b57a02 100644
--- a/protocols/IRCG/irclib.cpp
+++ b/protocols/IRCG/irclib.cpp
@@ -52,7 +52,7 @@ CIrcMessage::CIrcMessage(const CIrcMessage& m) :
m_bNotify( m.m_bNotify ),
m_codePage( m.m_codePage ),
m_proto( m.m_proto ),
- parameters( m.parameters.getCount() )
+ parameters( m.parameters.getCount())
{
prefix.sNick = m.prefix.sNick;
prefix.sUser = m.prefix.sUser;
@@ -213,7 +213,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
return false;
} }
- if ( Miranda_Terminated() ) {
+ if ( Miranda_Terminated()) {
Disconnect();
return false;
}
@@ -223,7 +223,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
// start receiving messages from host
ircFork( &CIrcProto::ThreadProc, NULL );
Sleep( 100 );
- if ( info.sPassword.GetLength() )
+ if ( info.sPassword.GetLength())
NLSend( "PASS %s\r\n", info.sPassword.c_str());
NLSend( _T("NICK %s\r\n"), info.sNick.c_str());
@@ -232,7 +232,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
DWORD cbHostName = SIZEOF( szHostName );
GetComputerName(szHostName, &cbHostName);
CMString HostName = GetWord(szHostName, 0);
- if ( m_userID.IsEmpty() )
+ if ( m_userID.IsEmpty())
m_userID = _T("Miranda");
if ( HostName.IsEmpty())
HostName= _T("host");
@@ -691,7 +691,7 @@ void CIrcSessionInfo::Reset()
void CIrcProto::OnIrcMessage(const CIrcMessage* pmsg)
{
if ( pmsg != NULL ) {
- PfnIrcMessageHandler pfn = FindMethod( pmsg->sCommand.c_str() );
+ PfnIrcMessageHandler pfn = FindMethod( pmsg->sCommand.c_str());
if ( pfn ) {
// call member function. if it returns 'false',
// call the default handling
@@ -702,7 +702,7 @@ void CIrcProto::OnIrcMessage(const CIrcMessage* pmsg)
}
__except( EXCEPTION_EXECUTE_HANDLER ) // dedicated to Sava :)
{
- DoNetlibLog( "IRC handler feels sick: %S", pmsg->sCommand.c_str() );
+ DoNetlibLog( "IRC handler feels sick: %S", pmsg->sCommand.c_str());
}
}
else // handler not found. call default handler
@@ -853,7 +853,7 @@ int CDccSession::NLReceive(const unsigned char* buf, int cbBuf)
int CDccSession::SendStuff(const TCHAR* fmt)
{
- String buf = _T2A( fmt, m_proto->getCodepage() );
+ String buf = _T2A( fmt, m_proto->getCodepage());
return NLSend(( const unsigned char* )buf.c_str(), buf.GetLength());
}
diff --git a/protocols/IRCG/ircproto.cpp b/protocols/IRCG/ircproto.cpp
index 3fd32d1f68..6afe5328e7 100644
--- a/protocols/IRCG/ircproto.cpp
+++ b/protocols/IRCG/ircproto.cpp
@@ -435,7 +435,7 @@ HANDLE __cdecl CIrcProto::FileAllow( HANDLE, HANDLE hTransfer, const TCHAR* szPa
{
DCCINFO* di = ( DCCINFO* )hTransfer;
- if ( !IsConnected() ) {
+ if ( !IsConnected()) {
delete di;
return (HANDLE)szPath;
}
diff --git a/protocols/IRCG/options.cpp b/protocols/IRCG/options.cpp
index 61684cbae1..2152e340c9 100644
--- a/protocols/IRCG/options.cpp
+++ b/protocols/IRCG/options.cpp
@@ -352,7 +352,7 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto>
CCtrlCombo m_groupCombo;
CServerDlg( CIrcProto* _pro, CConnectPrefsDlg* _owner, int _action ) :
- CProtoDlgBase<CIrcProto>( _pro, IDD_ADDSERVER, _owner->GetHwnd() ),
+ CProtoDlgBase<CIrcProto>( _pro, IDD_ADDSERVER, _owner->GetHwnd()),
m_owner( _owner ),
m_action( _action ),
m_OK( this, IDOK ),
@@ -1228,7 +1228,7 @@ void COtherPrefsDlg::OnApply()
int curSel = m_codepage.GetCurSel();
m_proto->m_codepage = m_codepage.GetItemData( curSel );
- if ( m_proto->IsConnected() )
+ if ( m_proto->IsConnected())
m_proto->setCodepage( m_proto->m_codepage );
m_proto->m_utfAutodetect = m_autodetect.GetState();
@@ -1271,7 +1271,7 @@ void COtherPrefsDlg::addPerformComboValue( int idx, const char* szValueName )
// 'add ignore' preferences dialog
CAddIgnoreDlg::CAddIgnoreDlg( CIrcProto* _pro, const TCHAR* mask, CIgnorePrefsDlg* _owner ) :
- CProtoDlgBase<CIrcProto>( _pro, IDD_ADDIGNORE, _owner->GetHwnd() ),
+ CProtoDlgBase<CIrcProto>( _pro, IDD_ADDIGNORE, _owner->GetHwnd()),
m_Ok( this, IDOK ),
m_owner( _owner )
{
@@ -1315,7 +1315,7 @@ void CAddIgnoreDlg::OnOk( CCtrlButton* )
if ( !_tcschr(Mask.c_str(), '!') && !_tcschr(Mask.c_str(), '@'))
Mask += _T("!*@*");
- if ( !flags.IsEmpty() ) {
+ if ( !flags.IsEmpty()) {
if ( *szOldMask )
m_proto->RemoveIgnore( szOldMask );
m_proto->AddIgnore(Mask.c_str(), flags.c_str(), szNetwork);
@@ -1341,7 +1341,7 @@ static TDbSetting IgnoreSettings[] =
static int CALLBACK IgnoreListSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
CIgnorePrefsDlg* hwndDlg = ( CIgnorePrefsDlg* )lParamSort;
- if ( !hwndDlg->GetHwnd() )
+ if ( !hwndDlg->GetHwnd())
return 1;
TCHAR temp1[512];
@@ -1418,7 +1418,7 @@ void CIrcProto::InitIgnore( void )
String mask = GetWord(p1, 0);
String flags = GetWord(p1, 1);
String network = GetWord(p1, 2);
- if ( !mask.IsEmpty() )
+ if ( !mask.IsEmpty())
m_ignoreItems.insert( new CIrcIgnoreItem( getCodepage(), mask.c_str(), flags.c_str(), network.c_str()));
p1 = p2;
@@ -1912,7 +1912,7 @@ INT_PTR CIrcProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
static void sttImportIni( const TCHAR* szIniFile )
{
- FILE* serverFile = _tfopen( szIniFile, _T("r") );
+ FILE* serverFile = _tfopen( szIniFile, _T("r"));
if ( serverFile == NULL )
return;
@@ -1946,7 +1946,7 @@ void InitServers()
if ( g_servers.getCount() == 0 ) {
TCHAR *szIniFile = Utils_ReplaceVarsT(_T("%temp%\\default_servers.ini"));
- FILE *serverFile = _tfopen( szIniFile, _T("a") );
+ FILE *serverFile = _tfopen( szIniFile, _T("a"));
if (serverFile) {
char* pszSvrs = ( char* )LockResource(LoadResource(hInst,FindResource(hInst,MAKEINTRESOURCE(IDR_SERVERS),_T("TEXT"))));
if (pszSvrs)
diff --git a/protocols/IRCG/output.cpp b/protocols/IRCG/output.cpp
index 3f64810a68..6a97f45baf 100644
--- a/protocols/IRCG/output.cpp
+++ b/protocols/IRCG/output.cpp
@@ -50,7 +50,7 @@ static CMString FormatOutput (const CIrcMessage* pmsg)
goto THE_END;
}
- int index = StrToInt( pmsg->sCommand.c_str() );
+ int index = StrToInt( 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());
@@ -117,7 +117,7 @@ static CMString FormatOutput (const CIrcMessage* pmsg)
sMessage += pmsg->parameters[i] + _T(" ");
}
else {
- if ( pmsg->prefix.sNick.GetLength() )
+ if ( pmsg->prefix.sNick.GetLength())
sMessage = pmsg->prefix.sNick + _T(" ");
sMessage += pmsg->sCommand + _T(" ");
for ( int i=0; i < (int)pmsg->parameters.getCount(); i++ )
@@ -135,13 +135,13 @@ BOOL CIrcProto::ShowMessage (const CIrcMessage* pmsg)
if ( !pmsg->m_bIncoming )
ReplaceString( mess, _T("%%"), _T("%"));
- int iTemp = StrToInt( pmsg->sCommand.c_str() );
+ int iTemp = StrToInt( pmsg->sCommand.c_str());
//To active window
if (( iTemp > 400 || iTemp < 500 ) && pmsg->sCommand[0] == '4' //all error messages
|| pmsg->sCommand == _T("303") //ISON command
|| pmsg->sCommand == _T("INVITE")
- || ( (pmsg->sCommand == _T("NOTICE")) && ( (pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001"))==NULL) : false) ) // CTCP answers should go to m_network Log window!
+ || ( (pmsg->sCommand == _T("NOTICE")) && ( (pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001"))==NULL) : false)) // CTCP answers should go to m_network Log window!
|| pmsg->sCommand == _T("515")) //chanserv error
{
DoEvent(GC_EVENT_INFORMATION, NULL, pmsg->m_bIncoming?pmsg->prefix.sNick.c_str():m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming?false:true);
diff --git a/protocols/IRCG/scripting.cpp b/protocols/IRCG/scripting.cpp
index ed75934643..26c6bc2a55 100644
--- a/protocols/IRCG/scripting.cpp
+++ b/protocols/IRCG/scripting.cpp
@@ -25,7 +25,7 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertRawIn(WPARAM, LPARAM lParam)
{
char* pszRaw = ( char* ) lParam;
- if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected() ) {
+ if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected()) {
TCHAR* p = mir_a2t( pszRaw );
InsertIncomingEvent( p );
mir_free( p );
@@ -38,7 +38,7 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertRawIn(WPARAM, LPARAM lParam)
INT_PTR __cdecl CIrcProto::Scripting_InsertRawOut( WPARAM, LPARAM lParam )
{
char* pszRaw = ( char* ) lParam;
- if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected() ) {
+ if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected()) {
String S = pszRaw;
ReplaceString( S, "%", "%%%%");
NLSendNoScript((const unsigned char *)S.c_str(), lstrlenA(S.c_str()));
@@ -254,12 +254,12 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam)
j++;
} }
- if ( !S.IsEmpty() )
+ if ( !S.IsEmpty())
sOutput = ( TCHAR* )S.c_str();
}
// send it to mbot
if ( !sOutput.IsEmpty())
- return ( INT_PTR )mir_t2a( sOutput.c_str() );
+ return ( INT_PTR )mir_t2a( sOutput.c_str());
}
return 0;
}
diff --git a/protocols/IRCG/services.cpp b/protocols/IRCG/services.cpp
index 63fd495b7a..e3b363ac15 100644
--- a/protocols/IRCG/services.cpp
+++ b/protocols/IRCG/services.cpp
@@ -395,7 +395,7 @@ INT_PTR __cdecl CIrcProto::OnQuickConnectMenuCommand(WPARAM, LPARAM)
}
ShowWindow( m_quickDlg->GetHwnd(), SW_SHOW );
- SetActiveWindow( m_quickDlg->GetHwnd() );
+ SetActiveWindow( m_quickDlg->GetHwnd());
return 0;
}
@@ -624,11 +624,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
/* case 5: // nickserv register nick
PostIrcMessage( _T("/nickserv REGISTER %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick") );
+ TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick"));
break;
*/ case 6: // nickserv Identify
PostIrcMessage( _T("/nickserv AUTH %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick") );
+ TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick"));
break;
case 7: // nickserv drop nick
if (MessageBox(0, TranslateT("Are you sure you want to unregister your current nick?"), TranslateT("Delete nick"),
@@ -642,7 +642,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
HWND question_hWnd = dlg->GetHwnd();
HWND hEditCtrl = GetDlgItem( question_hWnd, IDC_EDIT);
SetDlgItemText( question_hWnd, IDC_CAPTION, TranslateT("Identify nick"));
- SetWindowText( GetDlgItem( question_hWnd, IDC_TEXT), TranslateT("Please enter your password") );
+ SetWindowText( GetDlgItem( question_hWnd, IDC_TEXT), TranslateT("Please enter your password"));
SetDlgItemText( question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\""));
SetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE,
(LONG)GetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD);
@@ -661,23 +661,23 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 10: // nickserv set new password
PostIrcMessage( _T("/nickserv SET PASSWORD %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your new password"), TranslateT("Set new password") );
+ TranslateT("Please enter your new password"), TranslateT("Set new password"));
break;
case 11: // nickserv set language
PostIrcMessage( _T("/nickserv SET LANGUAGE %%question=\"%s\",\"%s\""),
- TranslateT("Please enter desired languageID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages") );
+ TranslateT("Please enter desired languageID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages"));
break;
case 12: // nickserv set homepage
PostIrcMessage( _T("/nickserv SET URL %%question=\"%s\",\"%s\""),
- TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick") );
+ TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick"));
break;
case 13: // nickserv set email
PostIrcMessage( _T("/nickserv SET EMAIL %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick") );
+ TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick"));
break;
case 14: // nickserv set info
PostIrcMessage( _T("/nickserv SET INFO %%question=\"%s\",\"%s\""),
- TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick") );
+ TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick"));
break;
case 15: // nickserv kill unauth off
PostIrcMessage( _T("/nickserv SET KILL OFF"));
@@ -708,15 +708,15 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 24: // nickserv Link nick to current
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick") );
+ TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick"));
break;
case 25: // nickserv Unlink nick from current
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick") );
+ TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick"));
break;
case 26: // nickserv Set main nick
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick") );
+ TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick"));
break;
case 27: // nickserv list all linked nicks
PostIrcMessage( _T("/nickserv LISTLINKS"));
@@ -746,7 +746,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 6:
PostIrcMessage( _T("/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""),
- p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk") );
+ p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk"));
break;
case 7:
DoUserhostWithReason(1, _T("B") + (CMString)p1, true, _T("%s"), gch->ptszUID );
@@ -795,11 +795,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 22:
PostIrcMessage( _T("/NOTICE %s %%question=\"%s\",\"%s\""),
- gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice") );
+ gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice"));
break;
case 23:
PostIrcMessage( _T("/INVITE %s %%question=\"%s\",\"%s\""),
- gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel") );
+ gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel"));
break;
case 30:
{
@@ -988,13 +988,13 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM)
{
EnterCriticalSection(&cs);
- if ( m_perform && IsConnected() )
+ if ( m_perform && IsConnected())
if ( DoPerform( "Event: Disconnect" ))
Sleep( 200 );
DisconnectAllDCCSessions( true );
- if ( IsConnected() )
+ if ( IsConnected())
Disconnect();
if ( m_listDlg )
m_listDlg->Close();
@@ -1042,13 +1042,13 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
else {
// for normal contact
clmi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE;
- if ( !IsConnected() )
+ if ( !IsConnected())
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hUMenuWhois, ( LPARAM )&clmi );
if (bIsOnline) {
DBVARIANT dbv3;
- if ( !getString( hContact, "Host", &dbv3) ) {
+ if ( !getString( hContact, "Host", &dbv3)) {
if (dbv3.pszVal[0] == 0)
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
DBFreeVariant( &dbv3 );
@@ -1065,7 +1065,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = ( HANDLE ) wParam;
- if ( hContact == NULL || !IsConnected() )
+ if ( hContact == NULL || !IsConnected())
return 0;
DBCONTACTWRITESETTING* cws = ( DBCONTACTWRITESETTING* )lParam;
@@ -1075,10 +1075,10 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
if ( cws->value.type != DBVT_DELETED && !( cws->value.type==DBVT_BYTE && cws->value.bVal==0 ))
return 0;
- if ( !strcmp( cws->szSetting, "NotOnList" ) ) {
+ if ( !strcmp( cws->szSetting, "NotOnList" )) {
DBVARIANT dbv;
if ( !getTString( hContact, "Nick", &dbv )) {
- if ( getByte( "MirVerAutoRequest", 1) )
+ if ( getByte( "MirVerAutoRequest", 1))
PostIrcMessage( _T("/PRIVMSG %s \001VERSION\001"), dbv.ptszVal );
DBFreeVariant( &dbv );
} }
@@ -1128,7 +1128,7 @@ void __cdecl CIrcProto::DisconnectServerThread( void* )
{
EnterCriticalSection( &cs );
KillChatTimer( RetryTimer );
- if ( IsConnected() )
+ if ( IsConnected())
Disconnect();
LeaveCriticalSection( &cs );
return;
@@ -1184,7 +1184,7 @@ void CIrcProto::DisconnectFromServer(void)
GCEVENT gce = {0};
GCDEST gcd = {0};
- if ( m_perform && IsConnected() )
+ if ( m_perform && IsConnected())
DoPerform( "Event: Disconnect" );
gcd.iType = GC_EVENT_CONTROL;
@@ -1241,7 +1241,7 @@ VOID CALLBACK RetryTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
else ppro->KillChatTimer( ppro->RetryTimer );
}
-// logs text into NetLib (stolen from Jabber ;) )
+// logs text into NetLib (stolen from Jabber ;))
void CIrcProto::DoNetlibLog( const char* fmt, ... )
{
va_list vararg;
diff --git a/protocols/IRCG/tools.cpp b/protocols/IRCG/tools.cpp
index 5044c12715..d9218b2b42 100644
--- a/protocols/IRCG/tools.cpp
+++ b/protocols/IRCG/tools.cpp
@@ -117,7 +117,7 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand)
break;
tmp = op + tmp;
- if ( res.IsEmpty() )
+ if ( res.IsEmpty())
res = tmp;
else
res += _T(" ") + tmp;
@@ -227,7 +227,7 @@ void __stdcall RemoveLinebreaks( CMString& Message )
if (Message.Find( _T("\r\n"), 0) == 0)
Message.Delete(0,2);
- if ( (Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength()-2) == 0) )
+ if ( (Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength()-2) == 0))
Message.Delete(Message.GetLength()-2, 2);
}
@@ -542,7 +542,7 @@ INT_PTR CIrcProto::CallChatEvent(WPARAM wParam, LPARAM lParam)
//MBOT CORRECTIONS
//if ( gcetemp && gcetemp->pDest && gcetemp->pDest->ptszID ) {
if ( gcetemp && gcetemp->pDest && gcetemp->pDest->ptszID &&
- !my_strstri(gcetemp->pDest->ptszID, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline")) ) {
+ !my_strstri(gcetemp->pDest->ptszID, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline"))) {
CMString sTempId = MakeWndID( gcetemp->pDest->ptszID );
mir_realloc( gcetemp->pDest->ptszID, sizeof(TCHAR)*(sTempId.GetLength() + 1));
@@ -611,7 +611,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN
else
gce.ptszUserInfo = m_showAddresses ? pszUserInfo : NULL;
- if ( !sText.IsEmpty() )
+ if ( !sText.IsEmpty())
gce.ptszText = sText.c_str();
gce.dwItemData = dwItemData;
diff --git a/protocols/IRCG/ui_utils.cpp b/protocols/IRCG/ui_utils.cpp
index 3f8cb48029..d7c8e4b6b6 100644
--- a/protocols/IRCG/ui_utils.cpp
+++ b/protocols/IRCG/ui_utils.cpp
@@ -551,7 +551,7 @@ CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, HICON hIcon, const char*
CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, int iCoreIcon, const char* tooltip ) :
CCtrlButton( dlg, ctrlId ),
- m_hIcon( LoadSkinnedIcon(iCoreIcon) ),
+ m_hIcon( LoadSkinnedIcon(iCoreIcon)),
m_toolTip( tooltip )
{
}
diff --git a/protocols/IRCG/windows.cpp b/protocols/IRCG/windows.cpp
index 6eef163d34..313e99353c 100644
--- a/protocols/IRCG/windows.cpp
+++ b/protocols/IRCG/windows.cpp
@@ -169,12 +169,12 @@ void CWhoisDlg::ShowMessage( const CIrcMessage* pmsg )
m_InfoName.SetText( pmsg->parameters[5].c_str());
m_InfoAddress.SetText( pmsg->parameters[3].c_str());
m_InfoId.SetText( pmsg->parameters[2].c_str());
- m_InfoChannels.SetText( _T("") );
- m_InfoServer.SetText( _T("") );
- m_InfoAway2.SetText( _T("") );
- m_InfoAuth.SetText( _T("") );
- m_InfoOther.SetText( _T("") );
- m_Reply.SetText( _T("") );
+ m_InfoChannels.SetText( _T(""));
+ m_InfoServer.SetText( _T(""));
+ m_InfoAway2.SetText( _T(""));
+ m_InfoAuth.SetText( _T(""));
+ m_InfoOther.SetText( _T(""));
+ m_Reply.SetText( _T(""));
SetWindowText( m_hwnd, TranslateT("User information"));
EnableWindow( GetDlgItem( m_hwnd, ID_INFO_QUERY), true );
ShowWindow( m_hwnd, SW_SHOW);
@@ -189,13 +189,13 @@ void CWhoisDlg::ShowMessageNoUser( const CIrcMessage* pmsg )
m_InfoNick.SetText( pmsg->parameters[2].c_str());
m_InfoNick.SendMsg( CB_SETEDITSEL, 0,MAKELPARAM(0,-1));
m_Caption.SetText( pmsg->parameters[2].c_str());
- m_InfoName.SetText( _T("") );
- m_InfoAddress.SetText( _T("") );
- m_InfoId.SetText( _T("") );
- m_InfoChannels.SetText( _T("") );
- m_InfoServer.SetText( _T("") );
- m_InfoAway2.SetText( _T("") );
- m_InfoAuth.SetText( _T("") );
+ m_InfoName.SetText( _T(""));
+ m_InfoAddress.SetText( _T(""));
+ m_InfoId.SetText( _T(""));
+ m_InfoChannels.SetText( _T(""));
+ m_InfoServer.SetText( _T(""));
+ m_InfoAway2.SetText( _T(""));
+ m_InfoAuth.SetText( _T(""));
m_Reply.SetText( _T(""));
EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), false);
}
@@ -422,7 +422,7 @@ struct ListViewSortParam
static int CALLBACK ListViewSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
ListViewSortParam* param = ( ListViewSortParam* )lParamSort;
- if ( !param->pList->GetHwnd() )
+ if ( !param->pList->GetHwnd())
return 0;
TCHAR temp1[512];
@@ -926,7 +926,7 @@ void CManagerDlg::OnClose()
S += _T(" ") + S1;
} }
- if ( !S.IsEmpty() && m_proto->IsConnected() ) {
+ if ( !S.IsEmpty() && m_proto->IsConnected()) {
mir_sntprintf( temp, SIZEOF(temp), _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
char* p = mir_t2a(temp);
m_proto->setTString(p, S.c_str());
@@ -1228,7 +1228,7 @@ void CManagerDlg::OnCheck5( CCtrlData* )
void CManagerDlg::OnCheck6( CCtrlData* )
{
- m_limit.Enable( m_check6.GetState() );
+ m_limit.Enable( m_check6.GetState());
m_applyModes.Enable();
}
@@ -1272,7 +1272,7 @@ void CManagerDlg::InitManager( int mode, const TCHAR* window )
CHANNELINFO* wi = (CHANNELINFO *)m_proto->DoEvent(GC_EVENT_GETITEMDATA, window, NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0);
if ( wi ) {
- if ( m_proto->IsConnected() ) {
+ if ( m_proto->IsConnected()) {
TCHAR temp[1000];
mir_sntprintf(temp, SIZEOF(temp), _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
diff --git a/protocols/JabberG/MString.h b/protocols/JabberG/MString.h
index 6f90b7741b..7cc16ff4a3 100644
--- a/protocols/JabberG/MString.h
+++ b/protocols/JabberG/MString.h
@@ -115,7 +115,7 @@ public:
CMSimpleStringT(PCXSTR pszSrc)
{
int nLength = StringLength( pszSrc );
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if (pData != NULL)
{
Attach( pData );
@@ -125,7 +125,7 @@ public:
}
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if ( pData != NULL )
{
Attach( pData );
@@ -150,8 +150,8 @@ public:
CMStringData* pOldData = GetData();
if ( pSrcData != pOldData)
{
- if ( pOldData->IsLocked() )
- SetString( strSrc.GetString(), strSrc.GetLength() );
+ if ( pOldData->IsLocked())
+ SetString( strSrc.GetString(), strSrc.GetLength());
else
{
CMStringData* pNewData = CloneData( pSrcData );
@@ -218,7 +218,7 @@ public:
void Append( PCXSTR pszSrc )
{
- Append( pszSrc, StringLength( pszSrc ) );
+ Append( pszSrc, StringLength( pszSrc ));
}
void Append( PCXSTR pszSrc, int nLength )
{
@@ -257,7 +257,7 @@ public:
}
void Append( const CMSimpleStringT& strSrc )
{
- Append( strSrc.GetString(), strSrc.GetLength() );
+ Append( strSrc.GetString(), strSrc.GetLength());
}
void Empty()
{
@@ -265,7 +265,7 @@ public:
if ( pOldData->nDataLength == 0 )
return;
- if ( pOldData->IsLocked() )
+ if ( pOldData->IsLocked())
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -284,15 +284,15 @@ public:
if ( pOldData->nAllocLength == nLength )
return;
- if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked()) // Don't reallocate a locked buffer that's shrinking
{
- CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ));
if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
- CopyChars( PXSTR( pNewData->data() ), nLength, PCXSTR( pOldData->data() ), nLength );
+ CopyChars( PXSTR( pNewData->data()), nLength, PCXSTR( pOldData->data()), nLength );
pOldData->Release();
Attach( pNewData );
@@ -311,7 +311,7 @@ public:
PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public:
PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -389,7 +389,7 @@ public:
}
void SetString( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void SetString( PCXSTR pszSrc, int nLength )
{
@@ -421,7 +421,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength());
return s;
}
@@ -430,7 +430,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return s;
}
@@ -439,7 +439,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength());
return s;
}
@@ -527,7 +527,7 @@ private:
if (pNewData != NULL)
{
int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
- CopyChars( PXSTR( pNewData->data() ), nCharsToCopy, PCXSTR( pOldData->data() ), nCharsToCopy );
+ CopyChars( PXSTR( pNewData->data()), nCharsToCopy, PCXSTR( pOldData->data()), nCharsToCopy );
pNewData->nDataLength = nOldLength;
pOldData->Release();
Attach(pNewData);
@@ -578,7 +578,7 @@ private:
if ( pOldData->nAllocLength >= nLength || nLength <= 0)
return;
- CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ));
if ( pNewData != NULL )
Attach( pNewData );
}
@@ -676,19 +676,19 @@ public:
static int __stdcall StringSpanIncluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static int __stdcall StringSpanExcluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static LPSTR __stdcall StringUppercase( LPSTR psz )
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -696,7 +696,7 @@ public:
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -722,7 +722,7 @@ public:
static LPSTR __stdcall StringReverse( LPSTR psz )
{
- return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz )) );
}
static int __stdcall GetFormattedLength( LPCSTR pszFormat, va_list args );
@@ -741,7 +741,7 @@ public:
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc )
{
// Returns required buffer length in XCHARs
- return int( strlen( pszSrc ) );
+ return int( strlen( pszSrc ));
}
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc, int nLength )
@@ -768,7 +768,7 @@ public:
if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s( pszDest, nDestLength*sizeof( char ),
- pszSrc, nSrcLength*sizeof( char ) );
+ pszSrc, nSrcLength*sizeof( char ));
}
static void __stdcall ConvertToBaseType( LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
@@ -835,13 +835,13 @@ public:
static int __stdcall SafeStringLen( LPCSTR psz )
{
// returns length in bytes
- return (psz != NULL) ? int( strlen( psz ) ) : 0;
+ return (psz != NULL) ? int( strlen( psz )) : 0;
}
static int __stdcall SafeStringLen( LPCWSTR psz )
{
// returns length in wchar_ts
- return (psz != NULL) ? int( wcslen( psz ) ) : 0;
+ return (psz != NULL) ? int( wcslen( psz )) : 0;
}
static int __stdcall GetCharLen( const wchar_t* pch )
@@ -853,7 +853,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return int( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return int( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize )
@@ -879,12 +879,12 @@ public:
static int __stdcall IsDigit( wchar_t ch )
{
- return iswdigit( static_cast<unsigned short>(ch) );
+ return iswdigit( static_cast<unsigned short>(ch));
}
static int __stdcall IsSpace( wchar_t ch )
{
- return iswspace( static_cast<unsigned short>(ch) );
+ return iswspace( static_cast<unsigned short>(ch));
}
static int __stdcall StringCompare( LPCWSTR pszA, LPCWSTR pszB )
@@ -1068,7 +1068,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize )
@@ -1362,7 +1362,7 @@ public:
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
PXSTR pszBuffer = this->GetBuffer();
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#else
memmove( pszBuffer+iIndex, pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#endif
@@ -1378,7 +1378,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1387,9 +1387,9 @@ public:
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#endif
pszBuffer[iIndex] = ch;
@@ -1403,7 +1403,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
{
iIndex = this->GetLength();
}
@@ -1418,10 +1418,10 @@ public:
PXSTR pszBuffer = this->GetBuffer( nNewLength );
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy_s( pszBuffer+iIndex, nInsertLength*sizeof( XCHAR ), psz, nInsertLength*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy( pszBuffer+iIndex, psz, nInsertLength*sizeof( XCHAR ));
#endif
this->ReleaseBufferSetLength( nNewLength );
@@ -1440,7 +1440,7 @@ public:
{
// otherwise modify each character that matches in the string
bool bCopied = false;
- PXSTR pszBuffer = const_cast< PXSTR >( this->GetString() ); // We don't actually write to pszBuffer until we've called GetBuffer().
+ PXSTR pszBuffer = const_cast< PXSTR >( this->GetString()); // We don't actually write to pszBuffer until we've called GetBuffer().
int nLength = this->GetLength();
int iChar = 0;
@@ -1488,7 +1488,7 @@ public:
while( pszStart < pszEnd )
{
PCXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL)
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL)
{
nCount++;
pszStart = pszTarget+nSourceLen;
@@ -1505,7 +1505,7 @@ public:
int nOldLength = this->GetLength();
int nNewLength = nOldLength+(nReplacementLen-nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ) );
+ PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart+nOldLength;
@@ -1514,13 +1514,13 @@ public:
while( pszStart < pszEnd )
{
PXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL )
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL )
{
int nBalance = nOldLength-int(pszTarget-pszBuffer+nSourceLen);
memmove_s( pszTarget+nReplacementLen, nBalance*sizeof( XCHAR ),
- pszTarget+nSourceLen, nBalance*sizeof( XCHAR ) );
+ pszTarget+nSourceLen, nBalance*sizeof( XCHAR ));
memcpy_s( pszTarget, nReplacementLen*sizeof( XCHAR ),
- pszNew, nReplacementLen*sizeof( XCHAR ) );
+ pszNew, nReplacementLen*sizeof( XCHAR ));
pszStart = pszTarget+nReplacementLen;
pszTarget[nReplacementLen+nBalance] = 0;
nOldLength += (nReplacementLen-nSourceLen);
@@ -1571,7 +1571,7 @@ public:
CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0))
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1707,7 +1707,7 @@ public:
while( *psz != 0 )
{
- if ( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ))
{
if ( pszLast == NULL )
pszLast = psz;
@@ -1722,7 +1722,7 @@ public:
if ( pszLast != NULL )
{
// truncate at trailing space start
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1737,20 +1737,20 @@ public:
PCXSTR psz = this->GetString();
- while( StringTraits::IsSpace( *psz ) )
+ while( StringTraits::IsSpace( *psz ))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1805,7 +1805,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1816,7 +1816,7 @@ public:
CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
@@ -1846,7 +1846,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1864,15 +1864,15 @@ public:
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1883,26 +1883,26 @@ public:
CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
PCXSTR psz = this->GetString();
- while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL) )
+ while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1946,14 +1946,14 @@ public:
if (nCount < 0)
nCount = 0;
- if ( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength())
nCount = this->GetLength()-iFirst;
- if ( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength())
nCount = 0;
// optimize case of returning entire string
- if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()))
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -2030,13 +2030,13 @@ public:
// Allocate a BSTR containing a copy of the string
BSTR AllocSysString() const
{
- BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength() );
+ BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength());
return bstrResult;
}
BSTR SetSysString( BSTR* pbstr ) const
{
- StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength() );
+ StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength());
return *pbstr;
}
@@ -2075,7 +2075,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength());
return strResult;
}
@@ -2084,7 +2084,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return strResult;
}
@@ -2093,7 +2093,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength());
return strResult;
}
@@ -2123,7 +2123,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
@@ -2133,7 +2133,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 983ad4daea..e750288a01 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -268,7 +268,7 @@ extern "C" int __declspec( dllexport ) Load( PLUGINLINK *link )
if ( JabberAlphaBlend == NULL && ( hDll = LoadLibraryA("msimg32.dll" )))
JabberAlphaBlend = (BOOL (WINAPI *)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION)) GetProcAddress(hDll, "AlphaBlend");
- if ( IsWinVerXPPlus() ) {
+ if ( IsWinVerXPPlus()) {
if ( hDll = GetModuleHandleA("uxtheme")) {
JabberDrawThemeParentBackground = (HRESULT (WINAPI *)(HWND,HDC,RECT *))GetProcAddress(hDll, "DrawThemeParentBackground");
JabberIsThemeActive = (BOOL (WINAPI *)())GetProcAddress(hDll, "IsThemeActive");
diff --git a/protocols/JabberG/jabber_adhoc.cpp b/protocols/JabberG/jabber_adhoc.cpp
index 0221e95d11..cb398fa5f7 100644
--- a/protocols/JabberG/jabber_adhoc.cpp
+++ b/protocols/JabberG/jabber_adhoc.cpp
@@ -143,7 +143,7 @@ int CJabberProto::AdHoc_ExecuteCommand( HWND hwndDlg, TCHAR*, JabberAdHocData* d
<< XCHILDNS( _T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR( _T("node"), node ) << XATTR( _T("action"), _T("execute")));
EnableDlgItem( hwndDlg, IDC_SUBMIT, FALSE );
- SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ) );
+ SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ));
} }
xi.destroyNode( dat->CommandsNode ); dat->CommandsNode = NULL;
@@ -155,7 +155,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
{
int nodeIdx = 0;
const TCHAR * type = xmlGetAttrValue( iqNode, _T("type"));
- if ( !type || !_tcscmp( type, _T( "error" ) ) ) {
+ if ( !type || !_tcscmp( type, _T( "error" )) ) {
// error occurred here
TCHAR buff[255];
const TCHAR* code = NULL;
@@ -166,10 +166,10 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
code = xmlGetAttrValue( errorNode, _T("code"));
description = xmlGetText( errorNode );
}
- _sntprintf( buff, SIZEOF(buff), TranslateT( "Error %s %s" ), (code) ? code : _T(""), (description) ? description : _T("") );
+ _sntprintf( buff, SIZEOF(buff), TranslateT( "Error %s %s" ), (code) ? code : _T(""), (description) ? description : _T(""));
JabberFormSetInstruction( hwndDlg, buff );
}
- else if ( !_tcscmp( type, _T("result") ) ) {
+ else if ( !_tcscmp( type, _T("result")) ) {
BOOL validResponse = FALSE;
EnumChildWindows( GetDlgItem( hwndDlg, IDC_FRAME ), sttDeleteChildWindowsProc, 0 );
dat->CurrentHeight = 0;
@@ -180,8 +180,8 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T( "xmlns" ));
const TCHAR* node = xmlGetAttrValue( queryNode, _T( "node" ));
if ( xmlns && node
- && !_tcscmp( xmlns, _T( JABBER_FEAT_DISCO_ITEMS ) )
- && !_tcscmp( node, _T( JABBER_FEAT_COMMANDS ) ) )
+ && !_tcscmp( xmlns, _T( JABBER_FEAT_DISCO_ITEMS ))
+ && !_tcscmp( node, _T( JABBER_FEAT_COMMANDS )) )
validResponse = TRUE;
}
if ( queryNode && xmlGetChild( queryNode ,0) && validResponse ) {
@@ -201,12 +201,12 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
} }
if (nodeIdx>1) {
- JabberFormSetInstruction( hwndDlg, TranslateT("Select Command") );
+ JabberFormSetInstruction( hwndDlg, TranslateT("Select Command"));
ShowDlgItem( hwndDlg, IDC_FRAME, SW_SHOW);
ShowDlgItem( hwndDlg, IDC_VSCROLL, SW_SHOW);
EnableDlgItem( hwndDlg, IDC_SUBMIT, TRUE);
} else {
- JabberFormSetInstruction(hwndDlg, TranslateT("Not supported") );
+ JabberFormSetInstruction(hwndDlg, TranslateT("Not supported"));
} }
JabberAdHoc_RefreshFrameScroll( hwndDlg, dat );
@@ -227,7 +227,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
const TCHAR *type;
if (( type = xmlGetAttrValue( workNode, _T("type"))) == NULL ) return TRUE;
- if ( !lstrcmp( type, _T("result") ) ) {
+ if ( !lstrcmp( type, _T("result")) ) {
// wParam = <iq/> node from responder as a result of command execution
HXML commandNode, xNode, n;
if (( commandNode = xmlGetChild( dat->AdHocNode, _T("command"))) == NULL )
@@ -241,11 +241,11 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
HWND hFrame = GetDlgItem( hwndDlg, IDC_FRAME );
ShowWindow( GetDlgItem( hwndDlg, IDC_FRAME_TEXT ), SW_HIDE );
if (( n = xmlGetChild( xNode , "instructions" )) != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else if (( n = xmlGetChild( xNode , "title" )) != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else
- JabberFormSetInstruction(hwndDlg, TranslateTS(status) );
+ JabberFormSetInstruction(hwndDlg, TranslateTS(status));
JabberFormCreateUI( hFrame, xNode, &dat->CurrentHeight );
ShowDlgItem( hwndDlg, IDC_FRAME , SW_SHOW);
}
@@ -259,7 +259,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
if (noteNode)
noteText = xmlGetText( noteNode );
- JabberFormSetInstruction(hwndDlg, noteText ? noteText : TranslateTS(status) );
+ JabberFormSetInstruction(hwndDlg, noteText ? noteText : TranslateTS(status));
}
//check actions
@@ -425,7 +425,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc( HWND hwndDlg, UINT msg, WPAR
<< XATTR( _T("node"), pStartupParams->m_szNode ) << XATTR( _T("action"), _T("execute")));
EnableDlgItem( hwndDlg, IDC_SUBMIT, FALSE );
- SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ) );
+ SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ));
TCHAR Caption[ 512 ];
_sntprintf(Caption, SIZEOF(Caption), _T("%s %s"), TranslateT("Sending Ad-Hoc command to"), dat->ResponderJID );
@@ -595,7 +595,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam )
if (!item || selected) {
CJabberAdhocStartupParams* pStartupParams = new CJabberAdhocStartupParams( this, jid, NULL );
- CreateDialogParam( hInst, MAKEINTRESOURCE( IDD_FORM ), NULL, JabberAdHoc_CommandDlgProc, ( LPARAM )(pStartupParams) );
+ CreateDialogParam( hInst, MAKEINTRESOURCE( IDD_FORM ), NULL, JabberAdHoc_CommandDlgProc, ( LPARAM )(pStartupParams));
}
JFreeVariant( &dbv );
diff --git a/protocols/JabberG/jabber_agent.cpp b/protocols/JabberG/jabber_agent.cpp
index 35337568b9..144527430f 100644
--- a/protocols/JabberG/jabber_agent.cpp
+++ b/protocols/JabberG/jabber_agent.cpp
@@ -157,7 +157,7 @@ public:
// use new jabber:x:data form
HXML n = xmlGetChild( xNode , "instructions" );
if ( n != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( m_hwnd, xmlGetText( n ) );
+ JabberFormSetInstruction( m_hwnd, xmlGetText( n ));
JabberFormCreateUI( hFrame, xNode, &m_formHeight /*dummy*/ );
}
@@ -169,9 +169,9 @@ public:
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("instructions"))) {
- JabberFormSetInstruction( m_hwnd, xmlGetText( n ) );
+ JabberFormSetInstruction( m_hwnd, xmlGetText( n ));
}
else if ( !lstrcmp( xmlGetName( n ), _T("key")) || !lstrcmp( xmlGetName( n ), _T("registered"))) {
// do nothing
@@ -256,13 +256,13 @@ public:
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("key"))) {
// field that must be passed along with the registration
- if ( xmlGetText( n ) )
- xmlAddChild( query, xmlGetName( n ), xmlGetText( n ) );
+ if ( xmlGetText( n ))
+ xmlAddChild( query, xmlGetName( n ), xmlGetText( n ));
else
- xmlAddChild( query, xmlGetName( n ) );
+ xmlAddChild( query, xmlGetName( n ));
}
else if ( !lstrcmp( xmlGetName( n ), _T("registered")) || !lstrcmp( xmlGetName( n ), _T("instructions"))) {
// do nothing, we will skip these
diff --git a/protocols/JabberG/jabber_bookmarks.cpp b/protocols/JabberG/jabber_bookmarks.cpp
index 1dbc42868b..096b8bf55f 100644
--- a/protocols/JabberG/jabber_bookmarks.cpp
+++ b/protocols/JabberG/jabber_bookmarks.cpp
@@ -49,7 +49,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc( HWND hwndDlg, UINT msg, WPARAM
param->ppro->m_hwndJabberAddBookmark = hwndDlg;
TranslateDialogDefault( hwndDlg );
if ( item = param->m_item ) {
- if ( !lstrcmp( item->type, _T("conference") )) {
+ if ( !lstrcmp( item->type, _T("conference"))) {
if (!_tcschr( item->jid, _T( '@' ))) { //no room name - consider it is transport
SendDlgItemMessage(hwndDlg, IDC_AGENT_RADIO, BM_SETCHECK, BST_CHECKED, 0);
EnableWindow( GetDlgItem( hwndDlg, IDC_NICK ), FALSE );
@@ -85,9 +85,9 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc( HWND hwndDlg, UINT msg, WPARAM
return TRUE;
case WM_COMMAND:
- switch ( HIWORD(wParam) ) {
+ switch ( HIWORD(wParam)) {
case BN_CLICKED:
- switch (LOWORD (wParam) ) {
+ switch (LOWORD (wParam)) {
case IDC_ROOM_RADIO:
EnableWindow( GetDlgItem( hwndDlg, IDC_NICK ), TRUE );
EnableWindow( GetDlgItem( hwndDlg, IDC_PASSWORD ), TRUE );
diff --git a/protocols/JabberG/jabber_caps.cpp b/protocols/JabberG/jabber_caps.cpp
index 9c3f69b31f..00f2a2bc68 100644
--- a/protocols/JabberG/jabber_caps.cpp
+++ b/protocols/JabberG/jabber_caps.cpp
@@ -91,7 +91,7 @@ const JabberFeatCapPair g_JabberFeatCapPairsExt[] = {
void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
if ( !r )
return;
@@ -103,42 +103,42 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
// XEP-0232 support
HXML xform;
for ( int i = 1; ( xform = xmlGetNthChild( query, _T("x"), i)) != NULL; i++ ) {
- TCHAR *szFormTypeValue = XPath( xform, _T("field[@var='FORM_TYPE']/value") );
- if ( szFormTypeValue && !_tcscmp( szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo") )) {
+ TCHAR *szFormTypeValue = XPath( xform, _T("field[@var='FORM_TYPE']/value"));
+ if ( szFormTypeValue && !_tcscmp( szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
if ( r->pSoftwareInfo )
delete r->pSoftwareInfo;
r->pSoftwareInfo = new JABBER_XEP0232_SOFTWARE_INFO;
if ( r->pSoftwareInfo ) {
- TCHAR *szTmp = XPath( xform, _T("field[@var='os']/value") );
+ TCHAR *szTmp = XPath( xform, _T("field[@var='os']/value"));
if ( szTmp )
r->pSoftwareInfo->szOs = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='os_version']/value") );
+ szTmp = XPath( xform, _T("field[@var='os_version']/value"));
if ( szTmp )
r->pSoftwareInfo->szOsVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='software']/value") );
+ szTmp = XPath( xform, _T("field[@var='software']/value"));
if ( szTmp )
r->pSoftwareInfo->szSoftware = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='software_version']/value") );
+ szTmp = XPath( xform, _T("field[@var='software_version']/value"));
if ( szTmp )
r->pSoftwareInfo->szSoftwareVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-version']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-version']/value"));
if ( szTmp )
r->pSoftwareInfo->szXMirandaCoreVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-unicode']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-unicode']/value"));
if ( !szTmp ) // old deprecated format
- szTmp = XPath( xform, _T("field[@var='x-miranda-is-unicode']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-is-unicode']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsUnicode = TRUE;
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-alpha']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-alpha']/value"));
if ( !szTmp ) // old deprecated format
- szTmp = XPath( xform, _T("field[@var='x-miranda-is-alpha']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-is-alpha']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsAlpha = TRUE;
- szTmp = XPath( xform, _T("field[@var='x-miranda-jabber-is-debug']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-jabber-is-debug']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsDebug = TRUE;
}
- JabberUserInfoUpdate( pInfo->GetHContact() );
+ JabberUserInfoUpdate( pInfo->GetHContact());
}
}
}
@@ -146,7 +146,7 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
void CJabberProto::OnIqResultCapsDiscoInfo( HXML, CJabberIqInfo* pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
HXML query = pInfo->GetChildNode();
if ( pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query ) {
@@ -171,7 +171,7 @@ void CJabberProto::OnIqResultCapsDiscoInfo( HXML, CJabberIqInfo* pInfo )
if (!m_clientCapsManager.SetClientCaps( pInfo->GetIqId(), jcbCaps ))
if ( r )
r->jcbCachedCaps = jcbCaps;
- JabberUserInfoUpdate( pInfo->GetHContact() );
+ JabberUserInfoUpdate( pInfo->GetHContact());
}
else {
// no version info support and no XEP-0115 support?
@@ -243,7 +243,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo *pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->szCapsNode, r->szCapsVer, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->szCapsNode, r->szCapsVer, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
r->dwDiscoInfoRequestTime = pInfo->GetRequestTime();
TCHAR queryNode[512];
@@ -260,7 +260,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
if ( jcbMainCaps != JABBER_RESOURCE_CAPS_TIMEOUT && r->szCapsExt ) {
TCHAR *caps = mir_tstrdup( r->szCapsExt );
- TCHAR *token = _tcstok( caps, _T(" ") );
+ TCHAR *token = _tcstok( caps, _T(" "));
while ( token ) {
switch ( jcbExtCaps = m_clientCapsManager.GetClientCaps( r->szCapsNode, token )) {
case JABBER_RESOURCE_CAPS_ERROR:
@@ -272,7 +272,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->szCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->szCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
TCHAR queryNode[512];
mir_sntprintf( queryNode, SIZEOF(queryNode), _T("%s#%s"), r->szCapsNode, token );
@@ -290,7 +290,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
jcbCaps |= jcbExtCaps;
}
- token = _tcstok( NULL, _T(" ") );
+ token = _tcstok( NULL, _T(" "));
}
mir_free(caps);
@@ -357,7 +357,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps( r->software, r->version );
if ( jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR ) {
// Bombus hack:
- if ( !_tcscmp( r->software, _T( "Bombus" )) || !_tcscmp( r->software, _T( "BombusMod" )) ) {
+ if ( !_tcscmp( r->software, _T( "Bombus" )) || !_tcscmp( r->software, _T( "BombusMod" ))) {
jcbMainCaps = JABBER_CAPS_SI|JABBER_CAPS_SI_FT|JABBER_CAPS_IBB|JABBER_CAPS_MESSAGE_EVENTS|JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY|JABBER_CAPS_DATA_FORMS|JABBER_CAPS_LAST_ACTIVITY|JABBER_CAPS_VERSION|JABBER_CAPS_COMMANDS|JABBER_CAPS_VCARD_TEMP;
m_clientCapsManager.SetClientCaps( r->software, r->version, jcbMainCaps );
}
@@ -377,7 +377,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo *pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->software, r->version, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->software, r->version, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
r->dwDiscoInfoRequestTime = pInfo->GetRequestTime();
XmlNodeIq iq( pInfo );
@@ -515,7 +515,7 @@ BOOL CJabberClientCaps::SetPartialCaps( int nIqId, JabberCapsBits jcbCaps ) {
CJabberClientPartialCaps *pCaps = FindById( nIqId );
if ( !pCaps )
return FALSE;
- if ( !(jcbCaps & JABBER_RESOURCE_CAPS_ERROR) && m_szNode && pCaps->GetVersion() ) {
+ if ( !(jcbCaps & JABBER_RESOURCE_CAPS_ERROR) && m_szNode && pCaps->GetVersion()) {
if ( !_tcscmp( m_szNode, _T( "http://miranda-im.org/caps" )) && !_tcscmp( pCaps->GetVersion(), _T( "0.7.0.13" )))
jcbCaps = jcbCaps & ( ~JABBER_CAPS_MESSAGE_RECEIPTS );
}
@@ -702,14 +702,14 @@ BOOL CJabberClientCapsManager::HandleInfoRequest( HXML, CJabberIqInfo* pInfo, co
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-version")) << XCHILD( _T("value"), szCoreVersion );
#ifdef _DEBUG
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-jabber-is-debug")) << XCHILD( _T("value"), _T("1") );
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-jabber-is-debug")) << XCHILD( _T("value"), _T("1"));
#endif
char szMirandaVersion[100];
if (!JCallService( MS_SYSTEM_GETVERSIONTEXT, sizeof( szMirandaVersion ), ( LPARAM )szMirandaVersion )) {
_strlwr( szMirandaVersion );
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-unicode")) << XCHILD( _T("value"), strstr( szMirandaVersion, "unicode" ) ? _T("1") : _T("0") );
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-alpha")) << XCHILD( _T("value"), strstr( szMirandaVersion, "alpha" ) ? _T("1") : _T("0") );
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-unicode")) << XCHILD( _T("value"), strstr( szMirandaVersion, "unicode" ) ? _T("1") : _T("0"));
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-alpha")) << XCHILD( _T("value"), strstr( szMirandaVersion, "alpha" ) ? _T("1") : _T("0"));
}
}
diff --git a/protocols/JabberG/jabber_captcha.cpp b/protocols/JabberG/jabber_captcha.cpp
index c090499cd2..5808cd285c 100644
--- a/protocols/JabberG/jabber_captcha.cpp
+++ b/protocols/JabberG/jabber_captcha.cpp
@@ -53,7 +53,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
LPCTSTR hint = params->hint;
if ( hint == NULL )
hint = TranslateT("Enter the text you see");
- SetDlgItemText( hwndDlg, IDC_INSTRUCTION, TranslateTS( hint ) );
+ SetDlgItemText( hwndDlg, IDC_INSTRUCTION, TranslateTS( hint ));
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, ( LONG )params );
return TRUE;
@@ -95,7 +95,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
return TRUE;
case IDC_SUBMIT:
- GetDlgItemText( hwndDlg, IDC_VALUE, params->Result, SIZEOF(params->Result) );
+ GetDlgItemText( hwndDlg, IDC_VALUE, params->Result, SIZEOF(params->Result));
EndDialog( hwndDlg, 1 );
return TRUE;
}
diff --git a/protocols/JabberG/jabber_chat.cpp b/protocols/JabberG/jabber_chat.cpp
index b90ce80d6a..fc2662f94c 100644
--- a/protocols/JabberG/jabber_chat.cpp
+++ b/protocols/JabberG/jabber_chat.cpp
@@ -775,7 +775,7 @@ public:
CSuper::OnInitDialog();
TCHAR buf[256];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_room, TranslateT("Send groupchat invitation.") );
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_room, TranslateT("Send groupchat invitation."));
SetDlgItemText(m_hwnd, IDC_HEADERBAR, buf);
WindowSetIcon(m_hwnd, m_proto, "group");
@@ -984,7 +984,7 @@ static LRESULT CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
switch (value)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( dat->him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( dat->him->szRealJid, szBareJid, SIZEOF(szBareJid));
case AFFILIATION_NONE:
if (dat->him->szRealJid)
dat->ppro->AdminSet(dat->item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
@@ -1181,7 +1181,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
}
else
@@ -1194,7 +1194,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("member"));
}
else
@@ -1207,7 +1207,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("admin"));
}
else
@@ -1220,7 +1220,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("owner"));
}
else
@@ -1232,7 +1232,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL) {
if ( him->szRealJid && *him->szRealJid ) {
TCHAR szVictimBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szVictimBareJid, SIZEOF(szVictimBareJid) );
+ JabberStripJid( him->szRealJid, szVictimBareJid, SIZEOF(szVictimBareJid));
mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s: "), me->resourceName );
mir_sntprintf( szTitle, SIZEOF(szTitle), _T("%s %s"), TranslateT( "Reason to ban" ), him->resourceName );
@@ -1455,7 +1455,7 @@ static void sttLogListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
case IDM_PRESENCE_DND:
case IDM_PRESENCE_FREE4CHAT:
{
- if ( HANDLE h = ppro->HContactFromJID( item->jid ) )
+ if ( HANDLE h = ppro->HContactFromJID( item->jid ))
ppro->OnMenuHandleDirectPresence( (WPARAM)h, 0, gch->dwData );
break;
}
@@ -1568,7 +1568,7 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////////////
void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR* str , TCHAR* rsn)
{
- const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@') ) ? _T("jid") : _T("nick");
+ const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@')) ? _T("jid") : _T("nick");
TCHAR* roomJid = jidListInfo->roomJid;
if ( jidListInfo->type == MUC_BANLIST ) {
AdminSetReason( roomJid, xmlnsAdmin, field, str, _T("affiliation"), _T("outcast"), rsn);
@@ -1577,7 +1577,7 @@ void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR*
void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR* str )
{
- const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@') ) ? _T("jid") : _T("nick");
+ const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@')) ? _T("jid") : _T("nick");
TCHAR* roomJid = jidListInfo->roomJid;
switch (jidListInfo->type) {
diff --git a/protocols/JabberG/jabber_console.cpp b/protocols/JabberG/jabber_console.cpp
index 9772446e4d..4214e67563 100644
--- a/protocols/JabberG/jabber_console.cpp
+++ b/protocols/JabberG/jabber_console.cpp
@@ -88,7 +88,7 @@ static void sttRtfAppendXml(StringBuf *buf, HXML node, DWORD flags, int indent);
void CJabberProto::OnConsoleProcessXml(HXML node, DWORD flags)
{
if ( node && m_pDlgConsole ) {
- if ( xmlGetName( node ) ) {
+ if ( xmlGetName( node )) {
if ( FilterXml( node, flags )) {
StringBuf buf = {0};
sttAppendBufRaw(&buf, RTF_HEADER);
@@ -243,7 +243,7 @@ static void sttRtfAppendXml(StringBuf *buf, HXML node, DWORD flags, int indent)
sttAppendBufRaw(buf, RTF_ENDATTRNAME);
sttAppendBufRaw(buf, "=\"");
sttAppendBufRaw(buf, RTF_BEGINATTRVAL);
- sttAppendBufT(buf, ( TCHAR* )xmlGetAttr( node, i) );
+ sttAppendBufT(buf, ( TCHAR* )xmlGetAttr( node, i));
sttAppendBufRaw(buf, "\"");
sttAppendBufRaw(buf, RTF_ENDATTRVAL);
}
@@ -712,7 +712,7 @@ void CJabberProto::ConsoleUninit()
INT_PTR __cdecl CJabberProto::OnMenuHandleConsole(WPARAM, LPARAM)
{
if ( m_pDlgConsole )
- SetForegroundWindow( m_pDlgConsole->GetHwnd() );
+ SetForegroundWindow( m_pDlgConsole->GetHwnd());
else
if ( m_hThreadConsole )
PostThreadMessage( m_dwConsoleThreadId, WM_CREATECONSOLE, 0, 0 );
diff --git a/protocols/JabberG/jabber_disco.cpp b/protocols/JabberG/jabber_disco.cpp
index 236ce274c6..e44f3613f9 100644
--- a/protocols/JabberG/jabber_disco.cpp
+++ b/protocols/JabberG/jabber_disco.cpp
@@ -201,7 +201,7 @@ void CJabberProto::OnIqResultServiceDiscoveryInfo( HXML iqNode, CJabberIqInfo* p
pNode->SetInfoRequestErrorText( str );
mir_free( str );
}
- else pNode->SetInfoRequestErrorText( TranslateT("request timeout.") );
+ else pNode->SetInfoRequestErrorText( TranslateT("request timeout."));
pNode->SetInfoRequestId( JABBER_DISCO_RESULT_ERROR );
}
@@ -245,7 +245,7 @@ void CJabberProto::OnIqResultServiceDiscoveryItems( HXML iqNode, CJabberIqInfo*
mir_free( str );
}
else {
- pNode->SetItemsRequestErrorText( _T("request timeout.") );
+ pNode->SetItemsRequestErrorText( _T("request timeout."));
}
pNode->SetItemsRequestId( JABBER_DISCO_RESULT_ERROR );
}
@@ -312,15 +312,15 @@ BOOL CJabberProto::SendInfoRequest(CJabberSDNode* pNode, HXML parent)
return FALSE;
// disco#info
- if ( !pNode->GetInfoRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetInfoRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetInfoRequestId( pInfo->GetIqId() );
+ pNode->SetInfoRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_INFO));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -342,15 +342,15 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode* pNode, HXML parent)
return FALSE;
// disco#info
- if ( !pNode->GetInfoRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetInfoRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetInfoRequestId( pInfo->GetIqId() );
+ pNode->SetInfoRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_INFO));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -359,15 +359,15 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode* pNode, HXML parent)
}
// disco#items
- if ( !pNode->GetItemsRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryItems, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetItemsRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryItems, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetItemsRequestId( pInfo->GetIqId() );
+ pNode->SetItemsRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_ITEMS));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -550,7 +550,7 @@ BOOL CJabberProto::SyncTree(HTREELISTITEM hIndex, CJabberSDNode* pNode)
CJabberSDNode* pTmp = pNode;
while (pTmp) {
- if ( !pTmp->GetTreeItemHandle() ) {
+ if ( !pTmp->GetTreeItemHandle()) {
HTREELISTITEM hNewItem = TreeList_AddItem(
GetDlgItem(m_pDlgServiceDiscovery->GetHwnd(), IDC_TREE_DISCO), hIndex,
pTmp->GetName() ? pTmp->GetName() : pTmp->GetJid(),
@@ -566,8 +566,8 @@ BOOL CJabberProto::SyncTree(HTREELISTITEM hIndex, CJabberSDNode* pNode)
ApplyNodeIcon(pNode->GetTreeItemHandle(), pNode);
- if ( pTmp->GetFirstChildNode() )
- SyncTree( pTmp->GetTreeItemHandle(), pTmp->GetFirstChildNode() );
+ if ( pTmp->GetFirstChildNode())
+ SyncTree( pTmp->GetTreeItemHandle(), pTmp->GetFirstChildNode());
pTmp = pTmp->GetNext();
}
@@ -642,11 +642,11 @@ void CJabberDlgDiscovery::OnInitDialog()
if ( m_jid ) {
SetDlgItemText( m_hwnd, IDC_COMBO_JID, m_jid );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
m_focusEditAfterBrowse = false;
} else {
SetDlgItemTextA( m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->server );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
m_focusEditAfterBrowse = true;
}
@@ -804,7 +804,7 @@ void CJabberDlgDiscovery::btnViewAsList_OnClick(CCtrlButton *)
void CJabberDlgDiscovery::btnGoHome_OnClick(CCtrlButton *)
{
SetDlgItemTextA( m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->server );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
PostMessage( m_hwnd, WM_COMMAND, MAKEWPARAM( IDC_BUTTON_BROWSE, 0 ), 0 );
}
@@ -989,8 +989,8 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
CJabberSDNode* pNode = m_proto->m_SDManager.GetPrimaryNode();
while (pNode)
{
- if ( pNode->GetJid() ) {
- if ( !pNode->GetTreeItemHandle() ) {
+ if ( pNode->GetJid()) {
+ if ( !pNode->GetTreeItemHandle()) {
HTREELISTITEM hNewItem = TreeList_AddItem(
GetDlgItem( m_hwnd, IDC_TREE_DISCO), NULL,
pNode->GetName() ? pNode->GetName() : pNode->GetJid(),
@@ -1413,12 +1413,12 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
case SD_ACT_BOOKMARK:
{
- JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid());
if ( item == NULL ) {
- item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid() );
+ item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid());
if ( item == NULL ) {
- item = ListAdd( LIST_ROOM, pNode->GetJid() );
- item->name = mir_tstrdup( pNode->GetName() );
+ item = ListAdd( LIST_ROOM, pNode->GetJid());
+ item->name = mir_tstrdup( pNode->GetName());
}
if ( item != NULL ) {
item->type = _T("conference");
@@ -1429,10 +1429,10 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
case SD_ACT_USERMENU:
{
- HANDLE hContact = HContactFromJID( pNode->GetJid() );
+ HANDLE hContact = HContactFromJID( pNode->GetJid());
if ( !hContact ) {
hContact = DBCreateContact( pNode->GetJid(), pNode->GetName(), TRUE, FALSE );
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
}
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
@@ -1453,7 +1453,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
hContact = ( HANDLE )CallProtoService( m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, ( LPARAM )&jsr );
}
if ( ListGetItemPtr( LIST_VCARD_TEMP, pNode->GetJid()) == NULL ) {
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
if ( item->resource == NULL )
ListAddResource( LIST_VCARD_TEMP, jid, ID_STATUS_OFFLINE, NULL, 0);
@@ -1466,7 +1466,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
{
HANDLE hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
DBDeleteContactSetting( hContact, "CList", "NotOnList" );
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
break;
}
@@ -1477,7 +1477,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
break;
case SD_ACT_UNREGISTER:
- m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), pNode->GetJid() ) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
+ m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), pNode->GetJid()) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext()) << XQUERY( _T(JABBER_FEAT_IQ_ROSTER))
<< XCHILD( _T("item")) << XATTR( _T("jid"), pNode->GetJid()) << XATTR( _T("subscription"), _T("remove")));
@@ -1496,7 +1496,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
void CJabberProto::LaunchServiceDiscovery(TCHAR *jid)
{
if ( m_pDlgServiceDiscovery ) {
- SetForegroundWindow( m_pDlgServiceDiscovery->GetHwnd() );
+ SetForegroundWindow( m_pDlgServiceDiscovery->GetHwnd());
if (jid) {
SetDlgItemText( m_pDlgServiceDiscovery->GetHwnd(), IDC_COMBO_JID, jid);
SetDlgItemTextA( m_pDlgServiceDiscovery->GetHwnd(), IDC_COMBO_NODE, "");
diff --git a/protocols/JabberG/jabber_disco.h b/protocols/JabberG/jabber_disco.h
index 372a9b1379..3c34dfab5f 100644
--- a/protocols/JabberG/jabber_disco.h
+++ b/protocols/JabberG/jabber_disco.h
@@ -379,16 +379,16 @@ public:
CJabberSDIdentity *pIdentity = m_pIdentities;
while ( pIdentity ) {
- if ( pIdentity->GetName() )
+ if ( pIdentity->GetName())
mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s (%s: %s, %s: %s)\r\n"),
CHR_BULLET, pIdentity->GetName(),
TranslateT("category"), pIdentity->GetCategory(),
- TranslateT("type"), pIdentity->GetType() );
+ TranslateT("type"), pIdentity->GetType());
else
mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s: %s, %s: %s\r\n"),
CHR_BULLET,
TranslateT("Category"), pIdentity->GetCategory(),
- TranslateT("Type"), pIdentity->GetType() );
+ TranslateT("Type"), pIdentity->GetType());
AppendString( &szBuffer, szTmp );
@@ -402,7 +402,7 @@ public:
CJabberSDFeature *pFeature = m_pFeatures;
while ( pFeature ) {
- mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar() );
+ mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar());
AppendString( &szBuffer, szTmp );
@@ -484,7 +484,7 @@ public:
CJabberSDNode *pTmpNode = NULL;
pNode = m_pPrimaryNodes;
while ( pNode ) {
- if ( pTmpNode = pNode->FindByIqId( nIqId, bInfoId ) )
+ if ( pTmpNode = pNode->FindByIqId( nIqId, bInfoId ))
return pTmpNode;
pNode = pNode->GetNext();
}
diff --git a/protocols/JabberG/jabber_events.cpp b/protocols/JabberG/jabber_events.cpp
index 722f55f6b4..591bff3c96 100644
--- a/protocols/JabberG/jabber_events.cpp
+++ b/protocols/JabberG/jabber_events.cpp
@@ -53,7 +53,7 @@ int CJabberProto::OnContactDeleted( WPARAM wParam, LPARAM )
if ( ListExist( LIST_ROSTER, dbv.ptszVal )) {
if ( !_tcschr( dbv.ptszVal, _T( '@' ))) {
TCHAR szStrippedJid[JABBER_MAX_JID_LEN];
- JabberStripJid( m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid) );
+ JabberStripJid( m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid));
TCHAR *szDog = _tcschr( szStrippedJid, _T('@'));
if ( szDog && _tcsicmp( szDog + 1, dbv.ptszVal ))
m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), dbv.ptszVal ) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
diff --git a/protocols/JabberG/jabber_form.cpp b/protocols/JabberG/jabber_form.cpp
index 64fe2ea5cd..797001e630 100644
--- a/protocols/JabberG/jabber_form.cpp
+++ b/protocols/JabberG/jabber_form.cpp
@@ -471,7 +471,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
TCHAR *labelStr, *valueStr, *p;
RECT frameRect;
- if ( xNode==NULL || xmlGetName( xNode )==NULL || lstrcmp( xmlGetName( xNode ), _T("x") ) || hwndStatic==NULL ) return;
+ if ( xNode==NULL || xmlGetName( xNode )==NULL || lstrcmp( xmlGetName( xNode ), _T("x")) || hwndStatic==NULL ) return;
GetClientRect( hwndStatic, &frameRect );
@@ -490,7 +490,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("field"))) {
varStr = xmlGetAttrValue( n, _T("var"));
if (( typeName = xmlGetAttrValue( n, _T("type"))) != NULL ) {
@@ -514,8 +514,8 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
v = xmlGetChild( n ,j);
if ( !v )
break;
- if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ) )
- size += _tcslen( xmlGetText( v ) ) + 2;
+ if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ))
+ size += _tcslen( xmlGetText( v )) + 2;
}
valueStr = ( TCHAR* )mir_alloc( sizeof(TCHAR)*size );
valueStr[0] = '\0';
@@ -523,10 +523,10 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
v = xmlGetChild( n ,j);
if ( !v )
break;
- if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ) ) {
+ if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v )) {
if ( valueStr[0] )
_tcscat( valueStr, _T("\r\n"));
- _tcscat( valueStr, xmlGetText( v ) );
+ _tcscat( valueStr, xmlGetText( v ));
} }
}
} else
@@ -546,12 +546,12 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !o )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str = xmlGetAttrValue( o, _T("label"))) == NULL )
str = xmlGetText( v );
if (( p = mir_tstrdup( str )) != NULL ) {
bool selected = false;
- if ( valueText != NULL && !_tcscmp( valueText, xmlGetText( v ) ))
+ if ( valueText != NULL && !_tcscmp( valueText, xmlGetText( v )))
selected = true;
JabberFormAddListItem(item, p, selected);
mir_free( p );
@@ -564,7 +564,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !o )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str = xmlGetAttrValue( o, _T("label"))) == NULL )
str = xmlGetText( v );
if (( p = mir_tstrdup( str )) != NULL ) {
@@ -573,7 +573,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
vs = xmlGetChild( n ,k);
if ( !vs )
break;
- if ( !lstrcmp( xmlGetName( vs ), _T("value")) && xmlGetText( vs ) && !_tcscmp( xmlGetText( vs ), xmlGetText( v ) ))
+ if ( !lstrcmp( xmlGetName( vs ), _T("value")) && xmlGetText( vs ) && !_tcscmp( xmlGetText( vs ), xmlGetText( v )))
{
selected = true;
break;
@@ -661,7 +661,7 @@ HXML JabberFormGetData( HWND hwndStatic, HXML xNode )
break;
if ( !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str2 = xmlGetAttrValue( o, _T("label"))) == NULL )
str2 = xmlGetText( v );
if ( !lstrcmp( str2, str ))
@@ -688,12 +688,12 @@ HXML JabberFormGetData( HWND hwndStatic, HXML xNode )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( labelText = xmlGetAttrValue( o, _T("label"))) == NULL )
labelText = xmlGetText( v );
if ( !lstrcmp( labelText, str ))
- field << XCHILD( _T("value"), xmlGetText( v ) );
+ field << XCHILD( _T("value"), xmlGetText( v ));
} } }
mir_free( str );
} } }
@@ -748,16 +748,16 @@ static INT_PTR CALLBACK JabberFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
if ( jfi != NULL ) {
// Set dialog title
if ( jfi->xNode!=NULL && ( n = xmlGetChild( jfi->xNode , "title" )) != NULL && xmlGetText( n ) != NULL )
- SetWindowText( hwndDlg, xmlGetText( n ) );
+ SetWindowText( hwndDlg, xmlGetText( n ));
else if ( jfi->defTitle != NULL )
SetWindowText( hwndDlg, TranslateTS( jfi->defTitle ));
// Set instruction field
if ( jfi->xNode!=NULL && ( n = xmlGetChild( jfi->xNode , "instructions" )) != NULL && xmlGetText( n ) != NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else
{
if ( jfi->xNode != NULL && ( n = xmlGetChild( jfi->xNode , "title" )) != NULL && xmlGetText( n ) != NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else if ( jfi->defTitle != NULL )
JabberFormSetInstruction( hwndDlg, TranslateTS( jfi->defTitle ));
}
diff --git a/protocols/JabberG/jabber_ft.cpp b/protocols/JabberG/jabber_ft.cpp
index 4f1450cf17..dda0a69455 100644
--- a/protocols/JabberG/jabber_ft.cpp
+++ b/protocols/JabberG/jabber_ft.cpp
@@ -333,7 +333,7 @@ void CJabberProto::FtHandleSiRequest( HXML iqNode )
break;
if ( !lstrcmp( xmlGetName( optionNode ), _T("option"))) {
- if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n ) ) {
+ if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n )) {
if ( !_tcscmp( xmlGetText( n ), _T(JABBER_FEAT_BYTESTREAMS))) {
ftType = FT_BYTESTREAM;
break;
@@ -347,7 +347,7 @@ void CJabberProto::FtHandleSiRequest( HXML iqNode )
break;
if ( !lstrcmp( xmlGetName( optionNode ), _T("option"))) {
- if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n ) ) {
+ if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n )) {
if ( !_tcscmp( xmlGetText( n ), _T(JABBER_FEAT_IBB))) {
ftType = FT_IBB;
break;
diff --git a/protocols/JabberG/jabber_groupchat.cpp b/protocols/JabberG/jabber_groupchat.cpp
index de458a46e9..8fef909be5 100644
--- a/protocols/JabberG/jabber_groupchat.cpp
+++ b/protocols/JabberG/jabber_groupchat.cpp
@@ -331,7 +331,7 @@ void CJabberProto::GroupchatJoinRoom( const TCHAR* server, const TCHAR* room, co
TCHAR lasteventdate[40];
mir_sntprintf(lasteventdate, SIZEOF(lasteventdate), _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
time->tm_year+1900, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec);
- x << XCHILD( _T("history") ) << XATTR( _T("since"), lasteventdate);
+ x << XCHILD( _T("history")) << XATTR( _T("since"), lasteventdate);
}
}
@@ -562,7 +562,7 @@ void CJabberDlgGcJoin::OnInitDialog()
{
mir_sntprintf(jid, SIZEOF(jid), _T("%s@%s (%s)"),
info.room, info.server,
- info.nick ? info.nick : TranslateT("<no nick>") );
+ info.nick ? info.nick : TranslateT("<no nick>"));
SetDlgItemText(m_hwnd, IDC_RECENT1+i, jid);
} else
{
@@ -1002,7 +1002,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
char priority = 0;
if (( priorityNode = xmlGetChild( node , "priority" )) != NULL && xmlGetText( priorityNode ) != NULL )
- priority = (char)_ttoi( xmlGetText( priorityNode ) );
+ priority = (char)_ttoi( xmlGetText( priorityNode ));
if (JABBER_RESOURCE_STATUS *oldRes = ListFindResource(LIST_CHATROOM, from))
if ((oldRes->status != status) || lstrcmp_null(oldRes->statusMessage, str))
@@ -1037,7 +1037,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
else role = ROLE_NONE;
}
- if ( (role != ROLE_NONE) && (JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role)) ) {
+ if ( (role != ROLE_NONE) && (JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role))) {
GcLogUpdateMemberStatus( item, resource, nick, NULL, GC_EVENT_REMOVESTATUS, NULL );
if (!newRes) newRes = GC_EVENT_ADDSTATUS;
}
@@ -1087,7 +1087,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
if ( roomCreated ||
(( n = xmlGetChild( node , "created" ))!=NULL &&
( str = xmlGetAttrValue( n, _T("xmlns")))!=NULL &&
- !_tcscmp( str, _T("http://jabber.org/protocol/muc#owner"))) ) {
+ !_tcscmp( str, _T("http://jabber.org/protocol/muc#owner")))) {
// A new room just created by me
// Request room config
int iqId = SerialNext();
@@ -1309,7 +1309,7 @@ public:
CSuper::OnInitDialog();
TCHAR buf[256];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_info->roomJid, TranslateT("Incoming groupchat invitation.") );
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_info->roomJid, TranslateT("Incoming groupchat invitation."));
SetDlgItemText( m_hwnd, IDC_HEADERBAR, buf );
SetDlgItemText( m_hwnd, IDC_FROM, m_info->from );
diff --git a/protocols/JabberG/jabber_icolib.cpp b/protocols/JabberG/jabber_icolib.cpp
index 9fab1d07e9..c85198a59c 100644
--- a/protocols/JabberG/jabber_icolib.cpp
+++ b/protocols/JabberG/jabber_icolib.cpp
@@ -267,7 +267,7 @@ void CJabberProto::IconsInit( void )
m_phIconLibItems = ( HANDLE* )mir_alloc( sizeof( HANDLE )*SIZEOF(iconList));
- mir_sntprintf( szRootSection, SIZEOF(szRootSection), _T("%s/%s/%s"), LPGENT("Protocols"), LPGENT("Jabber"), LPGENT("Accounts") );
+ mir_sntprintf( szRootSection, SIZEOF(szRootSection), _T("%s/%s/%s"), LPGENT("Protocols"), LPGENT("Jabber"), LPGENT("Accounts"));
for (i = 0; i < SIZEOF(iconList); i++ ) {
TCHAR tmp[100];
@@ -578,7 +578,7 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR* jid, HANDLE hContact
if ( m_lstTransports.getIndex( domain ) == -1 ) {
if ( isAgent ) {
- m_lstTransports.insert( mir_tstrdup(domain) );
+ m_lstTransports.insert( mir_tstrdup(domain));
JSetByte( hContact, "IsTransport", 1 );
} }
@@ -673,7 +673,7 @@ static void sttProcessIcons( int iAmount )
sid.pszDefaultFile = szFile;
char szRootSection[100];
- mir_snprintf( szRootSection, SIZEOF(szRootSection), "%s/%s", LPGEN("Protocols"), LPGEN("Jabber") );
+ mir_snprintf( szRootSection, SIZEOF(szRootSection), "%s/%s", LPGEN("Protocols"), LPGEN("Jabber"));
for ( int i = 0; i < iAmount; i++ ) {
char szSettingName[100], szSectionName[100];
diff --git a/protocols/JabberG/jabber_iq.cpp b/protocols/JabberG/jabber_iq.cpp
index db2a014b50..4f5a0cd049 100644
--- a/protocols/JabberG/jabber_iq.cpp
+++ b/protocols/JabberG/jabber_iq.cpp
@@ -235,7 +235,7 @@ void CJabberIqManager::ExpireInfo( CJabberIqInfo* pInfo, void*)
if (( pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT ) && ( pInfo->m_szFrom ))
pInfo->m_hContact = ppro->HContactFromJID( pInfo->m_szFrom , 3);
- ppro->Log( "Expiring iq id %d, sent to " TCHAR_STR_PARAM, pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server") );
+ ppro->Log( "Expiring iq id %d, sent to " TCHAR_STR_PARAM, pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL;
(ppro->*(pInfo->m_pHandler))( NULL, pInfo );
@@ -339,7 +339,7 @@ BOOL CJabberIqManager::HandleIqPermanent( HXML pNode )
if ( pInfo->m_nIqTypes & iqInfo.m_nIqType )
{
HXML pFirstChild = xmlGetChild( pNode , 0 );
- if ( !pFirstChild || !xmlGetName( pFirstChild ) )
+ if ( !pFirstChild || !xmlGetName( pFirstChild ))
break;
const TCHAR *szTagName = xmlGetName( pFirstChild );
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index ca1a69ad44..eb54b8fc6d 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -90,7 +90,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- if ( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) )
+ if ( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)))
return FALSE;
// Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
@@ -190,7 +190,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 )
{
- if ( GetSystemMetrics(SM_SERVERR2) )
+ if ( GetSystemMetrics(SM_SERVERR2))
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Server 2003 R2, "));
else if ( osvi.wSuiteMask==VER_SUITE_STORAGE_SERVER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Storage Server 2003"));
@@ -268,7 +268,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( _tcslen(osvi.szCSDVersion) > 0 )
{
- StringCchCat(pszOS, BUFSIZE, TEXT(" ") );
+ StringCchCat(pszOS, BUFSIZE, TEXT(" "));
StringCchCat(pszOS, BUFSIZE, osvi.szCSDVersion);
}
@@ -288,7 +288,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetFrom() )
+ if ( !pInfo->GetFrom())
return TRUE;
if ( !m_options.AllowVersionRequests )
@@ -296,8 +296,8 @@ BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
XmlNodeIq iq( _T("result"), pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_VERSION));
- query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)") );
- query << XCHILD( _T("version"), _T(__VERSION_STRING) );
+ query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)"));
+ query << XCHILD( _T("version"), _T(__VERSION_STRING));
if ( m_options.ShowOSVersion )
{
@@ -391,7 +391,7 @@ BOOL CJabberProto::OnIqProcessIqOldTime( HXML, CJabberIqInfo *pInfo )
dtime[ 24 ] = 0;
XmlNodeIq iq( _T("result"), pInfo );
- HXML queryNode = iq << XQUERY( _T(JABBER_FEAT_ENTITY_TIME_OLD) );
+ HXML queryNode = iq << XQUERY( _T(JABBER_FEAT_ENTITY_TIME_OLD));
queryNode << XCHILD( _T("utc"), stime );
LPCTSTR szTZName = tmi.getTzName( NULL );
if ( szTZName )
@@ -464,8 +464,8 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
HXML queryNode = pInfo->GetChildNode();
// RFC 3921 #7.2 Business Rules
- if ( pInfo->GetFrom() ) {
- TCHAR* szFrom = JabberPrepareJid( pInfo->GetFrom() );
+ if ( pInfo->GetFrom()) {
+ TCHAR* szFrom = JabberPrepareJid( pInfo->GetFrom());
if ( !szFrom )
return TRUE;
@@ -475,10 +475,10 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
return TRUE;
}
- TCHAR* pDelimiter = _tcschr( szFrom, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szFrom, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
- pDelimiter = _tcschr( szTo, _T('/') );
+ pDelimiter = _tcschr( szTo, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
BOOL bRetVal = _tcscmp( szFrom, szTo ) == 0;
@@ -488,7 +488,7 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
// invalid JID
if ( !bRetVal ) {
- Log( "<iq/> attempt to hack via roster push from " TCHAR_STR_PARAM, pInfo->GetFrom() );
+ Log( "<iq/> attempt to hack via roster push from " TCHAR_STR_PARAM, pInfo->GetFrom());
return TRUE;
}
}
@@ -586,7 +586,7 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
{
- if ( !pInfo->GetFrom() || !pInfo->GetHContact() )
+ if ( !pInfo->GetFrom() || !pInfo->GetHContact())
return TRUE;
HXML n = xmlGetChild( pInfo->GetChildNode(), "url" );
@@ -607,7 +607,7 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
str = ( TCHAR* )xmlGetText( n ); // URL of the file to get
filetransfer* ft = new filetransfer( this );
ft->std.totalFiles = 1;
- ft->jid = mir_tstrdup( pInfo->GetFrom() );
+ ft->jid = mir_tstrdup( pInfo->GetFrom());
ft->std.hContact = pInfo->GetHContact();
ft->type = FT_OOB;
ft->httpHostName = NULL;
@@ -628,8 +628,8 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
ft->httpHostName = mir_t2a( text );
} } }
- if ( pInfo->GetIdStr() )
- ft->iqId = mir_tstrdup( pInfo->GetIdStr() );
+ if ( pInfo->GetIdStr())
+ ft->iqId = mir_tstrdup( pInfo->GetIdStr());
if ( ft->httpHostName && ft->httpPath ) {
TCHAR* desc = NULL;
@@ -671,7 +671,7 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
BOOL CJabberProto::OnHandleDiscoInfoRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
const TCHAR* szNode = xmlGetAttrValue( pInfo->GetChildNode(), _T("node"));
@@ -693,7 +693,7 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest( HXML iqNode, CJabberIqInfo* pInfo )
BOOL CJabberProto::OnHandleDiscoItemsRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
// ad-hoc commands check:
@@ -737,7 +737,7 @@ BOOL CJabberProto::OnIqHttpAuth( HXML node, CJabberIqInfo* pInfo )
if ( !m_options.AcceptHttpAuth )
return TRUE;
- if ( !node || !pInfo->GetChildNode() || !pInfo->GetFrom() || !pInfo->GetIdStr() )
+ if ( !node || !pInfo->GetChildNode() || !pInfo->GetFrom() || !pInfo->GetIdStr())
return TRUE;
HXML pConfirm = xmlGetChild( node , "confirm" );
@@ -756,7 +756,7 @@ BOOL CJabberProto::OnIqHttpAuth( HXML node, CJabberIqInfo* pInfo )
return TRUE;
ZeroMemory( pParams, sizeof( CJabberHttpAuthParams ));
pParams->m_nType = CJabberHttpAuthParams::IQ;
- pParams->m_szFrom = mir_tstrdup( pInfo->GetFrom() );
+ pParams->m_szFrom = mir_tstrdup( pInfo->GetFrom());
pParams->m_szId = mir_tstrdup( szId );
pParams->m_szMethod = mir_tstrdup( szMethod );
pParams->m_szUrl = mir_tstrdup( szUrl );
diff --git a/protocols/JabberG/jabber_iqid.cpp b/protocols/JabberG/jabber_iqid.cpp
index 72ddcf6d4c..06939c21bf 100644
--- a/protocols/JabberG/jabber_iqid.cpp
+++ b/protocols/JabberG/jabber_iqid.cpp
@@ -43,7 +43,7 @@ void CJabberProto::OnIqResultServerDiscoInfo( HXML iqNode )
int i;
if ( !_tcscmp( type, _T("result"))) {
- HXML query = xmlGetChildByTag( iqNode, "query", "xmlns", _T(JABBER_FEAT_DISCO_INFO) );
+ HXML query = xmlGetChildByTag( iqNode, "query", "xmlns", _T(JABBER_FEAT_DISCO_INFO));
if ( !query )
return;
@@ -52,7 +52,7 @@ void CJabberProto::OnIqResultServerDiscoInfo( HXML iqNode )
const TCHAR *identityCategory = xmlGetAttrValue( identity, _T("category"));
const TCHAR *identityType = xmlGetAttrValue( identity, _T("type"));
const TCHAR *identityName = xmlGetAttrValue( identity, _T("name"));
- if ( identityCategory && identityType && !_tcscmp( identityCategory, _T("pubsub") ) && !_tcscmp( identityType, _T("pep")) ) {
+ if ( identityCategory && identityType && !_tcscmp( identityCategory, _T("pubsub")) && !_tcscmp( identityType, _T("pep"))) {
m_bPepSupported = TRUE;
EnableMenuItems( TRUE );
@@ -92,7 +92,7 @@ void CJabberProto::OnIqResultNestedRosterGroups( HXML iqNode, CJabberIqInfo* pIn
if ( iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT ) {
bPrivateStorageSupport = TRUE;
- szGroupDelimeter = XPathFmt( iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), _T(JABBER_FEAT_PRIVATE_STORAGE), _T( JABBER_FEAT_NESTED_ROSTER_GROUPS ) );
+ szGroupDelimeter = XPathFmt( iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), _T(JABBER_FEAT_PRIVATE_STORAGE), _T( JABBER_FEAT_NESTED_ROSTER_GROUPS ));
if ( szGroupDelimeter && !szGroupDelimeter[0] )
szGroupDelimeter = NULL; // "" as roster delimeter is not supported :)
}
@@ -102,13 +102,13 @@ void CJabberProto::OnIqResultNestedRosterGroups( HXML iqNode, CJabberIqInfo* pIn
return;
// is our default delimiter?
- if (( !szGroupDelimeter && bPrivateStorageSupport ) || ( szGroupDelimeter && _tcscmp( szGroupDelimeter, _T("\\") )))
+ if (( !szGroupDelimeter && bPrivateStorageSupport ) || ( szGroupDelimeter && _tcscmp( szGroupDelimeter, _T("\\"))))
m_ThreadInfo->send(
XmlNodeIq( _T("set"), SerialNext()) << XQUERY( _T(JABBER_FEAT_PRIVATE_STORAGE))
<< XCHILD( _T("roster"), _T("\\")) << XATTR( _T("xmlns"), _T(JABBER_FEAT_NESTED_ROSTER_GROUPS)));
// roster request
- TCHAR *szUserData = mir_tstrdup( szGroupDelimeter ? szGroupDelimeter : _T("\\") );
+ TCHAR *szUserData = mir_tstrdup( szGroupDelimeter ? szGroupDelimeter : _T("\\"));
m_ThreadInfo->send(
XmlNodeIq( m_iqManager.AddHandler( &CJabberProto::OnIqResultGetRoster, JABBER_IQ_TYPE_GET, NULL, 0, -1, (void *)szUserData ))
<< XCHILDNS( _T("query"), _T(JABBER_FEAT_IQ_ROSTER)));
@@ -418,7 +418,7 @@ void CJabberProto::OnIqResultGetRoster( HXML iqNode, CJabberIqInfo* pInfo )
if ( _tcschr( jid, '@' ) == NULL )
bIsTransport = TRUE;
- if (( name = xmlGetAttrValue( itemNode, _T("name") )) != NULL )
+ if (( name = xmlGetAttrValue( itemNode, _T("name"))) != NULL )
nick = mir_tstrdup( name );
else
nick = JabberNickFromJID( jid );
@@ -815,13 +815,13 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( !_tcscmp( xmlGetName( n ), _T("FN"))) {
if ( xmlGetText( n ) != NULL ) {
hasFn = TRUE;
- JSetStringT( hContact, "FullName", xmlGetText( n ) );
+ JSetStringT( hContact, "FullName", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("NICKNAME"))) {
if ( xmlGetText( n ) != NULL ) {
hasNick = TRUE;
- JSetStringT( hContact, "Nick", xmlGetText( n ) );
+ JSetStringT( hContact, "Nick", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("N"))) {
@@ -829,15 +829,15 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( !hasGiven && !hasFamily && !hasMiddle ) {
if (( m=xmlGetChild( n , "GIVEN" )) != NULL && xmlGetText( m )!=NULL ) {
hasGiven = TRUE;
- JSetStringT( hContact, "FirstName", xmlGetText( m ) );
+ JSetStringT( hContact, "FirstName", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "FAMILY" )) != NULL && xmlGetText( m )!=NULL ) {
hasFamily = TRUE;
- JSetStringT( hContact, "LastName", xmlGetText( m ) );
+ JSetStringT( hContact, "LastName", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "MIDDLE" )) != NULL && xmlGetText( m ) != NULL ) {
hasMiddle = TRUE;
- JSetStringT( hContact, "MiddleName", xmlGetText( m ) );
+ JSetStringT( hContact, "MiddleName", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("EMAIL"))) {
@@ -853,7 +853,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
sprintf( text, "e-mail%d", nEmail-1 );
}
else sprintf( text, "e-mail%d", nEmail );
- JSetStringT( hContact, text, xmlGetText( m ) );
+ JSetStringT( hContact, text, xmlGetText( m ));
if ( hContact == NULL ) {
sprintf( text, "e-mailFlag%d", nEmail );
@@ -888,7 +888,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
}
else {
hasBday = TRUE;
- JSetStringT( NULL, "BirthDate", xmlGetText( n ) );
+ JSetStringT( NULL, "BirthDate", xmlGetText( n ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("GENDER"))) {
@@ -902,7 +902,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
}
else {
hasGender = TRUE;
- JSetStringT( NULL, "GenderString", xmlGetText( n ) );
+ JSetStringT( NULL, "GenderString", xmlGetText( n ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("ADR"))) {
@@ -913,40 +913,40 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
hasHomeStreet = TRUE;
if ( hContact != NULL ) {
if (( o=xmlGetChild( n , "EXTADR" )) != NULL && xmlGetText( o ) != NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else if (( o=xmlGetChild( n , "EXTADD" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else
_tcsncpy( text, xmlGetText( m ), SIZEOF( text ));
text[SIZEOF(text)-1] = '\0';
JSetStringT( hContact, "Street", text );
}
else {
- JSetStringT( hContact, "Street", xmlGetText( m ) );
+ JSetStringT( hContact, "Street", xmlGetText( m ));
if (( m=xmlGetChild( n , "EXTADR" )) == NULL )
m = xmlGetChild( n , "EXTADD" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasHomeStreet2 = TRUE;
- JSetStringT( hContact, "Street2", xmlGetText( m ) );
+ JSetStringT( hContact, "Street2", xmlGetText( m ));
} } }
if (( m=xmlGetChild( n , "LOCALITY" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomeLocality = TRUE;
- JSetStringT( hContact, "City", xmlGetText( m ) );
+ JSetStringT( hContact, "City", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "REGION" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomeRegion = TRUE;
- JSetStringT( hContact, "State", xmlGetText( m ) );
+ JSetStringT( hContact, "State", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "PCODE" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomePcode = TRUE;
- JSetStringT( hContact, "ZIP", xmlGetText( m ) );
+ JSetStringT( hContact, "ZIP", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "CTRY" ))==NULL || xmlGetText( m )==NULL ) // Some bad client use <COUNTRY/> instead of <CTRY/>
m = xmlGetChild( n , "COUNTRY" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasHomeCtry = TRUE;
- JSetStringT( hContact, "Country", xmlGetText( m ) );
+ JSetStringT( hContact, "Country", xmlGetText( m ));
} }
if ( !hasWork && xmlGetChild( n , "WORK" )!=NULL ) {
@@ -956,40 +956,40 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
hasWorkStreet = TRUE;
if ( hContact != NULL ) {
if (( o=xmlGetChild( n , "EXTADR" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else if (( o=xmlGetChild( n , "EXTADD" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else
_tcsncpy( text, xmlGetText( m ), SIZEOF( text ));
text[SIZEOF( text )-1] = '\0';
JSetStringT( hContact, "CompanyStreet", text );
}
else {
- JSetStringT( hContact, "CompanyStreet", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyStreet", xmlGetText( m ));
if (( m=xmlGetChild( n , "EXTADR" )) == NULL )
m = xmlGetChild( n , "EXTADD" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasWorkStreet2 = TRUE;
- JSetStringT( hContact, "CompanyStreet2", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyStreet2", xmlGetText( m ));
} } }
if (( m=xmlGetChild( n , "LOCALITY" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkLocality = TRUE;
- JSetStringT( hContact, "CompanyCity", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyCity", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "REGION" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkRegion = TRUE;
- JSetStringT( hContact, "CompanyState", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyState", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "PCODE" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkPcode = TRUE;
- JSetStringT( hContact, "CompanyZIP", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyZIP", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "CTRY" ))==NULL || xmlGetText( m )==NULL ) // Some bad client use <COUNTRY/> instead of <CTRY/>
m = xmlGetChild( n , "COUNTRY" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasWorkCtry = TRUE;
- JSetStringT( hContact, "CompanyCountry", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyCountry", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("TEL"))) {
@@ -998,11 +998,11 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( hContact != NULL ) {
if ( !hasFax && xmlGetChild( n , "FAX" )!=NULL ) {
hasFax = TRUE;
- JSetStringT( hContact, "Fax", xmlGetText( m ) );
+ JSetStringT( hContact, "Fax", xmlGetText( m ));
}
if ( !hasCell && xmlGetChild( n , "CELL" )!=NULL ) {
hasCell = TRUE;
- JSetStringT( hContact, "Cellular", xmlGetText( m ) );
+ JSetStringT( hContact, "Cellular", xmlGetText( m ));
}
if ( !hasPhone &&
( xmlGetChild( n , "HOME" )!=NULL ||
@@ -1016,15 +1016,15 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
xmlGetChild( n , "BBS" )==NULL &&
xmlGetChild( n , "MODEM" )==NULL &&
xmlGetChild( n , "ISDN" )==NULL &&
- xmlGetChild( n , "PCS" )==NULL )) ) {
+ xmlGetChild( n , "PCS" )==NULL ))) {
hasPhone = TRUE;
- JSetStringT( hContact, "Phone", xmlGetText( m ) );
+ JSetStringT( hContact, "Phone", xmlGetText( m ));
}
}
else {
char text[ 100 ];
sprintf( text, "Phone%d", nPhone );
- JSetStringT( NULL, text, xmlGetText( m ) );
+ JSetStringT( NULL, text, xmlGetText( m ));
sprintf( text, "PhoneFlag%d", nPhone );
int nFlag = 0;
@@ -1048,36 +1048,36 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
// Homepage
if ( !hasUrl && xmlGetText( n )!=NULL ) {
hasUrl = TRUE;
- JSetStringT( hContact, "Homepage", xmlGetText( n ) );
+ JSetStringT( hContact, "Homepage", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("ORG"))) {
if ( !hasOrgname && !hasOrgunit ) {
if (( m=xmlGetChild( n ,"ORGNAME" ))!=NULL && xmlGetText( m )!=NULL ) {
hasOrgname = TRUE;
- JSetStringT( hContact, "Company", xmlGetText( m ) );
+ JSetStringT( hContact, "Company", xmlGetText( m ));
}
if (( m=xmlGetChild( n ,"ORGUNIT" ))!=NULL && xmlGetText( m )!=NULL ) { // The real vCard can have multiple <ORGUNIT/> but we will only display the first one
hasOrgunit = TRUE;
- JSetStringT( hContact, "CompanyDepartment", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyDepartment", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("ROLE"))) {
if ( !hasRole && xmlGetText( n )!=NULL ) {
hasRole = TRUE;
- JSetStringT( hContact, "Role", xmlGetText( n ) );
+ JSetStringT( hContact, "Role", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("TITLE"))) {
if ( !hasTitle && xmlGetText( n )!=NULL ) {
hasTitle = TRUE;
- JSetStringT( hContact, "CompanyPosition", xmlGetText( n ) );
+ JSetStringT( hContact, "CompanyPosition", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("DESC"))) {
if ( !hasDesc && xmlGetText( n )!=NULL ) {
hasDesc = TRUE;
- TCHAR* szMemo = JabberUnixToDosT( xmlGetText( n ) );
+ TCHAR* szMemo = JabberUnixToDosT( xmlGetText( n ));
JSetStringT( hContact, "About", szMemo );
mir_free( szMemo );
}
@@ -1223,7 +1223,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
void CJabberProto::OnIqResultSetVcard( HXML iqNode )
{
Log( "<iq/> iqIdSetVcard" );
- if ( !xmlGetAttrValue( iqNode, _T("type") ))
+ if ( !xmlGetAttrValue( iqNode, _T("type")))
return;
WindowNotify(WM_JABBER_REFRESH_VCARD);
@@ -1393,7 +1393,7 @@ void CJabberProto::OnIqResultGetVCardAvatar( HXML iqNode )
if ( xmlGetChildCount( vCard ) == 0 ) {
JDeleteSetting( hContact, "AvatarHash" );
DBVARIANT dbv = {0};
- if ( !JGetStringT( hContact, "AvatarSaved", &dbv ) ) {
+ if ( !JGetStringT( hContact, "AvatarSaved", &dbv )) {
JFreeVariant( &dbv );
JDeleteSetting( hContact, "AvatarSaved" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL );
@@ -1427,7 +1427,7 @@ void CJabberProto::OnIqResultGetClientAvatar( HXML iqNode )
return;
HXML n = NULL;
- if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result")) ) {
+ if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result"))) {
HXML queryNode = xmlGetChild( iqNode , "query" );
if ( queryNode != NULL ) {
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T("xmlns"));
@@ -1475,11 +1475,11 @@ void CJabberProto::OnIqResultGetServerAvatar( HXML iqNode )
return;
HXML n = NULL;
- if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result")) ) {
+ if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result"))) {
HXML queryNode = xmlGetChild( iqNode , "query" );
if ( queryNode != NULL ) {
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T("xmlns"));
- if ( !lstrcmp( xmlns, _T(JABBER_FEAT_SERVER_AVATAR)) ) {
+ if ( !lstrcmp( xmlns, _T(JABBER_FEAT_SERVER_AVATAR))) {
n = xmlGetChild( queryNode , "data" );
}
}
@@ -1553,7 +1553,7 @@ LBL_ErrFormat:
sprintf( buffer+( i<<1 ), "%02x", digest[i] );
GetAvatarFileName( hContact, tszFileName, SIZEOF(tszFileName));
- _tcsncpy( AI.filename, tszFileName, SIZEOF(AI.filename) );
+ _tcsncpy( AI.filename, tszFileName, SIZEOF(AI.filename));
FILE* out = _tfopen( tszFileName, _T("wb"));
if ( out != NULL ) {
@@ -1593,7 +1593,7 @@ void CJabberProto::OnIqResultDiscoBookmarks( HXML iqNode )
HXML itemNode;
for ( int i = 0; itemNode = xmlGetChild( storageNode, i ); i++ ) {
if ( name = xmlGetName( itemNode)) {
- if ( !_tcscmp( name, _T("conference") ) && (jid = xmlGetAttrValue( itemNode, _T("jid") ))) {
+ if ( !_tcscmp( name, _T("conference")) && (jid = xmlGetAttrValue( itemNode, _T("jid")))) {
JABBER_LIST_ITEM* item = ListAdd( LIST_BOOKMARK, jid );
item->name = mir_tstrdup( xmlGetAttrValue( itemNode, _T("name")));
item->type = mir_tstrdup( _T( "conference" ));
@@ -1609,7 +1609,7 @@ void CJabberProto::OnIqResultDiscoBookmarks( HXML iqNode )
JABBER_LIST_ITEM* item = ListAdd( LIST_BOOKMARK, jid );
item->bUseResource = TRUE;
item->name = mir_tstrdup( xmlGetAttrValue( itemNode, _T("name")));
- item->type = mir_tstrdup( _T("url") );
+ item->type = mir_tstrdup( _T("url"));
}
}
}
diff --git a/protocols/JabberG/jabber_list.cpp b/protocols/JabberG/jabber_list.cpp
index 2397e0bd73..155f9e2b60 100644
--- a/protocols/JabberG/jabber_list.cpp
+++ b/protocols/JabberG/jabber_list.cpp
@@ -147,7 +147,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd( JABBER_LIST list, const TCHAR* jid )
if ( !bUseResource && list== LIST_ROSTER )
{
//if it is a chat room keep resource and made it resource sensitive
- if ( ChatRoomHContactFromJID( s ) )
+ if ( ChatRoomHContactFromJID( s ))
{
if (q != NULL) *q='/';
bUseResource=TRUE;
@@ -192,7 +192,7 @@ void CJabberProto::ListRemoveList( JABBER_LIST list )
void CJabberProto::ListRemoveByIndex( int index )
{
EnterCriticalSection( &m_csLists );
- if ( index >= 0 && index < m_lstRoster.getCount() ) {
+ if ( index >= 0 && index < m_lstRoster.getCount()) {
JabberListFreeItemInternal( m_lstRoster[index] );
m_lstRoster.remove( index );
}
@@ -457,7 +457,7 @@ JABBER_LIST_ITEM *CJabberProto::ListGetItemPtr( JABBER_LIST list, const TCHAR* j
JABBER_LIST_ITEM *CJabberProto::ListGetItemPtrFromIndex( int index )
{
EnterCriticalSection( &m_csLists );
- if ( index >= 0 && index < m_lstRoster.getCount() ) {
+ if ( index >= 0 && index < m_lstRoster.getCount()) {
LeaveCriticalSection( &m_csLists );
return m_lstRoster[index];
}
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp
index e544102dec..b489a793d8 100644
--- a/protocols/JabberG/jabber_menu.cpp
+++ b/protocols/JabberG/jabber_menu.cpp
@@ -459,7 +459,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM )
int nMenuResourceItemsNew = m_nMenuResourceItems;
if ( m_nMenuResourceItems < item->resourceCount ) {
- m_phMenuResourceItems = (HANDLE *)mir_realloc( m_phMenuResourceItems, item->resourceCount * sizeof(HANDLE) );
+ m_phMenuResourceItems = (HANDLE *)mir_realloc( m_phMenuResourceItems, item->resourceCount * sizeof(HANDLE));
nMenuResourceItemsNew = item->resourceCount;
}
@@ -553,11 +553,11 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd( WPARAM wParam, LPARAM )
if ( ListGetItemPtr( LIST_ROSTER, roomID ) == NULL ) {
TCHAR *nick = 0;
TCHAR *group = 0;
- if ( !DBGetContactSettingTString( ( HANDLE ) wParam, "CList", "Group", &dbv ) ) {
+ if ( !DBGetContactSettingTString( ( HANDLE ) wParam, "CList", "Group", &dbv )) {
group = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
- if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv )) {
nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -572,7 +572,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd( WPARAM wParam, LPARAM )
ZeroMemory( item, sizeof( JABBER_LIST_ITEM ));
item->jid = mir_tstrdup(roomID);
item->name = mir_tstrdup(nick);
- if ( !JGetStringT( ( HANDLE ) wParam, "MyNick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "MyNick", &dbv )) {
item->nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -675,7 +675,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM )
JFreeVariant( &dbv );
if ( ListGetItemPtr( LIST_BOOKMARK, roomID ) == NULL ) {
TCHAR *nick = 0;
- if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv )) {
nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -686,7 +686,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM )
item->jid = mir_tstrdup(roomID);
item->name = ( TCHAR* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR );
item->type = _T("conference");
- if ( !JGetStringT(( HANDLE ) wParam, "MyNick", &dbv ) ) {
+ if ( !JGetStringT(( HANDLE ) wParam, "MyNick", &dbv )) {
item->nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
diff --git a/protocols/JabberG/jabber_message_handlers.cpp b/protocols/JabberG/jabber_message_handlers.cpp
index 2339a8157c..d17e2b131d 100644
--- a/protocols/JabberG/jabber_message_handlers.cpp
+++ b/protocols/JabberG/jabber_message_handlers.cpp
@@ -33,11 +33,11 @@ BOOL CJabberProto::OnMessageError( HXML node, ThreadData *pThreadData, CJabberMe
{
// we check if is message delivery failure
int id = JabberGetPacketID( node );
- JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_ROSTER, pInfo->GetFrom() );
+ JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_ROSTER, pInfo->GetFrom());
if ( item == NULL )
- item = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom() );
+ item = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom());
if ( item != NULL ) { // yes, it is
- TCHAR *szErrText = JabberErrorMsg( pInfo->GetChildNode() );
+ TCHAR *szErrText = JabberErrorMsg( pInfo->GetChildNode());
if ( id != -1 ) {
char *errText = mir_t2a(szErrText);
JSendBroadcast( pInfo->GetHContact(), ACKTYPE_MESSAGE, ACKRESULT_FAILED, ( HANDLE ) id, (LPARAM)errText );
@@ -62,8 +62,8 @@ BOOL CJabberProto::OnMessageIbb( HXML node, ThreadData *pThreadData, CJabberMess
BOOL bOk = FALSE;
const TCHAR *sid = xmlGetAttrValue( pInfo->GetChildNode(), _T("sid"));
const TCHAR *seq = xmlGetAttrValue( pInfo->GetChildNode(), _T("seq"));
- if ( sid && seq && xmlGetText( pInfo->GetChildNode() ) ) {
- bOk = OnIbbRecvdData( xmlGetText( pInfo->GetChildNode() ), sid, seq );
+ if ( sid && seq && xmlGetText( pInfo->GetChildNode()) ) {
+ bOk = OnIbbRecvdData( xmlGetText( pInfo->GetChildNode()), sid, seq );
}
return TRUE;
}
@@ -76,7 +76,7 @@ BOOL CJabberProto::OnMessagePubsubEvent( HXML node, ThreadData *pThreadData, CJa
BOOL CJabberProto::OnMessageGroupchat( HXML node, ThreadData *pThreadData, CJabberMessageInfo* pInfo )
{
- JABBER_LIST_ITEM *chatItem = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom() );
+ JABBER_LIST_ITEM *chatItem = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom());
if ( chatItem )
{ // process GC message
GroupchatProcessMessage( node );
diff --git a/protocols/JabberG/jabber_message_manager.cpp b/protocols/JabberG/jabber_message_manager.cpp
index 6a12f42086..b27c59e171 100644
--- a/protocols/JabberG/jabber_message_manager.cpp
+++ b/protocols/JabberG/jabber_message_manager.cpp
@@ -31,9 +31,9 @@ Last change by : $Author: dchervov $
BOOL CJabberMessageManager::FillPermanentHandlers()
{
- AddPermanentHandler( &CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error") );
- AddPermanentHandler( &CJabberProto::OnMessageIbb, 0, 0, _T(JABBER_FEAT_IBB), FALSE, _T("data") );
- AddPermanentHandler( &CJabberProto::OnMessagePubsubEvent, 0, 0, _T(JABBER_FEAT_PUBSUB_EVENT), FALSE, _T("event") );
+ AddPermanentHandler( &CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error"));
+ AddPermanentHandler( &CJabberProto::OnMessageIbb, 0, 0, _T(JABBER_FEAT_IBB), FALSE, _T("data"));
+ AddPermanentHandler( &CJabberProto::OnMessagePubsubEvent, 0, 0, _T(JABBER_FEAT_PUBSUB_EVENT), FALSE, _T("event"));
AddPermanentHandler( &CJabberProto::OnMessageGroupchat, JABBER_MESSAGE_TYPE_GROUPCHAT, JABBER_MESSAGE_PARSE_FROM, NULL, FALSE, NULL );
return TRUE;
}
diff --git a/protocols/JabberG/jabber_misc.cpp b/protocols/JabberG/jabber_misc.cpp
index 972542ea71..09e5d8f0ee 100644
--- a/protocols/JabberG/jabber_misc.cpp
+++ b/protocols/JabberG/jabber_misc.cpp
@@ -66,8 +66,8 @@ int JabberCompareJids( const TCHAR* jid1, const TCHAR* jid2 )
// match only node@domain part
TCHAR szTempJid1[ JABBER_MAX_JID_LEN ], szTempJid2[ JABBER_MAX_JID_LEN ];
return lstrcmpi(
- JabberStripJid( jid1, szTempJid1, SIZEOF(szTempJid1) ),
- JabberStripJid( jid2, szTempJid2, SIZEOF(szTempJid2)) );
+ JabberStripJid( jid1, szTempJid1, SIZEOF(szTempJid1)),
+ JabberStripJid( jid2, szTempJid2, SIZEOF(szTempJid2)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -510,7 +510,7 @@ void CJabberProto::FormatMirVer(JABBER_RESOURCE_STATUS *resource, TCHAR *buf, in
// search through known software list
for (i = 0; i < SIZEOF(sttCapsNodeToName_Map); ++i)
- if ( _tcsstr( resource->szCapsNode, sttCapsNodeToName_Map[i].node ) )
+ if ( _tcsstr( resource->szCapsNode, sttCapsNodeToName_Map[i].node ))
{
mir_sntprintf( buf, bufSize, _T("%s %s"), sttCapsNodeToName_Map[i].name, resource->szCapsVer );
break;
@@ -554,7 +554,7 @@ void CJabberProto::UpdateMirVer(HANDLE hContact, JABBER_RESOURCE_STATUS *resourc
if ( resource->resourceName )
mir_sntprintf( szFullJid, SIZEOF( szFullJid ), _T("%s/%s"), dbv.ptszVal, resource->resourceName );
else
- lstrcpyn( szFullJid, dbv.ptszVal, SIZEOF(szFullJid) );
+ lstrcpyn( szFullJid, dbv.ptszVal, SIZEOF(szFullJid));
JSetStringT( hContact, DBSETTING_DISPLAY_UID, szFullJid );
JFreeVariant( &dbv );
}
diff --git a/protocols/JabberG/jabber_notes.cpp b/protocols/JabberG/jabber_notes.cpp
index 03a274f0fb..4e40f25c7c 100644
--- a/protocols/JabberG/jabber_notes.cpp
+++ b/protocols/JabberG/jabber_notes.cpp
@@ -777,7 +777,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok)
int nMsgId = SerialNext();
XmlNode m(_T("message"));
- m << XATTR(_T("type"), _T("chat")) << XATTR( _T("to"), pNote->GetFrom() ) << XATTRID( nMsgId );
+ m << XATTR(_T("type"), _T("chat")) << XATTR( _T("to"), pNote->GetFrom()) << XATTRID( nMsgId );
m << XCHILD(_T("body"), buf);
HXML hXmlItem = m << XCHILDNS(_T("x"), _T(JABBER_FEAT_MIRANDA_NOTES)) << XCHILD(_T("note"));
hXmlItem << XATTR(_T("tags"), pNote->GetTagsStr());
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index f4e070271a..53feb71763 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -783,7 +783,7 @@ private:
TCHAR* buf = mir_a2t( result->pData );
XmlNode node( buf, NULL, NULL );
if ( node ) {
- HXML queryNode = xmlGetChild( node, _T("query") );
+ HXML queryNode = xmlGetChild( node, _T("query"));
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
}
@@ -1011,7 +1011,7 @@ static void _RosterListClear(HWND hwndDlg)
HWND hList=GetDlgItem(hwndDlg, IDC_ROSTER);
if (!hList) return;
ListView_DeleteAllItems(hList);
- while ( ListView_DeleteColumn( hList, 0) );
+ while ( ListView_DeleteColumn( hList, 0));
LV_COLUMN column={0};
column.mask=LVCF_TEXT;
@@ -1156,11 +1156,11 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
BOOL bPushed = itemRoster ? TRUE : FALSE;
if ( !bPushed ) {
const TCHAR *rosterName = xmlGetAttrValue( itemRoster, _T("name"));
- if ( (rosterName!=NULL || name[0]!=_T('\0')) && lstrcmpi(rosterName,name) )
+ if ( (rosterName!=NULL || name[0]!=_T('\0')) && lstrcmpi(rosterName,name))
bPushed=TRUE;
if ( !bPushed ) {
rosterName = xmlGetAttrValue( itemRoster, _T("subscription"));
- if ((rosterName!=NULL || subscr[0]!=_T('\0')) && lstrcmpi(rosterName,subscr) )
+ if ((rosterName!=NULL || subscr[0]!=_T('\0')) && lstrcmpi(rosterName,subscr))
bPushed=TRUE;
}
if ( !bPushed ) {
@@ -1168,7 +1168,7 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
const TCHAR* rosterGroup=NULL;
if (groupNode != NULL)
rosterGroup = xmlGetText( groupNode );
- if ((rosterGroup!=NULL || group[0]!=_T('\0')) && lstrcmpi(rosterGroup,group) )
+ if ((rosterGroup!=NULL || group[0]!=_T('\0')) && lstrcmpi(rosterGroup,group))
bPushed=TRUE;
}
}
@@ -1372,7 +1372,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg)
int nBytesProcessed = 0;
XmlNode node( newBuf, &nBytesProcessed, NULL );
if ( node ) {
- HXML Workbook = xmlGetChild( node, _T("Workbook") );
+ HXML Workbook = xmlGetChild( node, _T("Workbook"));
if ( Workbook ) {
HXML Worksheet = xmlGetChild( Workbook , "Worksheet");
if ( Worksheet ) {
@@ -1450,7 +1450,7 @@ static BOOL CALLBACK _RosterNewListProc( HWND hList, UINT msg, WPARAM wParam, LP
RECT rc;
TCHAR buff[260];
ListView_GetSubItemRect(hList, lvhti.iItem, lvhti.iSubItem, LVIR_BOUNDS,&rc);
- ListView_GetItemText(hList, lvhti.iItem, lvhti.iSubItem, buff, SIZEOF(buff) );
+ ListView_GetItemText(hList, lvhti.iItem, lvhti.iSubItem, buff, SIZEOF(buff));
HWND hEditor=CreateWindow(TEXT("EDIT"),buff,WS_CHILD|ES_AUTOHSCROLL,rc.left+3, rc.top+2, rc.right-rc.left-3, rc.bottom - rc.top-3,hList, NULL, hInst, NULL);
SendMessage(hEditor,WM_SETFONT,(WPARAM)SendMessage(hList,WM_GETFONT,0,0),0);
ShowWindow(hEditor,SW_SHOW);
@@ -2269,7 +2269,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg)
TCHAR* ptszText = mir_a2t( result->pData );
XmlNode node( ptszText, NULL, NULL );
if ( node ) {
- HXML queryNode = xmlGetChild( node, _T("query") );
+ HXML queryNode = xmlGetChild( node, _T("query"));
if ( queryNode && IsWindow(hwnd)) {
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
diff --git a/protocols/JabberG/jabber_privacy.cpp b/protocols/JabberG/jabber_privacy.cpp
index ada79a9c52..1b9196943b 100644
--- a/protocols/JabberG/jabber_privacy.cpp
+++ b/protocols/JabberG/jabber_privacy.cpp
@@ -195,15 +195,15 @@ void CJabberProto::OnIqResultPrivacyListActive( HXML iqNode, CJabberIqInfo* pInf
m_privacyListManager.Lock();
if ( !_tcscmp( type, _T("result"))) {
if ( pList ) {
- m_privacyListManager.SetActiveListName( pList->GetListName() );
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as active"), pList->GetListName() );
+ m_privacyListManager.SetActiveListName( pList->GetListName());
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as active"), pList->GetListName());
}
else {
m_privacyListManager.SetActiveListName( NULL );
mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Active privacy list successfully declined"));
}
}
- else mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting active list") );
+ else mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting active list"));
m_privacyListManager.Unlock();
@@ -235,8 +235,8 @@ void CJabberProto::OnIqResultPrivacyListDefault( HXML iqNode, CJabberIqInfo* pIn
m_privacyListManager.Lock();
if ( !_tcscmp( type, _T("result"))) {
if ( pList ) {
- m_privacyListManager.SetDefaultListName( pList->GetListName() );
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as default"), pList->GetListName() );
+ m_privacyListManager.SetDefaultListName( pList->GetListName());
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as default"), pList->GetListName());
}
else {
m_privacyListManager.SetDefaultListName( NULL );
@@ -244,7 +244,7 @@ void CJabberProto::OnIqResultPrivacyListDefault( HXML iqNode, CJabberIqInfo* pIn
}
}
else {
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting default list") );
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting default list"));
}
m_privacyListManager.Unlock();
@@ -415,7 +415,7 @@ public:
SendDlgItemMessage( m_hwnd, IDC_CHECK_PRESENCE_OUT, BM_SETCHECK, BST_CHECKED, 0 );
if ( m_pRule->GetValue() && ( m_pRule->GetType() == Jid || m_pRule->GetType() == Group ))
- SetDlgItemText( m_hwnd, IDC_EDIT_VALUE, m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_EDIT_VALUE, m_pRule->GetValue());
}
void cbType_OnChange(CCtrlData*)
@@ -461,10 +461,10 @@ public:
}
// FIXME: ugly code :)
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue() );
- LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue());
+ LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue());
if ( nSelPos != CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_SETCURSEL, nSelPos, 0 );
}
@@ -483,7 +483,7 @@ public:
for ( int i = 0; ; i++ )
{
mir_snprintf(buf, 20, "%d", i);
- if ( DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv) )
+ if ( DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv))
break;
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, (LPARAM)&dbv.ptszVal[1] );
@@ -491,10 +491,10 @@ public:
}
// FIXME: ugly code :)
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue() );
- LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue());
+ LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue());
if ( nSelPos != CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_SETCURSEL, nSelPos, 0 );
}
@@ -506,9 +506,9 @@ public:
ShowWindow( GetDlgItem( m_hwnd, IDC_COMBO_VALUES ), SW_HIDE );
ShowWindow( GetDlgItem( m_hwnd, IDC_COMBO_VALUE ), SW_SHOW );
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- LRESULT nSelected = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SELECTSTRING, -1, (LPARAM)TranslateTS(m_pRule->GetValue()) );
+ LRESULT nSelected = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SELECTSTRING, -1, (LPARAM)TranslateTS(m_pRule->GetValue()));
if ( nSelected == CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SETCURSEL, 0, 0 );
}
@@ -540,7 +540,7 @@ public:
case Group:
{
TCHAR szText[ 512 ];
- GetDlgItemText( m_hwnd, IDC_COMBO_VALUES, szText, SIZEOF(szText) );
+ GetDlgItemText( m_hwnd, IDC_COMBO_VALUES, szText, SIZEOF(szText));
m_pRule->SetValue( szText );
break;
}
@@ -933,8 +933,8 @@ void CJabberDlgPrivacyLists::OnProtoRefresh(WPARAM, LPARAM)
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
while ( pList ) {
- if ( !pList->IsDeleted() ) {
- nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)pList->GetListName() );
+ if ( !pList->IsDeleted()) {
+ nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)pList->GetListName());
SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, (LPARAM)pList );
}
pList = pList->GetNext();
@@ -1042,15 +1042,15 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
while ( pRule ) {
bListEmpty = FALSE;
TCHAR szTypeValue[ 512 ];
- switch ( pRule->GetType() ) {
+ switch ( pRule->GetType()) {
case Jid:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If jabber id is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If jabber id is '%s' then" ), pRule->GetValue());
break;
case Group:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If group is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If group is '%s' then" ), pRule->GetValue());
break;
case Subscription:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If subscription is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If subscription is '%s' then" ), pRule->GetValue());
break;
case Else:
mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "Else"));
@@ -1064,24 +1064,24 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
if ( !dwPackets )
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if ( dwPackets == JABBER_PL_RULE_TYPE_ALL )
- _tcscpy( szPackets, _T("all") );
+ _tcscpy( szPackets, _T("all"));
else {
if ( dwPackets & JABBER_PL_RULE_TYPE_MESSAGE )
- _tcscat( szPackets, _T("messages") );
+ _tcscat( szPackets, _T("messages"));
if ( dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("presence-in") );
+ _tcscat( szPackets, _T("presence-in"));
}
if ( dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("presence-out") );
+ _tcscat( szPackets, _T("presence-out"));
}
if ( dwPackets & JABBER_PL_RULE_TYPE_IQ ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("queries") );
+ _tcscat( szPackets, _T("queries"));
} }
TCHAR szListItem[ 512 ];
@@ -1211,7 +1211,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis)
rc.bottom -= (rc.bottom - rc.top) / 2;
rc.left += 25;
- switch ( pRule->GetType() )
+ switch ( pRule->GetType())
{
case Jid:
{
@@ -1694,7 +1694,7 @@ void CJabberDlgPrivacyLists::EnableEditorControls()
EnableWindow( GetDlgItem( m_hwnd, IDC_APPLY ), bListsLoaded && bListsModified );
if (bListsLoaded)
- SetStatusText( TranslateT("Ready.") );
+ SetStatusText( TranslateT("Ready."));
}
LRESULT CALLBACK CJabberDlgPrivacyLists::LstListsSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1799,14 +1799,14 @@ void CJabberDlgPrivacyLists::btnActivate_OnClick(CCtrlButton *)
{
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = GetSelectedList(m_hwnd);
- if ( pList && pList->IsModified() ) {
+ if ( pList && pList->IsModified()) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateT("Please save list before activating"), TranslateT("First, save the list"), MB_OK | MB_ICONSTOP );
return;
}
EnableWindow( GetDlgItem( m_hwnd, IDC_ACTIVATE ), FALSE );
SetWindowLongPtr( GetDlgItem( m_hwnd, IDC_ACTIVATE ), GWLP_USERDATA, (LONG_PTR)pList );
- XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
HXML active = query << XCHILD( _T("active"));
if ( pList )
@@ -1825,7 +1825,7 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *)
{
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = GetSelectedList(m_hwnd);
- if ( pList && pList->IsModified() ) {
+ if ( pList && pList->IsModified()) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateT("Please save list before you make it the default list"), TranslateT("First, save the list"), MB_OK | MB_ICONSTOP );
return;
@@ -1833,11 +1833,11 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *)
EnableWindow( GetDlgItem( m_hwnd, IDC_SET_DEFAULT ), FALSE );
SetWindowLongPtr( GetDlgItem( m_hwnd, IDC_SET_DEFAULT ), GWLP_USERDATA, (LONG_PTR)pList );
- XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS ));
HXML defaultTag = query << XCHILD( _T("default"));
if ( pList )
- xmlAddAttr( defaultTag, _T("name"), pList->GetListName() );
+ xmlAddAttr( defaultTag, _T("name"), pList->GetListName());
m_proto->m_privacyListManager.Unlock();
SetStatusText(TranslateT( JABBER_PL_BUSY_MSG ));
@@ -2001,7 +2001,7 @@ void CJabberDlgPrivacyLists::btnAddList_OnClick(CCtrlButton *)
// FIXME: line length is hard coded in dialog procedure
CJabberDlgPrivacyAddList dlgPrivacyAddList(m_proto, m_hwnd);
int nRetVal = dlgPrivacyAddList.DoModal();
- if ( nRetVal && _tcslen( dlgPrivacyAddList.szLine ) ) {
+ if ( nRetVal && _tcslen( dlgPrivacyAddList.szLine )) {
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.FindList( dlgPrivacyAddList.szLine );
if ( !pList ) {
@@ -2033,7 +2033,7 @@ void CJabberDlgPrivacyLists::btnRemoveList_OnClick(CCtrlButton *)
if ( pList ) {
TCHAR *szListName = pList->GetListName();
if ( ( m_proto->m_privacyListManager.GetActiveListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetActiveListName()))
- || ( m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetDefaultListName()) )) {
+ || ( m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetDefaultListName()))) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateTS(_T("Can't remove active or default list")), TranslateTS(_T("Sorry")), MB_OK | MB_ICONSTOP );
return;
@@ -2061,11 +2061,11 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
CPrivacyListModifyUserParam *pUserData = NULL;
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
while ( pList ) {
- if ( pList->IsModified() ) {
+ if ( pList->IsModified()) {
CPrivacyListRule* pRule = pList->GetFirstRule();
if ( !pRule )
pList->SetDeleted();
- if ( pList->IsDeleted() ) {
+ if ( pList->IsDeleted()) {
pList->RemoveAllRules();
pRule = NULL;
}
@@ -2078,11 +2078,11 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListModify, JABBER_IQ_TYPE_SET, NULL, 0, -1, pUserData ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS ));
- HXML listTag = query << XCHILD( _T("list")) << XATTR( _T("name"), pList->GetListName() );
+ HXML listTag = query << XCHILD( _T("list")) << XATTR( _T("name"), pList->GetListName());
while ( pRule ) {
HXML itemTag = listTag << XCHILD( _T("item"));
- switch ( pRule->GetType() ) {
+ switch ( pRule->GetType()) {
case Jid:
itemTag << XATTR( _T("type"), _T("jid"));
break;
@@ -2094,12 +2094,12 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
break;
}
if ( pRule->GetType() != Else )
- itemTag << XATTR( _T("value"), pRule->GetValue() );
- if ( pRule->GetAction() )
+ itemTag << XATTR( _T("value"), pRule->GetValue());
+ if ( pRule->GetAction())
itemTag << XATTR( _T("action"), _T("allow"));
else
itemTag << XATTR( _T("action"), _T("deny"));
- itemTag << XATTRI( _T("order"), pRule->GetOrder() );
+ itemTag << XATTRI( _T("order"), pRule->GetOrder());
DWORD dwPackets = pRule->GetPackets();
if ( dwPackets != JABBER_PL_RULE_TYPE_ALL ) {
if ( dwPackets & JABBER_PL_RULE_TYPE_IQ )
@@ -2216,7 +2216,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandlePrivacyLists( WPARAM, LPARAM )
void CJabberProto::QueryPrivacyLists( ThreadData *pThreadInfo )
{
- XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyLists ) );
+ XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyLists ));
iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
if ( pThreadInfo )
pThreadInfo->send( iq );
@@ -2239,11 +2239,11 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList( WPARAM, LPARAM, LPARAM iList )
pList = pList->GetNext();
}
- XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
HXML active = query << XCHILD( _T("active"));
if ( pList )
- active << XATTR( _T("name"), pList->GetListName() );
+ active << XATTR( _T("name"), pList->GetListName());
m_privacyListManager.Unlock();
m_ThreadInfo->send( iq );
diff --git a/protocols/JabberG/jabber_privacy.h b/protocols/JabberG/jabber_privacy.h
index 84cef9e22e..7eda283a94 100644
--- a/protocols/JabberG/jabber_privacy.h
+++ b/protocols/JabberG/jabber_privacy.h
@@ -228,9 +228,9 @@ public:
}
CPrivacyListRule *pRule = m_pRules;
- while ( pRule->GetNext() ) {
+ while ( pRule->GetNext()) {
if ( pRule->GetNext() == pRuleToRemove ) {
- pRule->SetNext( pRule->GetNext()->GetNext() );
+ pRule->SetNext( pRule->GetNext()->GetNext());
pRuleToRemove->SetNext( NULL );
delete pRuleToRemove;
return TRUE;
@@ -244,7 +244,7 @@ public:
// 0 or 1 rules?
if ( !m_pRules )
return TRUE;
- if ( !m_pRules->GetNext() ) {
+ if ( !m_pRules->GetNext()) {
m_pRules->SetOrder( 100 );
return TRUE;
}
@@ -273,7 +273,7 @@ public:
CPrivacyListRule *pTmp;
for ( i = 0; i < dwCount; i++ ) {
for ( j = dwCount - 1; j > i; j-- ) {
- if ( pRules[j - 1]->GetOrder() > pRules[j]->GetOrder() ) {
+ if ( pRules[j - 1]->GetOrder() > pRules[j]->GetOrder()) {
pTmp = pRules[j - 1];
pRules[j - 1] = pRules[j];
pRules[j] = pTmp;
@@ -418,7 +418,7 @@ public:
return TRUE;
CPrivacyList *pList = m_pLists;
while ( pList ) {
- if ( pList->IsModified() )
+ if ( pList->IsModified())
return TRUE;
pList = pList->GetNext();
}
@@ -428,7 +428,7 @@ public:
{
CPrivacyList *pList = m_pLists;
while ( pList ) {
- if ( !pList->IsLoaded() )
+ if ( !pList->IsLoaded())
return FALSE;
pList = pList->GetNext();
}
diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp
index 46042c7640..cfe4c40a23 100644
--- a/protocols/JabberG/jabber_proto.cpp
+++ b/protocols/JabberG/jabber_proto.cpp
@@ -480,7 +480,7 @@ int CJabberProto::Authorize( HANDLE hContact )
if ( !m_bJabberOnline )
return 1;
- memset( &dbei, 0, sizeof( dbei ) );
+ memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hContact, 0 )) == ( DWORD )( -1 ))
return 1;
@@ -533,7 +533,7 @@ int CJabberProto::AuthDeny( HANDLE hDbEvent, const TCHAR* /*szReason*/ )
return 1;
Log( "Entering AuthDeny" );
- memset( &dbei, 0, sizeof( dbei ) );
+ memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return 1;
@@ -758,7 +758,7 @@ int __cdecl CJabberProto::GetInfo( HANDLE hContact, int /*infoType*/ )
int result = 1;
DBVARIANT dbv;
- if ( JGetByte( hContact, "ChatRoom" , 0) )
+ if ( JGetByte( hContact, "ChatRoom" , 0))
return 1;
if ( !JGetStringT( hContact, "jid", &dbv )) {
@@ -783,7 +783,7 @@ int __cdecl CJabberProto::GetInfo( HANDLE hContact, int /*infoType*/ )
if ( !item ) {
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
_tcsncpy( szBareJid, dbv.ptszVal, SIZEOF( szBareJid ));
- TCHAR* pDelimiter = _tcschr( szBareJid, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szBareJid, _T('/'));
if ( pDelimiter ) {
*pDelimiter = 0;
pDelimiter++;
@@ -877,7 +877,7 @@ HANDLE __cdecl CJabberProto::SearchBasic( const TCHAR* szJid )
Log( "JabberBasicSearch called with lParam = '%s'", szJid );
JABBER_SEARCH_BASIC *jsb;
- if ( !m_bJabberOnline || ( jsb=( JABBER_SEARCH_BASIC * ) mir_alloc( sizeof( JABBER_SEARCH_BASIC )) )==NULL )
+ if ( !m_bJabberOnline || ( jsb=( JABBER_SEARCH_BASIC * ) mir_alloc( sizeof( JABBER_SEARCH_BASIC )))==NULL )
return 0;
if ( _tcschr( szJid, '@' ) == NULL ) {
@@ -1007,7 +1007,7 @@ int __cdecl CJabberProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* evt )
int nDbEvent = JCallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
EnterCriticalSection( &m_csLastResourceMap );
- if (IsLastResourceExists( (void *)evt->lParam) ) {
+ if (IsLastResourceExists( (void *)evt->lParam)) {
m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )nDbEvent;
m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )evt->lParam;
if ( m_dwResourceMapPointer >= SIZEOF( m_ulpResourceToDbEventMap ))
@@ -1116,7 +1116,7 @@ HANDLE __cdecl CJabberProto::SendFile( HANDLE hContact, const TCHAR* szDescripti
// caps not already received
|| ( jcb == JABBER_RESOURCE_CAPS_NONE )
// XEP-0096 and OOB not supported?
- || !(jcb & ( JABBER_CAPS_SI_FT | JABBER_CAPS_OOB ) )
+ || !(jcb & ( JABBER_CAPS_SI_FT | JABBER_CAPS_OOB ))
) {
JFreeVariant( &dbv );
MsgPopup( hContact, TranslateT("No compatible file transfer machanism exist"), item->jid );
@@ -1514,7 +1514,7 @@ int __cdecl CJabberProto::SetAwayMsg( int status, const TCHAR* msg )
TCHAR* newModeMsg = mir_tstrdup( msg );
if (( *szMsg == NULL && newModeMsg == NULL ) ||
- ( *szMsg != NULL && newModeMsg != NULL && !lstrcmp( *szMsg, newModeMsg )) ) {
+ ( *szMsg != NULL && newModeMsg != NULL && !lstrcmp( *szMsg, newModeMsg ))) {
// Message is the same, no update needed
mir_free( newModeMsg );
LeaveCriticalSection( &m_csModeMsgMutex );
diff --git a/protocols/JabberG/jabber_rc.cpp b/protocols/JabberG/jabber_rc.cpp
index 55e7779045..312db4bac4 100644
--- a/protocols/JabberG/jabber_rc.cpp
+++ b/protocols/JabberG/jabber_rc.cpp
@@ -45,15 +45,15 @@ CJabberAdhocSession::CJabberAdhocSession( CJabberProto* global )
BOOL CJabberProto::IsRcRequestAllowedByACL( CJabberIqInfo* pInfo )
{
- if ( !pInfo || !pInfo->GetFrom() )
+ if ( !pInfo || !pInfo->GetFrom())
return FALSE;
- return IsMyOwnJID( pInfo->GetFrom() );
+ return IsMyOwnJID( pInfo->GetFrom());
}
BOOL CJabberProto::HandleAdhocCommandRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
if ( !m_options.EnableRemoteControl || !IsRcRequestAllowedByACL( pInfo )) {
@@ -277,7 +277,7 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
HXML fieldNode = xNode << XCHILD( _T("field")) << XATTR( _T("label"), TranslateT("Status"))
<< XATTR( _T("type"), _T("list-single")) << XATTR( _T("var"), _T("status"));
- fieldNode << XCHILD( _T("required") );
+ fieldNode << XCHILD( _T("required"));
int status = JCallService( MS_CLIST_GETSTATUSMODE, 0, 0 );
switch ( status ) {
@@ -339,16 +339,16 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
else if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
- HXML fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status") );
+ HXML fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status"));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML valueNode = xmlGetChild( fieldNode , "value" );
- if ( !valueNode || !xmlGetText( valueNode ) )
+ if ( !valueNode || !xmlGetText( valueNode ))
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int status = 0;
@@ -366,19 +366,19 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
int priority = -9999;
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-priority") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-priority"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- priority = _ttoi( xmlGetText( valueNode ) );
+ if ( xmlGetText( valueNode ))
+ priority = _ttoi( xmlGetText( valueNode ));
}
if ( priority >= -128 && priority <= 127 )
JSetWord( NULL, "Priority", (WORD)priority );
const TCHAR* szStatusMessage = NULL;
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-message") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-message"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
+ if ( xmlGetText( valueNode ))
szStatusMessage = xmlGetText( valueNode );
}
@@ -388,9 +388,9 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
DBWriteContactSettingTString( NULL, "SRAway", StatusModeToDbSetting( status, "Msg" ), szStatusMessage ? szStatusMessage : _T( "" ));
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-global") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-global"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
JCallService( MS_CLIST_SETSTATUSMODE, status, NULL );
else
CallProtoService( m_szModuleName, PS_SETSTATUS, status, NULL );
@@ -445,30 +445,30 @@ int CJabberProto::AdhocOptionsHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML fieldNode, valueNode;
// Automatically Accept File Transfers
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("auto-files") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("auto-files"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- DBWriteContactSettingByte( NULL, "SRFile", "AutoAccept", (BYTE)_ttoi( xmlGetText( valueNode ) ) );
+ if ( xmlGetText( valueNode ))
+ DBWriteContactSettingByte( NULL, "SRFile", "AutoAccept", (BYTE)_ttoi( xmlGetText( valueNode )) );
}
// Use sounds
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("sounds") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("sounds"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- DBWriteContactSettingByte( NULL, "Skin", "UseSound", (BYTE)_ttoi( xmlGetText( valueNode ) ) );
+ if ( xmlGetText( valueNode ))
+ DBWriteContactSettingByte( NULL, "Skin", "UseSound", (BYTE)_ttoi( xmlGetText( valueNode )) );
}
// Disable remote controlling
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("enable-rc") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("enable-rc"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
m_options.EnableRemoteControl = 0;
}
@@ -519,7 +519,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 0 ) {
int nUnreadEvents = RcGetUnreadEventsCount();
if ( !nUnreadEvents ) {
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no messages to forward") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no messages to forward"));
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -550,7 +550,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
// remove clist events
xNode << XCHILD( _T("field")) << XATTR( _T("label"), TranslateT("Mark messages as read")) << XATTR( _T("type"), _T("boolean"))
<< XATTR( _T("var"), _T("remove-clist-events")) << XCHILD( _T("value"),
- m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0") );
+ m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0"));
m_ThreadInfo->send( iq );
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -559,7 +559,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
@@ -568,9 +568,9 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
BOOL bRemoveCListEvents = TRUE;
// remove clist events
- fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("remove-clist-events") );
+ fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("remove-clist-events"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && !_ttoi( xmlGetText( valueNode ) ) ) {
+ if ( xmlGetText( valueNode ) && !_ttoi( xmlGetText( valueNode )) ) {
bRemoveCListEvents = FALSE;
}
}
@@ -658,7 +658,7 @@ typedef BOOL (WINAPI *LWS )( VOID );
int CJabberProto::AdhocLockWSHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession )
{
BOOL bOk = FALSE;
- HMODULE hLibrary = LoadLibrary( _T("user32.dll") );
+ HMODULE hLibrary = LoadLibrary( _T("user32.dll"));
if ( hLibrary ) {
LWS pLws = (LWS)GetProcAddress( hLibrary, "LockWorkStation" );
if ( pLws )
@@ -668,9 +668,9 @@ int CJabberProto::AdhocLockWSHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSe
TCHAR szMsg[ 1024 ];
if ( bOk )
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Workstation successfully locked") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Workstation successfully locked"));
else
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Error %d occured during workstation lock"), GetLastError() );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Error %d occured during workstation lock"), GetLastError());
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -716,16 +716,16 @@ int CJabberProto::AdhocQuitMirandaHandler( HXML, CJabberIqInfo* pInfo, CJabberAd
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML fieldNode, valueNode;
// I Agree checkbox
- fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("allow-shutdown") );
+ fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("allow-shutdown"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" )))
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
mir_forkthread( JabberQuitMirandaIMThread, NULL );
return JABBER_ADHOC_HANDLER_STATUS_COMPLETED;
@@ -751,7 +751,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler( HXML, CJabberIqInfo* pInfo, CJabb
ListUnlock();
if ( !nChatsCount ) {
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no groupchats to leave") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no groupchats to leave"));
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -796,12 +796,12 @@ int CJabberProto::AdhocLeaveGroupchatsHandler( HXML, CJabberIqInfo* pInfo, CJabb
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
// Groupchat list here:
- HXML fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("groupchats") );
+ HXML fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("groupchats"));
if ( fieldNode ) {
for ( i = 0; i < xmlGetChildCount( fieldNode ); i++ ) {
HXML valueNode = xmlGetChild( fieldNode, i );
diff --git a/protocols/JabberG/jabber_rc.h b/protocols/JabberG/jabber_rc.h
index 394b905fbf..a83db38ab4 100644
--- a/protocols/JabberG/jabber_rc.h
+++ b/protocols/JabberG/jabber_rc.h
@@ -216,9 +216,9 @@ protected:
}
CJabberAdhocSession* pTmp = m_pSessions;
- while ( pTmp->GetNext() ) {
+ while ( pTmp->GetNext()) {
if ( pTmp->GetNext() == pSession ) {
- pTmp->SetNext( pSession->GetNext() );
+ pTmp->SetNext( pSession->GetNext());
pSession->SetNext( NULL );
delete pSession;
return TRUE;
@@ -241,10 +241,10 @@ protected:
return TRUE;
}
- while ( pSession->GetNext() ) {
+ while ( pSession->GetNext()) {
if ( pSession->GetNext()->GetSessionStartTime() < dwExpireTime ) {
CJabberAdhocSession* pRetVal = pSession->GetNext();
- pSession->SetNext( pSession->GetNext()->GetNext() );
+ pSession->SetNext( pSession->GetNext()->GetNext());
pRetVal->SetNext( NULL );
delete pRetVal;
return TRUE;
@@ -289,7 +289,7 @@ public:
m_pNodes = pNode;
else {
CJabberAdhocNode* pTmp = m_pNodes;
- while ( pTmp->GetNext() )
+ while ( pTmp->GetNext())
pTmp = pTmp->GetNext();
pTmp->SetNext( pNode );
}
diff --git a/protocols/JabberG/jabber_search.cpp b/protocols/JabberG/jabber_search.cpp
index de2c0121a5..fddcc5617d 100644
--- a/protocols/JabberG/jabber_search.cpp
+++ b/protocols/JabberG/jabber_search.cpp
@@ -162,7 +162,7 @@ void CJabberProto::OnIqResultGetSearchFields( HXML iqNode )
if ( !_tcsicmp( xmlGetName( chNode ), _T("instructions")) && xmlGetText( chNode ))
SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,TranslateTS(xmlGetText( chNode )));
- else if ( xmlGetName( chNode ) ) {
+ else if ( xmlGetName( chNode )) {
Data *MyData=(Data*)malloc(sizeof(Data));
memset(MyData,0,sizeof(Data));
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp
index 37cc368549..8b51b63e48 100644
--- a/protocols/JabberG/jabber_svc.cpp
+++ b/protocols/JabberG/jabber_svc.cpp
@@ -432,7 +432,7 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText( WPARAM wParam, LPARAM lPar
bool bIsTipper = DBGetContactSettingByte(NULL, "Tab_SRMsg", "adv_TipperTooltip", 1) && ServiceExists("mToolTip/HideTip");
//JID:
- if ( _tcschr(info->resourceName, _T('@') ) != NULL )
+ if ( _tcschr(info->resourceName, _T('@')) != NULL )
appendString(bIsTipper, _T("JID:"), info->resourceName, outBuf, SIZEOF(outBuf));
else if (lParam) { //or simple nick
appendString(bIsTipper, _T("Nick:"), (TCHAR*) lParam, outBuf, SIZEOF(outBuf));
@@ -614,7 +614,7 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge( WPARAM wParam, LPARAM )
m_ThreadInfo->send(
XmlNode( _T("message")) << XATTR( _T("type"), _T("headline")) << XATTR( _T("to"), tszJid )
<< XCHILDNS( _T("attention"),
- jcb & JABBER_CAPS_ATTENTION ? _T(JABBER_FEAT_ATTENTION) : _T(JABBER_FEAT_ATTENTION_0 )) );
+ jcb & JABBER_CAPS_ATTENTION ? _T(JABBER_FEAT_ATTENTION) : _T(JABBER_FEAT_ATTENTION_0 )));
}
return 0;
}
@@ -1120,7 +1120,7 @@ LPTSTR CJabberNetInterface::GetResourceFeatures( LPCTSTR jid )
}
// allocate memory and fill it
- LPTSTR str = (LPTSTR)mir_alloc( iLen * sizeof(TCHAR) );
+ LPTSTR str = (LPTSTR)mir_alloc( iLen * sizeof(TCHAR));
LPTSTR p = str;
for ( i = 0; g_JabberFeatCapPairs[i].szFeature; i++ ) {
if ( jcb & g_JabberFeatCapPairs[i].jcbCap ) {
diff --git a/protocols/JabberG/jabber_thread.cpp b/protocols/JabberG/jabber_thread.cpp
index 116328250f..5635c10a57 100644
--- a/protocols/JabberG/jabber_thread.cpp
+++ b/protocols/JabberG/jabber_thread.cpp
@@ -683,7 +683,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( m_AuthMechs.isSpnegoAvailable ) {
m_AuthMechs.isSpnegoAvailable = false;
auth = new TNtlmAuth( info, "GSS-SPNEGO" );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} }
@@ -691,7 +691,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( auth == NULL && m_AuthMechs.isNtlmAvailable ) {
m_AuthMechs.isNtlmAvailable = false;
auth = new TNtlmAuth( info, "NTLM" );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} }
@@ -699,7 +699,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( auth == NULL && m_AuthMechs.isKerberosAvailable ) {
m_AuthMechs.isKerberosAvailable = false;
auth = new TNtlmAuth( info, "GSSAPI", m_AuthMechs.m_gssapiHostName );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} else {
@@ -749,7 +749,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( !request ) request = auth->getInitialRequest();
info->send( XmlNode( _T("auth"), _A2T(request)) << XATTR( _T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl"))
- << XATTR( _T("mechanism"), _A2T(auth->getName() )));
+ << XATTR( _T("mechanism"), _A2T(auth->getName())));
mir_free( request );
}
@@ -857,7 +857,7 @@ void CJabberProto::OnProcessFailure( HXML node, ThreadData* info )
const TCHAR* type;
//failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"
if (( type = xmlGetAttrValue( node, _T("xmlns"))) == NULL ) return;
- if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl") )) {
+ if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
PerformAuthentication( info );
} }
@@ -906,7 +906,7 @@ void CJabberProto::OnProcessSuccess( HXML node, ThreadData* info )
if (( type = xmlGetAttrValue( node, _T("xmlns"))) == NULL )
return;
- if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl") )) {
+ if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
DBVARIANT dbv;
if ( !info->auth->validateLogin( xmlGetText( node ))) {
@@ -1044,7 +1044,7 @@ void CJabberProto::OnProcessPubsubEvent( HXML node )
return;
}
- HXML tuneNode = XPath( itemsNode, _T("item/tune[@xmlns='") _T(JABBER_FEAT_USER_TUNE) _T("']") );
+ HXML tuneNode = XPath( itemsNode, _T("item/tune[@xmlns='") _T(JABBER_FEAT_USER_TUNE) _T("']"));
if ( !tuneNode )
return;
@@ -1157,15 +1157,15 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
HXML bodyNode = xmlGetChildByTag( node , "body", "xml:lang", m_tszSelectedLang );
if ( bodyNode == NULL )
bodyNode = xmlGetChild( node , "body" );
- if ( bodyNode != NULL && xmlGetText( bodyNode ) )
+ if ( bodyNode != NULL && xmlGetText( bodyNode ))
szMessage = xmlGetText( bodyNode );
if (( subjectNode = xmlGetChild( node , "subject" )) && xmlGetText( subjectNode ) && xmlGetText( subjectNode )[0] != _T('\0')) {
- size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( subjectNode ) ) + 128;
+ size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( subjectNode )) + 128;
TCHAR* szTmp = ( TCHAR * )alloca( sizeof(TCHAR) * cbLen );
szTmp[0] = _T('\0');
if ( szMessage )
_tcscat( szTmp, _T("Subject: "));
- _tcscat( szTmp, xmlGetText( subjectNode ) );
+ _tcscat( szTmp, xmlGetText( subjectNode ));
if ( szMessage ) {
_tcscat( szTmp, _T("\r\n"));
_tcscat( szTmp, szMessage );
@@ -1174,7 +1174,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
}
if ( szMessage && (n = xmlGetChildByTag( node, "addresses", "xmlns", _T(JABBER_FEAT_EXT_ADDRESSING)))) {
- HXML addressNode = xmlGetChildByTag( n, "address", "type", _T("ofrom") );
+ HXML addressNode = xmlGetChildByTag( n, "address", "type", _T("ofrom"));
if ( addressNode ) {
const TCHAR* szJid = xmlGetAttrValue( addressNode, _T("jid"));
if ( szJid ) {
@@ -1228,14 +1228,14 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
}
// XEP-0203 delay support
- if ( n = xmlGetChildByTag( node, "delay", "xmlns", _T("urn:xmpp:delay") ) ) {
+ if ( n = xmlGetChildByTag( node, "delay", "xmlns", _T("urn:xmpp:delay")) ) {
const TCHAR* ptszTimeStamp = xmlGetAttrValue( n, _T("stamp"));
if ( ptszTimeStamp != NULL ) {
// skip '-' chars
TCHAR* szStamp = mir_tstrdup( ptszTimeStamp );
int si = 0, sj = 0;
while (1) {
- if ( szStamp[si] == _T('-') )
+ if ( szStamp[si] == _T('-'))
si++;
else
if ( !( szStamp[sj++] = szStamp[si++] ))
@@ -1248,7 +1248,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
// XEP-0224 support (Attention/Nudge)
if ( xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION )) ||
- xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION_0 )) ) {
+ xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION_0 ))) {
if ( !hContact )
hContact = CreateTemporaryContact( from, chatItem );
if ( hContact )
@@ -1285,7 +1285,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
pParams->m_szFrom = mir_tstrdup( from );
HXML pThreadNode = xmlGetChild( node , "thread" );
if ( pThreadNode && xmlGetText( pThreadNode ) && xmlGetText( pThreadNode )[0] )
- pParams->m_szThreadId = mir_tstrdup( xmlGetText( pThreadNode ) );
+ pParams->m_szThreadId = mir_tstrdup( xmlGetText( pThreadNode ));
pParams->m_szId = mir_tstrdup( szId );
pParams->m_szMethod = mir_tstrdup( szMethod );
pParams->m_szUrl = mir_tstrdup( szUrl );
@@ -1318,10 +1318,10 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
TCHAR* prolog = _T("-----BEGIN PGP MESSAGE-----\r\n\r\n");
TCHAR* epilog = _T("\r\n-----END PGP MESSAGE-----\r\n");
- TCHAR* tempstring = ( TCHAR* )alloca( sizeof( TCHAR ) * ( _tcslen( prolog ) + _tcslen( xmlGetText( xNode ) ) + _tcslen( epilog ) + 3 ));
+ TCHAR* tempstring = ( TCHAR* )alloca( sizeof( TCHAR ) * ( _tcslen( prolog ) + _tcslen( xmlGetText( xNode )) + _tcslen( epilog ) + 3 ));
_tcsncpy( tempstring, prolog, _tcslen( prolog ) + 1 );
- _tcsncpy( tempstring + _tcslen( prolog ), xmlGetText( xNode ), _tcslen( xmlGetText( xNode ) ) + 1);
- _tcsncpy( tempstring + _tcslen( prolog ) + _tcslen(xmlGetText( xNode ) ), epilog, _tcslen( epilog ) + 1);
+ _tcsncpy( tempstring + _tcslen( prolog ), xmlGetText( xNode ), _tcslen( xmlGetText( xNode )) + 1);
+ _tcsncpy( tempstring + _tcslen( prolog ) + _tcslen(xmlGetText( xNode )), epilog, _tcslen( epilog ) + 1);
szMessage = tempstring;
}
else if ( !_tcscmp( ptszXmlns, _T(JABBER_FEAT_DELAY)) && msgTime == 0 ) {
@@ -1336,7 +1336,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if ( jcbCaps & JABBER_RESOURCE_CAPS_ERROR )
jcbCaps = JABBER_RESOURCE_CAPS_NONE;
// FIXME: disabled due to expired XEP-0022 and problems with bombus delivery checks
-// if ( jcbCaps && resourceStatus && (!(jcbCaps & JABBER_CAPS_MESSAGE_EVENTS)) )
+// if ( jcbCaps && resourceStatus && (!(jcbCaps & JABBER_CAPS_MESSAGE_EVENTS)))
// resourceStatus->jcbManualDiscoveredCaps |= (JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY);
if ( bodyNode == NULL ) {
@@ -1344,8 +1344,8 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if ( xmlGetChild( xNode , "delivered" ) != NULL || xmlGetChild( xNode , "offline" ) != NULL ) {
int id = -1;
if ( idNode != NULL && xmlGetText( idNode ) != NULL )
- if ( !_tcsncmp( xmlGetText( idNode ), _T(JABBER_IQID), strlen( JABBER_IQID )) )
- id = _ttoi(( xmlGetText( idNode ) )+strlen( JABBER_IQID ));
+ if ( !_tcsncmp( xmlGetText( idNode ), _T(JABBER_IQID), strlen( JABBER_IQID )))
+ id = _ttoi(( xmlGetText( idNode ))+strlen( JABBER_IQID ));
if ( id != -1 )
JSendBroadcast( hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, ( HANDLE ) id, 0 );
@@ -1379,9 +1379,9 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
else if ( !_tcscmp( ptszXmlns, _T(JABBER_FEAT_OOB2))) {
HXML urlNode;
if ( ((urlNode = xmlGetChild( xNode , "url" )) != NULL) && xmlGetText( urlNode ) && xmlGetText( urlNode )[0] != _T('\0')) {
- size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( urlNode ) ) + 32;
+ size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( urlNode )) + 32;
TCHAR* szTmp = ( TCHAR * )alloca( sizeof(TCHAR) * cbLen );
- _tcscpy( szTmp, xmlGetText( urlNode ) );
+ _tcscpy( szTmp, xmlGetText( urlNode ));
if ( szMessage ) {
_tcscat( szTmp, _T("\r\n"));
_tcscat( szTmp, szMessage );
@@ -1667,7 +1667,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
DBCheckIsTransportedContact( from, hContact );
int status = ID_STATUS_ONLINE;
if (( showNode = xmlGetChild( node , "show" )) != NULL ) {
- if (( show = xmlGetText( showNode ) ) != NULL ) {
+ if (( show = xmlGetText( showNode )) != NULL ) {
if ( !_tcscmp( show, _T("away"))) status = ID_STATUS_AWAY;
else if ( !_tcscmp( show, _T("xa"))) status = ID_STATUS_NA;
else if ( !_tcscmp( show, _T("dnd"))) status = ID_STATUS_DND;
@@ -1676,7 +1676,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
char priority = 0;
if (( priorityNode = xmlGetChild( node , "priority" )) != NULL && xmlGetText( priorityNode ) != NULL )
- priority = (char)_ttoi( xmlGetText( priorityNode ) );
+ priority = (char)_ttoi( xmlGetText( priorityNode ));
if (( statusNode = xmlGetChild( node , "status" )) != NULL && xmlGetText( statusNode ) != NULL )
p = xmlGetText( statusNode );
@@ -1706,11 +1706,11 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
if (( xNode = xmlGetChild( xNode , "hash" )) != NULL && xmlGetText( xNode ) != NULL ) {
JDeleteSetting(hContact,"AvatarXVcard");
Log( "AvatarXVcard deleted" );
- JSetStringT( hContact, "AvatarHash", xmlGetText( xNode ) );
+ JSetStringT( hContact, "AvatarHash", xmlGetText( xNode ));
hasAvatar = true;
DBVARIANT dbv;
int result = JGetStringT( hContact, "AvatarSaved", &dbv );
- if ( result || lstrcmp( dbv.ptszVal, xmlGetText( xNode ) )) {
+ if ( result || lstrcmp( dbv.ptszVal, xmlGetText( xNode ))) {
Log( "Avatar was changed" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, NULL );
} else Log( "Not broadcasting avatar changed" );
@@ -1746,7 +1746,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
Log( "Has no avatar" );
JDeleteSetting( hContact, "AvatarHash" );
DBVARIANT dbv = {0};
- if ( !JGetStringT( hContact, "AvatarSaved", &dbv ) ) {
+ if ( !JGetStringT( hContact, "AvatarSaved", &dbv )) {
JFreeVariant( &dbv );
JDeleteSetting( hContact, "AvatarSaved" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL );
@@ -1771,8 +1771,8 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
if ( !item->resourceCount )
{
item->itemResource.status = ID_STATUS_OFFLINE;
- if ((( statusNode = xmlGetChild( node , "status" )) != NULL ) && xmlGetText( statusNode ) )
- replaceStr( item->itemResource.statusMessage, xmlGetText( statusNode ) );
+ if ((( statusNode = xmlGetChild( node , "status" )) != NULL ) && xmlGetText( statusNode ))
+ replaceStr( item->itemResource.statusMessage, xmlGetText( statusNode ));
else
replaceStr( item->itemResource.statusMessage, NULL );
}
@@ -1809,7 +1809,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
}
else {
HXML n = xmlGetChild( node , "nick" );
- nick = ( n == NULL ) ? JabberNickFromJID( from ) : mir_tstrdup( xmlGetText( n ) );
+ nick = ( n == NULL ) ? JabberNickFromJID( from ) : mir_tstrdup( xmlGetText( n ));
if ( nick != NULL ) {
Log( TCHAR_STR_PARAM " ( " TCHAR_STR_PARAM " ) requests authorization", nick, from );
DBAddAuthRequest( from, nick );
@@ -1854,7 +1854,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
void CJabberProto::OnIqResultVersion( HXML /*node*/, CJabberIqInfo *pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
if ( r == NULL ) return;
r->dwVersionRequestTime = -1;
@@ -1867,16 +1867,16 @@ void CJabberProto::OnIqResultVersion( HXML /*node*/, CJabberIqInfo *pInfo )
if ( pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && queryNode) {
HXML n;
- if (( n = xmlGetChild( queryNode , "name" ))!=NULL && xmlGetText( n ) )
- r->software = mir_tstrdup( xmlGetText( n ) );
- if (( n = xmlGetChild( queryNode , "version" ))!=NULL && xmlGetText( n ) )
- r->version = mir_tstrdup( xmlGetText( n ) );
- if (( n = xmlGetChild( queryNode , "os" ))!=NULL && xmlGetText( n ) )
- r->system = mir_tstrdup( xmlGetText( n ) );
+ if (( n = xmlGetChild( queryNode , "name" ))!=NULL && xmlGetText( n ))
+ r->software = mir_tstrdup( xmlGetText( n ));
+ if (( n = xmlGetChild( queryNode , "version" ))!=NULL && xmlGetText( n ))
+ r->version = mir_tstrdup( xmlGetText( n ));
+ if (( n = xmlGetChild( queryNode , "os" ))!=NULL && xmlGetText( n ))
+ r->system = mir_tstrdup( xmlGetText( n ));
}
GetResourceCapabilites( pInfo->GetFrom(), TRUE );
- if ( pInfo->GetHContact() )
+ if ( pInfo->GetHContact())
UpdateMirVer( pInfo->GetHContact(), r );
JabberUserInfoUpdate(pInfo->GetHContact());
@@ -1889,11 +1889,11 @@ BOOL CJabberProto::OnProcessJingle( HXML node )
if ( child ) {
if (( type=xmlGetAttrValue( node, _T("type"))) == NULL ) return FALSE;
- if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set") ))) {
+ if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set")))) {
LPCTSTR szAction = xmlGetAttrValue( child, _T("action"));
LPCTSTR idStr = xmlGetAttrValue( node, _T("id"));
LPCTSTR from = xmlGetAttrValue( node, _T("from"));
- if ( szAction && !_tcscmp( szAction, _T("session-initiate")) ) {
+ if ( szAction && !_tcscmp( szAction, _T("session-initiate"))) {
// if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications"
m_ThreadInfo->send( XmlNodeIq( _T("result"), idStr, from ));
@@ -1958,7 +1958,7 @@ void CJabberProto::OnProcessIq( HXML node )
/////////////////////////////////////////////////////////////////////////
// OLD MATCH BY ID
/////////////////////////////////////////////////////////////////////////
- if ( ( !_tcscmp( type, _T("result")) || !_tcscmp( type, _T("error")) ) && (( pfunc=JabberIqFetchFunc( id )) != NULL )) {
+ if ( ( !_tcscmp( type, _T("result")) || !_tcscmp( type, _T("error"))) && (( pfunc=JabberIqFetchFunc( id )) != NULL )) {
Log( "Handling iq request for id=%d", id );
(this->*pfunc)( node );
return;
@@ -1977,8 +1977,8 @@ void CJabberProto::OnProcessIq( HXML node )
SetEvent( item->ft->hFileEvent ); // Simulate the termination of file server connection
}
} }
- else if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set") ))) {
- XmlNodeIq iq( _T("error"), idStr, xmlGetAttrValue( node, _T("from")) );
+ else if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set")))) {
+ XmlNodeIq iq( _T("error"), idStr, xmlGetAttrValue( node, _T("from")));
HXML pFirstChild = xmlGetChild( node , 0 );
if ( pFirstChild )
diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp
index dc433f9b93..3ba8bfa57e 100644
--- a/protocols/JabberG/jabber_userinfo.cpp
+++ b/protocols/JabberG/jabber_userinfo.cpp
@@ -256,7 +256,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
// Resource priority
TCHAR szPriority[128];
mir_sntprintf( szPriority, SIZEOF( szPriority ), _T("%d"), (int)res->priority );
- sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT( "Resource priority" ), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY) );
+ sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT( "Resource priority" ), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY));
// Idle
if ( res->idleStartTime > 0 ) {
@@ -269,7 +269,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
else
lstrcpyn(buf, TranslateT( "<not specified>" ), SIZEOF( buf ));
- sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE) );
+ sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE));
// caps
mir_sntprintf( buf, SIZEOF(buf), _T("%s/%s"), item->jid, res->resourceName );
@@ -285,7 +285,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s (%s)"), TranslateTS(g_JabberFeatCapPairs[i].szDescription), g_JabberFeatCapPairs[i].szFeature );
else
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s"), g_JabberFeatCapPairs[i].szFeature );
- sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i) );
+ sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i));
}
for ( int j = 0; j < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); j++, i++ )
@@ -295,7 +295,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s (%s)"), TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature );
else
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s"), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature );
- sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i) );
+ sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i));
}
}
@@ -304,18 +304,18 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
HTREEITEM htiSoftwareInfo = sttFillInfoLine( hwndTree, htiResource, ppro->LoadIconEx( "main" ), NULL, TranslateT( "Software information" ), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION));
int nLineId = 0;
if ( res->pSoftwareInfo->szOs )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system"), res->pSoftwareInfo->szOs, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system"), res->pSoftwareInfo->szOs, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szOsVersion )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system version"), res->pSoftwareInfo->szOsVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system version"), res->pSoftwareInfo->szOsVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szSoftware )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software"), res->pSoftwareInfo->szSoftware, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software"), res->pSoftwareInfo->szSoftware, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szSoftwareVersion )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software version"), res->pSoftwareInfo->szSoftwareVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software version"), res->pSoftwareInfo->szSoftwareVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szXMirandaCoreVersion ) {
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda IM core version"), res->pSoftwareInfo->szXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Unicode build"), res->pSoftwareInfo->bXMirandaIsUnicode ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Alpha build"), res->pSoftwareInfo->bXMirandaIsAlpha ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Debug build"), res->pSoftwareInfo->bXMirandaIsDebug ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda IM core version"), res->pSoftwareInfo->szXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Unicode build"), res->pSoftwareInfo->bXMirandaIsUnicode ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Alpha build"), res->pSoftwareInfo->bXMirandaIsAlpha ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Debug build"), res->pSoftwareInfo->bXMirandaIsDebug ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
}
}
}
@@ -405,7 +405,7 @@ static void sttFillUserInfo( CJabberProto* ppro, HWND hwndTree, JABBER_LIST_ITEM
for (int i = 0; i < item->resourceCount; ++i)
sttFillResourceInfo( ppro, hwndTree, htiRoot, item, i+1 );
}
- else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE) )
+ else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE))
sttFillResourceInfo( ppro, hwndTree, htiRoot, item, 0 );
sttCleanupInfo(hwndTree, 1);
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc( HWND hwndDlg, UINT msg, WPARAM wP
TreeView_DeleteAllItems( hwndTree );
HTREEITEM htiRoot = sttFillInfoLine( hwndTree, NULL, dat->ppro->LoadIconEx( "main" ), _T( "JID" ), dbv.ptszVal, sttInfoLineId(0, INFOLINE_NAME), true );
sttFillInfoLine( hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL,
- TranslateT("Please switch online to see more details.") );
+ TranslateT("Please switch online to see more details."));
JFreeVariant(&dbv);
break;
diff --git a/protocols/JabberG/jabber_util.cpp b/protocols/JabberG/jabber_util.cpp
index 7c9867a377..9df7bd2620 100644
--- a/protocols/JabberG/jabber_util.cpp
+++ b/protocols/JabberG/jabber_util.cpp
@@ -206,7 +206,7 @@ TCHAR* JabberPrepareJid( LPCTSTR jid )
if ( !jid ) return NULL;
TCHAR* szNewJid = mir_tstrdup( jid );
if ( !szNewJid ) return NULL;
- TCHAR* pDelimiter = _tcschr( szNewJid, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szNewJid, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
CharLower( szNewJid );
if ( pDelimiter ) *pDelimiter = _T('/');
@@ -453,7 +453,7 @@ WCHAR* __stdcall JabberUnixToDosW( const WCHAR* str )
if ( *p == '\n' )
extra++;
}
- if (( res = ( WCHAR* )mir_alloc( sizeof( WCHAR )*( wcslen( str ) + extra + 1 )) ) != NULL ) {
+ if (( res = ( WCHAR* )mir_alloc( sizeof( WCHAR )*( wcslen( str ) + extra + 1 ))) != NULL ) {
for ( p = str,q=res; *p!='\0'; p++,q++ ) {
if ( *p == '\n' ) {
*q = '\r';
@@ -492,7 +492,7 @@ void __stdcall JabberHttpUrlDecode( TCHAR* str )
if ( str == NULL ) return;
for ( p = q = ( TCHAR* )str; *p!='\0'; p++,q++ ) {
- if ( *p=='%' && *( p+1 )!='\0' && isxdigit( *( p+1 )) && *( p+2 )!='\0' && isxdigit( *( p+2 )) ) {
+ if ( *p=='%' && *( p+1 )!='\0' && isxdigit( *( p+1 )) && *( p+2 )!='\0' && isxdigit( *( p+2 ))) {
_stscanf(( TCHAR* )p+1, _T("%2x"), &code );
*q = ( unsigned char ) code;
p += 2;
@@ -818,42 +818,42 @@ void CJabberProto::SendPresenceTo( int status, TCHAR* to, HXML extra, const TCHA
TCHAR szExtCaps[ 512 ] = _T("");
if ( m_bGoogleTalk )
- _tcscat( szExtCaps, _T(JABBER_EXT_GTALK_PMUC) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_GTALK_PMUC));
if ( bSecureIM ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_SECUREIM) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_SECUREIM));
}
if ( m_options.EnableRemoteControl ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_COMMANDS) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_COMMANDS));
}
if ( m_options.EnableUserMood ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_MOOD) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_MOOD));
}
if ( m_options.EnableUserTune ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_TUNE) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_TUNE));
}
if ( m_options.EnableUserActivity ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_ACTIVITY) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_ACTIVITY));
}
if ( m_options.AcceptNotes ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_MIR_NOTES) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_MIR_NOTES));
}
// add features enabled through IJabberNetInterface::AddFeatures()
@@ -1669,10 +1669,10 @@ BOOL CJabberProto::IsMyOwnJID( LPCTSTR szJID )
return FALSE;
}
- TCHAR* pDelimiter = _tcschr( szFrom, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szFrom, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
- pDelimiter = _tcschr( szTo, _T('/') );
+ pDelimiter = _tcschr( szTo, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
BOOL bRetVal = _tcscmp( szFrom, szTo ) == 0;
diff --git a/protocols/JabberG/jabber_vcard.cpp b/protocols/JabberG/jabber_vcard.cpp
index f8edc245ae..70213922f8 100644
--- a/protocols/JabberG/jabber_vcard.cpp
+++ b/protocols/JabberG/jabber_vcard.cpp
@@ -93,7 +93,7 @@ static INT_PTR CALLBACK PersonalDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_COMMAND:
if (( ( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE ) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_GENDER ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_GENDER ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
@@ -156,7 +156,7 @@ static INT_PTR CALLBACK HomeDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_COMMAND:
if ((( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
@@ -222,7 +222,7 @@ static INT_PTR CALLBACK WorkDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_COMMAND:
if ((( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
diff --git a/protocols/JabberG/jabber_xml.cpp b/protocols/JabberG/jabber_xml.cpp
index 70898199c9..158882c195 100644
--- a/protocols/JabberG/jabber_xml.cpp
+++ b/protocols/JabberG/jabber_xml.cpp
@@ -67,8 +67,8 @@ XmlNodeIq::XmlNodeIq( CJabberIqInfo* pInfo ) :
{
if ( pInfo ) {
if ( pInfo->GetCharIqType() != NULL ) *this << XATTR( _T("type"), _A2T(pInfo->GetCharIqType()));
- if ( pInfo->GetReceiver() != NULL ) *this << XATTR( _T("to"), pInfo->GetReceiver() );
- if ( pInfo->GetIqId() != -1 ) *this << XATTRID( pInfo->GetIqId() );
+ if ( pInfo->GetReceiver() != NULL ) *this << XATTR( _T("to"), pInfo->GetReceiver());
+ if ( pInfo->GetIqId() != -1 ) *this << XATTRID( pInfo->GetIqId());
}
}
@@ -77,8 +77,8 @@ XmlNodeIq::XmlNodeIq( const TCHAR* type, CJabberIqInfo* pInfo ) :
{
if ( type != NULL ) *this << XATTR( _T("type"), type );
if ( pInfo ) {
- if ( pInfo->GetFrom() != NULL ) *this << XATTR( _T("to"), pInfo->GetFrom() );
- if ( pInfo->GetIdStr() != NULL ) *this << XATTR( _T("id"), pInfo->GetIdStr() );
+ if ( pInfo->GetFrom() != NULL ) *this << XATTR( _T("to"), pInfo->GetFrom());
+ if ( pInfo->GetIdStr() != NULL ) *this << XATTR( _T("id"), pInfo->GetIdStr());
}
}
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp
index efdb377edc..d35c5a4b88 100644
--- a/protocols/JabberG/jabber_xstatus.cpp
+++ b/protocols/JabberG/jabber_xstatus.cpp
@@ -679,7 +679,7 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode)
return;
}
- HXML n, moodNode = XPath( itemsNode, _T("item/mood[@xmlns='") _T(JABBER_FEAT_USER_MOOD) _T("']") );
+ HXML n, moodNode = XPath( itemsNode, _T("item/mood[@xmlns='") _T(JABBER_FEAT_USER_MOOD) _T("']"));
if ( !moodNode ) return;
LPCTSTR moodType = NULL, moodText = NULL;
@@ -1097,7 +1097,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode)
return;
}
- HXML actNode = XPath( itemsNode, _T("item/activity[@xmlns='") _T(JABBER_FEAT_USER_ACTIVITY) _T("']") );
+ HXML actNode = XPath( itemsNode, _T("item/activity[@xmlns='") _T(JABBER_FEAT_USER_ACTIVITY) _T("']"));
if ( !actNode ) return;
LPCTSTR szText = XPathT( actNode, "text" );
@@ -1217,7 +1217,7 @@ void CPepActivity::ShowSetDialog(BYTE bQuiet)
CJabberDlgPepSimple dlg(m_proto, TranslateT("Set Activity"));
for (int i = 0; i < SIZEOF(g_arrActivities); ++i)
if (g_arrActivities[i].szFirst || g_arrActivities[i].szSecond)
- dlg.AddStatusMode(i, ActivityGetId(i), m_icons.GetIcon(returnActivity(i)), TranslateTS(g_arrActivities[i].szTitle), (g_arrActivities[i].szSecond != NULL) );
+ dlg.AddStatusMode(i, ActivityGetId(i), m_icons.GetIcon(returnActivity(i)), TranslateTS(g_arrActivities[i].szTitle), (g_arrActivities[i].szSecond != NULL));
dlg.SetActiveStatus(m_mode, m_text);
dlg.DoModal();
@@ -1306,7 +1306,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusIcon( WPARAM wParam, LPARAM lParam )
if ( !wParam )
wParam = ((CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)))->m_mode;
- if ( wParam < 1 || wParam >= SIZEOF(g_arrMoods) )
+ if ( wParam < 1 || wParam >= SIZEOF(g_arrMoods))
return 0;
int flags = 0;
@@ -1324,7 +1324,7 @@ BOOL CJabberProto::SendPepTune( TCHAR* szArtist, TCHAR* szLength, TCHAR* szSourc
if ( !m_bJabberOnline || !m_bPepSupported )
return FALSE;
- XmlNodeIq iq( _T("set"), SerialNext() );
+ XmlNodeIq iq( _T("set"), SerialNext());
HXML tuneNode = iq << XCHILDNS( _T("pubsub"), _T(JABBER_FEAT_PUBSUB))
<< XCHILD( _T("publish")) << XATTR( _T("node"), _T(JABBER_FEAT_USER_TUNE))
<< XCHILD( _T("item")) << XCHILDNS( _T("tune"), _T(JABBER_FEAT_USER_TUNE));
@@ -1365,7 +1365,7 @@ void CJabberProto::SetContactTune( HANDLE hContact, LPCTSTR szArtist, LPCTSTR sz
}
else {
szListeningTo = (TCHAR *) mir_alloc( 2048 * sizeof( TCHAR ));
- mir_sntprintf( szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T("") );
+ mir_sntprintf( szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T(""));
}
JSetStringT( hContact, "ListeningTo", szListeningTo );
@@ -1402,7 +1402,7 @@ void overrideStr( TCHAR*& dest, const TCHAR* src, BOOL unicode, const TCHAR* def
INT_PTR __cdecl CJabberProto::OnSetListeningTo( WPARAM, LPARAM lParam )
{
LISTENINGTOINFO *cm = (LISTENINGTOINFO *)lParam;
- if ( !cm || cm->cbSize != sizeof(LISTENINGTOINFO) ) {
+ if ( !cm || cm->cbSize != sizeof(LISTENINGTOINFO)) {
SendPepTune( NULL, NULL, NULL, NULL, NULL, NULL );
JDeleteSetting( NULL, "ListeningTo" );
}
@@ -1430,7 +1430,7 @@ INT_PTR __cdecl CJabberProto::OnSetListeningTo( WPARAM, LPARAM lParam )
while ( szTmp[0] ) {
result += ( _ttoi( szTmp ) * multiplier );
multiplier /= 60;
- szTmp = _tcschr( szTmp, _T(':') );
+ szTmp = _tcschr( szTmp, _T(':'));
if ( !szTmp )
break;
szTmp++;
diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp
index 4386a02a53..eb91ecb74b 100644
--- a/protocols/JabberG/ui_utils.cpp
+++ b/protocols/JabberG/ui_utils.cpp
@@ -554,7 +554,7 @@ CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, HICON hIcon, const char*
CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, int iCoreIcon, const char* tooltip ) :
CCtrlButton( dlg, ctrlId ),
- m_hIcon( LoadSkinnedIcon(iCoreIcon) ),
+ m_hIcon( LoadSkinnedIcon(iCoreIcon)),
m_toolTip( tooltip )
{
}
diff --git a/protocols/MRA/MraAntiSpam.cpp b/protocols/MRA/MraAntiSpam.cpp
index 20be25d33a..002aa3cd08 100644
--- a/protocols/MRA/MraAntiSpam.cpp
+++ b/protocols/MRA/MraAntiSpam.cpp
@@ -195,7 +195,7 @@ INT_PTR CALLBACK MraAntiSpamDlgProcOpts(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
MraAntiSpamLoadBadWordsW();
}
- if ((LOWORD(wParam)==IDC_EDIT_BAD_WORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(0);
+ if ((LOWORD(wParam)==IDC_EDIT_BAD_WORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(0);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
@@ -444,7 +444,7 @@ DWORD MraAntiSpamReceivedMessageW(LPSTR lpszEMail,SIZE_T dwEMailSize,DWORD dwMes
dwRet=MESSAGE_NOT_SPAM;
}else{// temp contact
if (DB_Mra_GetByte(NULL,"AntiSpamCheckTempContacts",MRA_ANTISPAM_DEFAULT_CHK_TEMP_CONTACTS)==FALSE ||
- (((dwMessageFlags&MESSAGE_FLAG_AUTHORIZE) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsers",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsersDisableSPAMCheck",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS_DISABLE_SPAM_CHECK))) )
+ (((dwMessageFlags&MESSAGE_FLAG_AUTHORIZE) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsers",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsersDisableSPAMCheck",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS_DISABLE_SPAM_CHECK))))
{// ïðîâåðêà âðåìåííîãî êîíòàêòà
bCheckMessage=FALSE;
dwRet=MESSAGE_NOT_SPAM;
diff --git a/protocols/MRA/MraAvatars.cpp b/protocols/MRA/MraAvatars.cpp
index ad147b09a6..786e930392 100644
--- a/protocols/MRA/MraAvatars.cpp
+++ b/protocols/MRA/MraAvatars.cpp
@@ -806,7 +806,7 @@ INT_PTR CALLBACK MraAvatarsQueueDlgProcOpts(HWND hWndDlg,UINT msg,WPARAM wParam,
SetDlgItemInt(hWndDlg,IDC_SERVERPORT,MRA_AVT_DEFAULT_SERVER_PORT,FALSE);
}
- if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT || LOWORD(wParam)==IDC_UPD_CHECK_INTERVAL) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT || LOWORD(wParam)==IDC_UPD_CHECK_INTERVAL) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/MraFilesQueue.cpp b/protocols/MRA/MraFilesQueue.cpp
index 09e052c822..75b25a4f78 100644
--- a/protocols/MRA/MraFilesQueue.cpp
+++ b/protocols/MRA/MraFilesQueue.cpp
@@ -135,7 +135,7 @@ INT_PTR CALLBACK MraFilesQueueDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam,
EnableWindow(GetDlgItem(hWndDlg,IDC_FILE_SEND_EXTRA_ADDRESS),IS_DLG_BUTTON_CHECKED(hWndDlg,IDC_FILE_SEND_ADD_EXTRA_ADDRESS));
}
- if ((LOWORD(wParam)==IDC_FILE_SEND_EXTRA_ADDRESS || LOWORD(wParam)==IDC_FILE_SEND_BLOCK_SIZE) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_FILE_SEND_EXTRA_ADDRESS || LOWORD(wParam)==IDC_FILE_SEND_BLOCK_SIZE) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/MraPopUp.cpp b/protocols/MRA/MraPopUp.cpp
index ec3893aea5..79a8664e01 100644
--- a/protocols/MRA/MraPopUp.cpp
+++ b/protocols/MRA/MraPopUp.cpp
@@ -112,7 +112,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TIMEOUT), bEnabled);
}
default:
- if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
+ if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return(FALSE);
SendMessage(GetParent(hWndDlg), PSM_CHANGED, 0, 0);
}
diff --git a/protocols/MRA/Mra_options.cpp b/protocols/MRA/Mra_options.cpp
index 97e1aa1b91..137b347f1c 100644
--- a/protocols/MRA/Mra_options.cpp
+++ b/protocols/MRA/Mra_options.cpp
@@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg,UINT msg,WPARAM wParam,LPARAM l
CallService(MS_UTILS_OPENURL,TRUE,(LPARAM)MRA_FORGOT_PASSWORD_URL);
return(TRUE);
}
- if ((LOWORD(wParam)==IDC_LOGIN || LOWORD(wParam)==IDC_PASSWORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return 0;
+ if ((LOWORD(wParam)==IDC_LOGIN || LOWORD(wParam)==IDC_PASSWORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
@@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
break;
}
- if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/Mra_svcs.cpp b/protocols/MRA/Mra_svcs.cpp
index cb194fb575..896d33ae82 100644
--- a/protocols/MRA/Mra_svcs.cpp
+++ b/protocols/MRA/Mra_svcs.cpp
@@ -983,7 +983,7 @@ INT_PTR MraSetListeningTo(WPARAM wParam,LPARAM lParam)
{
LISTENINGTOINFO *pliInfo=(LISTENINGTOINFO*)lParam;
- if ( pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO) )
+ if ( pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO))
{
MraSendCommand_ChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC,NULL,0,0);
DB_Mra_DeleteValue(NULL,DBSETTING_BLOGSTATUSMUSIC);
@@ -1744,7 +1744,7 @@ INT_PTR MraAddToListByEvent(WPARAM wParam,LPARAM lParam)
LPSTR lpszRequestReason;
MRA_LPS lpsEMail,lpsNick,lpsFirstName,lpsLastName;
- lpsNick.lpszData=(LPSTR)(dbei.pBlob+ ((dbei.eventType==EVENTTYPE_AUTHREQUEST)?(sizeof(DWORD)*2):0) );
+ lpsNick.lpszData=(LPSTR)(dbei.pBlob+ ((dbei.eventType==EVENTTYPE_AUTHREQUEST)?(sizeof(DWORD)*2):0));
lpsNick.dwSize=lstrlenA(lpsNick.lpszData);
lpsFirstName.lpszData=lpsNick.lpszData+lpsNick.dwSize+1;
lpsFirstName.dwSize=lstrlenA(lpsFirstName.lpszData);
diff --git a/protocols/MRA/Readme_MRA.txt b/protocols/MRA/Readme_MRA.txt
index a0904565a9..d94ee81399 100644
--- a/protocols/MRA/Readme_MRA.txt
+++ b/protocols/MRA/Readme_MRA.txt
@@ -330,7 +330,7 @@ Version 1.8.0.27 // 2007.02.24
Version 1.8.0.25 // 2007.02.20
- Èïîëüçóþòñÿ íîâûå ñåðâèñû ìèðàíäû (ìèíèìóì 0.6.0.100 âåðñèÿ)
- Óëó÷øåíà ðàáîòà ñ ñåòüþ: äîáàâëåíû òàéìàóòû îïåðàöèé
- - Äîáàâëåíà ïîääåðæêà èãð (ñîáåñåäíèê ïîëó÷àåò îòêàç àâòîìàòè÷åñêè :) )
+ - Äîáàâëåíà ïîääåðæêà èãð (ñîáåñåäíèê ïîëó÷àåò îòêàç àâòîìàòè÷åñêè :))
- Äîáàâëåíû óâåäîìëåíèÿ, â òîì ÷èñëå çàòðàãèâàþùèå íåâèäèìîñòü
- Äîáàâëåíà îïöèÿ: Smart RTF - Óìíàÿ îòïðàâêà (òîëüêî åñëè êëèåíò ïîíèìàåò RTF)
- Äîáàâëåíû êîäû è ïîäðîáíûå îïèñàíèÿ îøèáîê
diff --git a/protocols/MSN/msn_proto.cpp b/protocols/MSN/msn_proto.cpp
index 10d2ba701d..d10a5b2905 100644
--- a/protocols/MSN/msn_proto.cpp
+++ b/protocols/MSN/msn_proto.cpp
@@ -86,11 +86,8 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
CreateProtoService(MSN_GETUNREAD_EMAILCOUNT, &CMsnProto::GetUnreadEmailCount);
- // service to get from protocol chat buddy info
-// CreateProtoService(MS_GC_PROTO_GETTOOLTIPTEXT, &CMsnProto::GCGetToolTipText);
-
+ // event hooks
HookProtoEvent(ME_MSG_WINDOWPOPUP, &CMsnProto::OnWindowPopup);
-// HookProtoEvent(ME_MSG_WINDOWEVENT, &CMsnProto::OnWindowEvent);
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMsnProto::OnGroupChange);
HookProtoEvent(ME_OPT_INITIALISE, &CMsnProto::OnOptionsInit);
HookProtoEvent(ME_CLIST_DOUBLECLICKED, &CMsnProto::OnContactDoubleClicked);
@@ -106,7 +103,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
deleteSetting(hContact, "IdleTS");
deleteSetting(hContact, "p2pMsgId");
deleteSetting(hContact, "AccList");
-// DBDeleteContactSetting(hContact, "CList", "StatusMsg");
}
hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0);
}
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp
index 27c6dce34f..cad76293e0 100644
--- a/protocols/NewsAggregator/Src/Utils.cpp
+++ b/protocols/NewsAggregator/Src/Utils.cpp
@@ -322,7 +322,7 @@ time_t __stdcall DateToUnixTime(TCHAR* stamp, BOOL FeedType)
// skip '-' chars
int si = 0, sj = 0;
while (1) {
- if ( p[si] == _T('-') )
+ if ( p[si] == _T('-'))
si++;
else
if ( !( p[sj++] = p[si++] ))
diff --git a/protocols/Omegle/chat.cpp b/protocols/Omegle/chat.cpp
index b69a41bf50..7b16ccdfc3 100644
--- a/protocols/Omegle/chat.cpp
+++ b/protocols/Omegle/chat.cpp
@@ -106,7 +106,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
if (params.empty()) {
// Load last question
DBVARIANT dbv;
- if ( !getU8String( OMEGLE_KEY_LAST_QUESTION,&dbv ) ) {
+ if ( !getU8String( OMEGLE_KEY_LAST_QUESTION,&dbv )) {
params = dbv.pszVal;
DBFreeVariant(&dbv);
}
@@ -119,7 +119,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
// Save actual question as last question
if (strlen(params.c_str()) >= OMEGLE_QUESTION_MIN_LENGTH)
{
- setU8String( OMEGLE_KEY_LAST_QUESTION, params.c_str() );
+ setU8String( OMEGLE_KEY_LAST_QUESTION, params.c_str());
}
}
@@ -137,7 +137,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
else if (!stricmp(command.c_str(), "asl"))
{
DBVARIANT dbv;
- if ( !getU8String( OMEGLE_KEY_ASL,&dbv ) ) {
+ if ( !getU8String( OMEGLE_KEY_ASL,&dbv )) {
text = dbv.pszVal;
DBFreeVariant(&dbv);
} else {
@@ -299,10 +299,10 @@ int OmegleProto::OnJoinChat(WPARAM,LPARAM suppress)
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
SetTopic();
@@ -367,7 +367,7 @@ void OmegleProto::SetChatStatus(int status)
// Load actual name from database
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, m_szModuleName, OMEGLE_KEY_NAME, &dbv) )
+ if ( !DBGetContactSettingTString(NULL, m_szModuleName, OMEGLE_KEY_NAME, &dbv))
{
facy.nick_ = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/communication.cpp b/protocols/Omegle/communication.cpp
index fc3f12d5e0..4177eeae77 100644
--- a/protocols/Omegle/communication.cpp
+++ b/protocols/Omegle/communication.cpp
@@ -237,8 +237,8 @@ std::string Omegle_client::choose_action( int request_type, std::string* data, s
std::string Omegle_client::choose_request_url( int request_type, std::string* data, std::string* get_data )
{
std::string url = "";
- url.append( choose_server( request_type, data, get_data ) );
- url.append( choose_action( request_type, data, get_data ) );
+ url.append( choose_server( request_type, data, get_data ));
+ url.append( choose_action( request_type, data, get_data ));
return url;
}
@@ -263,7 +263,7 @@ NETLIBHTTPHEADER* Omegle_client::get_request_headers( int request_type, int* hea
break;
}
- NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ) );
+ NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ));
switch ( request_type )
{
@@ -300,7 +300,7 @@ void Omegle_client::store_headers( http::response* resp, NETLIBHTTPHEADER* heade
std::string header_value = headers[i].szValue;
// TODO RM: (un)comment
- //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str() );
+ //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str());
resp->headers[header_name] = header_value;
}
}
@@ -330,7 +330,7 @@ bool Omegle_client::start()
data += DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_REUSE_QUESTION, 0) ? "1" : "0";
}
}
- else if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_MEET_COMMON, 0) )
+ else if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_MEET_COMMON, 0))
{
DBVARIANT dbv;
if (!DBGetContactSettingUTF8String(NULL, parent->m_szModuleName, OMEGLE_KEY_INTERESTS, &dbv))
@@ -404,7 +404,7 @@ bool Omegle_client::start()
case HTTP_CODE_FAKE_DISCONNECTED:
{
// If is is only timeout error, try login once more
- if ( handle_error( "start" ) )
+ if ( handle_error( "start" ))
return start();
else
return false;
@@ -429,7 +429,7 @@ bool Omegle_client::start()
bool Omegle_client::stop( )
{
- if ( parent->isOffline() )
+ if ( parent->isOffline())
return true;
handle_entry( "stop" );
@@ -498,7 +498,7 @@ bool Omegle_client::events( )
// We got info about count of connected people there
pos += 9;
- std::string count = utils::text::trim( resp.data.substr(pos, resp.data.find("]", pos) - pos) );
+ std::string count = utils::text::trim( resp.data.substr(pos, resp.data.find("]", pos) - pos));
char str[255];
mir_snprintf(str, sizeof(str), Translate("On whole Omegle are %s strangers online now."), count.c_str());
@@ -543,7 +543,7 @@ bool Omegle_client::events( )
std::string question = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
TCHAR *msg = mir_a2t_cp(question.c_str(),CP_UTF8);
parent->SetTopic(msg);
@@ -571,7 +571,7 @@ bool Omegle_client::events( )
std::string message = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
if (state_ == STATE_ACTIVE) {
TCHAR *msg = mir_a2t_cp(message.c_str(),CP_UTF8);
@@ -592,7 +592,7 @@ bool Omegle_client::events( )
message = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( message ) ) );
+ utils::text::slashu_to_utf8( message )) );
stranger = Translate(stranger.c_str());
@@ -623,7 +623,7 @@ bool Omegle_client::events( )
std::string stranger = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
char str[255];
mir_snprintf(str, sizeof(str), Translate("%s disconnected."), Translate(stranger.c_str()));
@@ -659,7 +659,7 @@ bool Omegle_client::events( )
std::string error = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
error = Translate("Error: ") + error;
@@ -670,9 +670,9 @@ bool Omegle_client::events( )
if (newStranger && state_ != STATE_SPY) {
// We got new stranger in this event, lets say him "Hi message" if enabled
- if ( DBGetContactSettingByte( NULL, parent->m_szModuleName, OMEGLE_KEY_HI_ENABLED, 0 ) ) {
+ if ( DBGetContactSettingByte( NULL, parent->m_szModuleName, OMEGLE_KEY_HI_ENABLED, 0 )) {
DBVARIANT dbv;
- if ( !DBGetContactSettingUTF8String( NULL, parent->m_szModuleName, OMEGLE_KEY_HI, &dbv ) ) {
+ if ( !DBGetContactSettingUTF8String( NULL, parent->m_szModuleName, OMEGLE_KEY_HI, &dbv )) {
std::string *message = new std::string(dbv.pszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/connection.cpp b/protocols/Omegle/connection.cpp
index f5c3b9d6b6..1ce07385d9 100644
--- a/protocols/Omegle/connection.cpp
+++ b/protocols/Omegle/connection.cpp
@@ -34,7 +34,7 @@ void OmegleProto::SignOn(void*)
m_iStatus = m_iDesiredStatus;
ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
- setDword( "LogonTS", (DWORD)time(NULL) );
+ setDword( "LogonTS", (DWORD)time(NULL));
ClearChat();
OnJoinChat(0,false);
@@ -167,9 +167,9 @@ void OmegleProto::EventsLoop(void *)
time_t tim = ::time(NULL);
LOG( ">>>>> Entering Omegle::EventsLoop[%d]", tim );
- while ( facy.events() )
+ while ( facy.events())
{
- if ( facy.state_ == STATE_INACTIVE || facy.state_ == STATE_DISCONNECTING || !isOnline() )
+ if ( facy.state_ == STATE_INACTIVE || facy.state_ == STATE_DISCONNECTING || !isOnline())
break;
LOG( "***** OmegleProto::EventsLoop[%d] refreshing...", tim );
}
diff --git a/protocols/Omegle/dialogs.cpp b/protocols/Omegle/dialogs.cpp
index c96f46dffa..8045ea2e43 100644
--- a/protocols/Omegle/dialogs.cpp
+++ b/protocols/Omegle/dialogs.cpp
@@ -39,7 +39,7 @@ static BOOL StoreDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const ch
static void LoadDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting)
{
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, ppro->m_szModuleName, szSetting, &dbv) )
+ if ( !DBGetContactSettingTString(NULL, ppro->m_szModuleName, szSetting, &dbv))
{
SetDlgItemText(hwnd, idCtrl, dbv.ptszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/main.cpp b/protocols/Omegle/main.cpp
index aa34e0eeaf..14a5cb4426 100644
--- a/protocols/Omegle/main.cpp
+++ b/protocols/Omegle/main.cpp
@@ -97,7 +97,7 @@ static int protoUninit(PROTO_INTERFACE* proto)
int OnModulesLoaded(WPARAM,LPARAM)
{
- if ( ServiceExists( MS_UPDATE_REGISTER ) )
+ if ( ServiceExists( MS_UPDATE_REGISTER ))
{
Update upd = {sizeof(upd)};
char curr_version[30];
@@ -113,7 +113,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
#else
upd.szBetaUpdateURL = "http://robyer.info/stahni/omegle.zip";
#endif
- upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -132,7 +132,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/protocols/Omegle/messages.cpp b/protocols/Omegle/messages.cpp
index 7d2418f3e6..b90ff67579 100644
--- a/protocols/Omegle/messages.cpp
+++ b/protocols/Omegle/messages.cpp
@@ -86,7 +86,7 @@ int OmegleProto::SendMsg(HANDLE hContact, int flags, const char *msg)
msg = mir_utf8encode(msg);
facy.msgid_ = (facy.msgid_ % 1024)+1;
- ForkThread( &OmegleProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_) );
+ ForkThread( &OmegleProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_));
return facy.msgid_;*/
return 0;
}
diff --git a/protocols/Omegle/proto.cpp b/protocols/Omegle/proto.cpp
index b91cc72f23..51e4bdf599 100644
--- a/protocols/Omegle/proto.cpp
+++ b/protocols/Omegle/proto.cpp
@@ -61,9 +61,9 @@ OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username)
facy.set_handle(m_hNetlibUser);
- SkinAddNewSoundExT( "StrangerTyp", m_tszUserName, LPGENT( "Stranger typing" ) );
- SkinAddNewSoundExT( "StrangerTypStop", m_tszUserName, LPGENT( "Stranger stopped typing" ) );
- SkinAddNewSoundExT( "StrangerChange", m_tszUserName, LPGENT( "Changing stranger" ) );
+ SkinAddNewSoundExT( "StrangerTyp", m_tszUserName, LPGENT( "Stranger typing" ));
+ SkinAddNewSoundExT( "StrangerTypStop", m_tszUserName, LPGENT( "Stranger stopped typing" ));
+ SkinAddNewSoundExT( "StrangerChange", m_tszUserName, LPGENT( "Changing stranger" ));
}
OmegleProto::~OmegleProto( )
@@ -245,7 +245,7 @@ int OmegleProto::OnContactDeleted(WPARAM wparam,LPARAM)
/*bool OmegleProto::IsMyContact(HANDLE hContact, bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if ( proto && strcmp(m_szModuleName,proto) == 0 )
{
diff --git a/protocols/Omegle/theme.cpp b/protocols/Omegle/theme.cpp
index 740d16277e..73ef80a46c 100644
--- a/protocols/Omegle/theme.cpp
+++ b/protocols/Omegle/theme.cpp
@@ -95,7 +95,7 @@ HANDLE GetIconHandle(const char* name)
static OmegleProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if (!proto)
return 0;
diff --git a/protocols/Omegle/utils.cpp b/protocols/Omegle/utils.cpp
index 975ab7df4c..f524dcfba1 100644
--- a/protocols/Omegle/utils.cpp
+++ b/protocols/Omegle/utils.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
@@ -36,7 +36,7 @@ void utils::text::replace_first( std::string* data, std::string from, std::strin
{
std::string::size_type position = 0;
- if ( ( position = data->find(from, position) ) != std::string::npos )
+ if ( ( position = data->find(from, position)) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -47,7 +47,7 @@ void utils::text::replace_all( std::string* data, std::string from, std::string
{
std::string::size_type position = 0;
- while ( ( position = data->find( from, position ) ) != std::string::npos )
+ while ( ( position = data->find( from, position )) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -77,14 +77,14 @@ std::string utils::text::slashu_to_utf8( std::string data )
if ( udn >= 128 && udn <= 2047 )
{ // U+0080 .. U+07FF
- new_string += ( char )( 192 + ( udn / 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 192 + ( udn / 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn >= 2048 && udn <= 65535 )
{ // U+0800 .. U+FFFF
- new_string += ( char )( 224 + ( udn / 4096 ) );
- new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 224 + ( udn / 4096 ));
+ new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn <= 127 )
{ // U+0000 .. U+007F (should not appear)
@@ -115,7 +115,7 @@ int utils::debug::log(std::string file_name, std::string text)
char szFile[MAX_PATH];
GetModuleFileNameA(g_hInstance, szFile, SIZEOF(szFile));
std::string path = szFile;
- path = path.substr( 0, path.rfind( "\\" ) );
+ path = path.substr( 0, path.rfind( "\\" ));
path = path.substr( 0, path.rfind( "\\" ) + 1 );
path = path + file_name.c_str() + ".txt";
diff --git a/protocols/Twitter/chat.cpp b/protocols/Twitter/chat.cpp
index d00261b41d..f430bdf5d0 100644
--- a/protocols/Twitter/chat.cpp
+++ b/protocols/Twitter/chat.cpp
@@ -44,7 +44,7 @@ void TwitterProto::UpdateChat(const twitter_user &update)
DBVARIANT nick;
HANDLE hContact = UsernameToHContact(update.username.c_str());
- if(hContact && !DBGetContactSettingString(hContact,"CList","MyHandle",&nick) )
+ if(hContact && !DBGetContactSettingString(hContact,"CList","MyHandle",&nick))
{
gce.ptszNick = mir_a2t(nick.pszVal);
DBFreeVariant(&nick);
@@ -88,7 +88,7 @@ int TwitterProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
case GC_USER_PRIVMESS:
text = mir_t2a(hook->ptszUID);
CallService(MS_MSG_SENDMESSAGE,reinterpret_cast<WPARAM>(
- UsernameToHContact(text) ),0);
+ UsernameToHContact(text)),0);
mir_free(text);
break;
}
@@ -205,16 +205,16 @@ void TwitterProto::SetChatStatus(int status)
// Add all friends to contact list
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT uid,nick;
- if( DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&uid) )
+ if( DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&uid))
continue;
- if( !DBGetContactSettingString(hContact,"CList","MyHandle",&nick) )
+ if( !DBGetContactSettingString(hContact,"CList","MyHandle",&nick))
AddChatContact(uid.pszVal,nick.pszVal);
else
AddChatContact(uid.pszVal);
diff --git a/protocols/Twitter/connection.cpp b/protocols/Twitter/connection.cpp
index 02d2244081..3a91be3243 100644
--- a/protocols/Twitter/connection.cpp
+++ b/protocols/Twitter/connection.cpp
@@ -135,7 +135,7 @@ bool TwitterProto::NegotiateConnection()
}
- if((oauthToken.size() <= 1) || (oauthTokenSecret.size() <= 1) ) {
+ if((oauthToken.size() <= 1) || (oauthTokenSecret.size() <= 1)) {
// first, reset all the keys so we can start fresh
resetOAuthKeys();
LOG( _T("**NegotiateConnection - Reset OAuth Keys"));
@@ -294,7 +294,7 @@ bool TwitterProto::NegotiateConnection()
}
}
-/* if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_PASS,&dbv) ) {
+/* if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_PASS,&dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
pass = dbv.pszVal;
@@ -305,7 +305,7 @@ bool TwitterProto::NegotiateConnection()
return false;
}*/
- if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_BASEURL,&dbv))
{
ScopedLock s(twitter_lock_);
twit_.set_base_url(dbv.pszVal);
@@ -423,7 +423,7 @@ void TwitterProto::UpdateAvatarWorker(void *p)
{
if(p == 0)
return;
- std::auto_ptr<update_avatar> data( static_cast<update_avatar*>(p) );
+ std::auto_ptr<update_avatar> data( static_cast<update_avatar*>(p));
DBVARIANT dbv;
if(DBGetContactSettingTString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
@@ -472,7 +472,7 @@ void TwitterProto::UpdateAvatar(HANDLE hContact,const std::string &url,bool forc
if( !force &&
( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_AV_URL,&dbv) &&
- url == dbv.pszVal) )
+ url == dbv.pszVal))
{
LOG( _T("***** Avatar already up-to-date: %s"), url.c_str());
}
@@ -527,7 +527,7 @@ void TwitterProto::UpdateFriends()
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating friends list, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating friends list: %s"), e.what());
}
@@ -554,7 +554,7 @@ void TwitterProto::ShowContactPopup(HANDLE hContact,const std::string &text)
DBVARIANT dbv;
if( !DBGetContactSettingString(hContact,"CList","MyHandle",&dbv) ||
- !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
mbcs_to_tcs(CP_UTF8,dbv.pszVal,popup.lptzContactName,MAX_CONTACTNAME);
DBFreeVariant(&dbv);
@@ -623,7 +623,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg)
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating status messages, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating status messages: %s"), e.what());
}
}
@@ -675,7 +675,7 @@ void TwitterProto::UpdateMessages(bool pre_read)
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating direct messages, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating direct messages: %s"), e.what());
}
}
diff --git a/protocols/Twitter/contacts.cpp b/protocols/Twitter/contacts.cpp
index a2245c021a..ec75795694 100644
--- a/protocols/Twitter/contacts.cpp
+++ b/protocols/Twitter/contacts.cpp
@@ -61,7 +61,7 @@ void TwitterProto::UpdateInfoWorker(void *hContact)
std::string username;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
username = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -129,7 +129,7 @@ void TwitterProto::DoSearch(void *p)
catch(const std::exception &e)
{
ShowPopup( (std::string("While searching for contacts, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error searching for contacts: %s"), e.what());
}
@@ -195,7 +195,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
return 0;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
if(in_chat_)
DeleteChatContact(dbv.pszVal);
@@ -212,7 +212,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
bool TwitterProto::IsMyContact(HANDLE hContact,bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(proto && strcmp(m_szModuleName,proto) == 0)
{
@@ -229,13 +229,13 @@ HANDLE TwitterProto::UsernameToHContact(const char *name)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
if(strcmp(name,dbv.pszVal) == 0)
{
@@ -274,7 +274,7 @@ HANDLE TwitterProto::AddToClientList(const char *name,const char *status)
DBWriteContactSettingString (hContact,m_szModuleName,"Homepage",url.c_str());
DBVARIANT dbv;
- if( !DBGetContactSettingTString(NULL,m_szModuleName,TWITTER_KEY_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(NULL,m_szModuleName,TWITTER_KEY_GROUP,&dbv))
{
DBWriteContactSettingTString(hContact,"CList","Group",dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -294,7 +294,7 @@ void TwitterProto::SetAllContactStatuses(int status)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
diff --git a/protocols/Twitter/http.cpp b/protocols/Twitter/http.cpp
index ef295f4ab0..877399cc11 100644
--- a/protocols/Twitter/http.cpp
+++ b/protocols/Twitter/http.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string http::url_encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp
index 1aeac73b83..2c3c663156 100644
--- a/protocols/Twitter/main.cpp
+++ b/protocols/Twitter/main.cpp
@@ -109,7 +109,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
upd.cpbBetaVersionPrefix = (int)strlen(reinterpret_cast<char*>(upd.pbBetaVersionPrefix));
upd.szBetaUpdateURL = "http://twosx.net/mim/twitter/updater/twitter.zip";
- upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -129,7 +129,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = {sizeof(pd)};
pd.szName = "Twitter";
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp
index 60f802d77c..d81fe8163c 100644
--- a/protocols/Twitter/proto.cpp
+++ b/protocols/Twitter/proto.cpp
@@ -167,7 +167,7 @@ void TwitterProto::SendSuccess(void *p)
send_direct *data = static_cast<send_direct*>(p);
DBVARIANT dbv;
- if( !DBGetContactSettingString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
ScopedLock s(twitter_lock_);
twit_.send_direct(dbv.pszVal,data->msg);
@@ -283,7 +283,7 @@ int TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM lParam)
(HWND)0,tweet_proc,reinterpret_cast<LPARAM>(this));
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
SendMessage(hDlg,WM_SETREPLY,reinterpret_cast<WPARAM>(dbv.pszVal),0);
DBFreeVariant(&dbv);
@@ -299,7 +299,7 @@ int TwitterProto::VisitHomepage(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv))
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>(dbv.pszVal));
DBFreeVariant(&dbv);
@@ -307,7 +307,7 @@ int TwitterProto::VisitHomepage(WPARAM wParam,LPARAM lParam)
else
{
// TODO: remove this
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
std::string url = profile_base_url(twit_.get_base_url())+
http::url_encode(dbv.pszVal);
@@ -560,7 +560,7 @@ void TwitterProto::UpdateSettings()
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact,true))
continue;
diff --git a/protocols/Twitter/theme.cpp b/protocols/Twitter/theme.cpp
index d6f0be38bb..f17e7d700a 100644
--- a/protocols/Twitter/theme.cpp
+++ b/protocols/Twitter/theme.cpp
@@ -104,7 +104,7 @@ static HANDLE g_hMenuEvts[3];
static TwitterProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(!proto)
return 0;
diff --git a/protocols/Twitter/twitter.cpp b/protocols/Twitter/twitter.cpp
index ff260f9fbd..b9a6c7242b 100644
--- a/protocols/Twitter/twitter.cpp
+++ b/protocols/Twitter/twitter.cpp
@@ -65,14 +65,14 @@ static T retrieve(const js::object &o,const std::string &key,bool allow_null = f
js::object::const_iterator i = o.find(key);
if(i == o.end())
- throw std::exception( ("unable to retrieve key '"+key+"'").c_str() );
+ throw std::exception( ("unable to retrieve key '"+key+"'").c_str());
try
{
return cast_and_decode<T>(*i->second,allow_null);
}
catch(const boost::bad_any_cast &)
{
- throw std::exception( ("unable to cast key '"+key+"' to target type").c_str() );
+ throw std::exception( ("unable to cast key '"+key+"' to target type").c_str());
}
}
@@ -128,7 +128,7 @@ std::vector<twitter_user> twitter::get_friends()
if(resp.code != 200)
throw bad_response();
- const js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ const js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -173,7 +173,7 @@ bool twitter::get_info(const std::string &name,twitter_user *info)
if(resp.code != 200)
throw bad_response();
- const js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ const js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() == typeid(js::object))
{
const js::object &user_info = boost::any_cast<js::object>(*var);
@@ -201,7 +201,7 @@ bool twitter::get_info_by_email(const std::string &email,twitter_user *info)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() == typeid(js::object))
{
const js::object &user_info = boost::any_cast<js::object>(*var);
@@ -227,7 +227,7 @@ twitter_user twitter::add_friend(const std::string &name)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::object))
throw std::exception("unable to parse response");
@@ -293,7 +293,7 @@ std::vector<twitter_user> twitter::get_statuses(int count,twitter_id id)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -347,7 +347,7 @@ std::vector<twitter_user> twitter::get_direct(twitter_id id)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -392,7 +392,7 @@ string twitter::urlencode(const string &c)
else
{
escaped.append("%");
- escaped.append( char2hex(c[i]) );//converts char 255 to string "FF"
+ escaped.append( char2hex(c[i]));//converts char 255 to string "FF"
}
}
return escaped;
diff --git a/protocols/Twitter/twitter.h b/protocols/Twitter/twitter.h
index 54baa768f7..10c1115967 100644
--- a/protocols/Twitter/twitter.h
+++ b/protocols/Twitter/twitter.h
@@ -101,7 +101,7 @@ public:
protected:
virtual http::response slurp(const std::string &,http::method,
- OAuthParameters postParams = OAuthParameters() ) = 0;
+ OAuthParameters postParams = OAuthParameters()) = 0;
std::string username_;
std::string password_;
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp
index 872d5feb1e..149c0b2780 100644
--- a/protocols/Twitter/ui.cpp
+++ b/protocols/Twitter/ui.cpp
@@ -42,7 +42,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
DBVARIANT dbv;
- if( !DBGetContactSettingTString(0,proto->ModuleName(),TWITTER_KEY_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(0,proto->ModuleName(),TWITTER_KEY_GROUP,&dbv))
{
SetDlgItemText(hwndDlg,IDC_GROUP,dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -52,13 +52,13 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
SetDlgItemText(hwndDlg,IDC_GROUP,L"Twitter");
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_USERNAME,dbv.pszVal);
DBFreeVariant(&dbv);
}
- /*if ( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv) )
+ /*if ( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -71,7 +71,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
SendDlgItemMessage(hwndDlg,IDC_SERVER,CB_ADDSTRING,0,
reinterpret_cast<LPARAM>(sites[i]));
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_SERVER,dbv.pszVal);
DBFreeVariant(&dbv);
@@ -86,7 +86,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
if(LOWORD(wParam) == IDC_NEWACCOUNTLINK)
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ("http://twitter.com/signup") );
+ ("http://twitter.com/signup"));
return true;
}
@@ -218,13 +218,13 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
proto = reinterpret_cast<TwitterProto*>(lParam);
DBVARIANT dbv;
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- /*if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv) )
+ /*if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -241,7 +241,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
reinterpret_cast<LPARAM>(sites[i]));
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_BASEURL,dbv.pszVal);
DBFreeVariant(&dbv);
@@ -253,7 +253,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
char pollrate_str[32];
mir_snprintf(pollrate_str,sizeof(pollrate_str),"%d",
- DBGetContactSettingDword(0,proto->ModuleName(),TWITTER_KEY_POLLRATE,80) );
+ DBGetContactSettingDword(0,proto->ModuleName(),TWITTER_KEY_POLLRATE,80));
SetDlgItemTextA(hwndDlg,IDC_POLLRATE,pollrate_str);
CheckDlgButton(hwndDlg,IDC_TWEET_MSG,DBGetContactSettingByte(0,
@@ -440,9 +440,9 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
proto = reinterpret_cast<TwitterProto*>(lParam);
CheckAndUpdateDlgButton(hwndDlg,IDC_SHOWPOPUPS,
- db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0) );
+ db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0));
CheckDlgButton(hwndDlg,IDC_NOSIGNONPOPUPS,
- !db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0) );
+ !db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0));
// ***** Get color information
@@ -491,7 +491,7 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
{
case IDC_SHOWPOPUPS:
EnableWindow(GetDlgItem(hwndDlg,IDC_NOSIGNONPOPUPS),
- IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS) );
+ IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS));
break;
case IDC_COL_CUSTOM:
diff --git a/protocols/Twitter/utility.cpp b/protocols/Twitter/utility.cpp
index 3b98944bba..090bfebf09 100644
--- a/protocols/Twitter/utility.cpp
+++ b/protocols/Twitter/utility.cpp
@@ -132,7 +132,7 @@ http::response mir_twitter::slurp(const std::string &url,http::method meth,
http::response resp_data;
LOG("**SLURP - just before calling HTTPTRANSACTION");
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(handle_), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(handle_), reinterpret_cast<LPARAM>(&req)));
LOG("**SLURP - HTTPTRANSACTION complete.");
if(resp)
{
@@ -182,7 +182,7 @@ bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename
req.szUrl = const_cast<char*>(url.c_str());
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(hNetlib), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(hNetlib), reinterpret_cast<LPARAM>(&req)));
if (resp)
{
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp
index ad51c93a01..6fc059caa6 100644
--- a/protocols/Weather/weather.cpp
+++ b/protocols/Weather/weather.cpp
@@ -280,8 +280,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
DBWriteContactSettingString(NULL, "KnownModules", "Weather Protocol", "Weather,WeatherCondition,Current");
// add sound event
- SkinAddNewSound("weatherupdated", Translate("Weather Condition Changed"), "");
- SkinAddNewSound("weatheralert", Translate("Weather Alert Issued"), "");
+ SkinAddNewSoundEx("weatherupdated", NULL, LPGEN("Weather Condition Changed"));
+ SkinAddNewSoundEx("weatheralert", NULL, LPGEN("Weather Alert Issued"));
// window needed for popup commands
TCHAR SvcFunc[100];
diff --git a/protocols/YAMN/browser/mailbrowser.cpp b/protocols/YAMN/browser/mailbrowser.cpp
index 82f4d7eac0..02766e983c 100644
--- a/protocols/YAMN/browser/mailbrowser.cpp
+++ b/protocols/YAMN/browser/mailbrowser.cpp
@@ -405,7 +405,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags)
if ( (nflags & YAMN_ACC_POP) &&
(ActualAccount->Flags & YAMN_ACC_POPN) &&
- (MN.Real.PopUpNC+MN.Virtual.PopUpNC) ) //if some popups with mails are needed to show
+ (MN.Real.PopUpNC+MN.Virtual.PopUpNC)) //if some popups with mails are needed to show
RunPopUps=TRUE;
else RunPopUps=FALSE;
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp
index 184fe0e3e1..e876465609 100644
--- a/protocols/YAMN/main.cpp
+++ b/protocols/YAMN/main.cpp
@@ -54,22 +54,6 @@ PLUGININFOEX pluginInfo = {
};
-SKINSOUNDDESC NewMailSound =
-{
- sizeof(SKINSOUNDDESC),
- YAMN_NEWMAILSOUND, //name to refer to sound when playing and in db
- YAMN_NEWMAILSNDDESC, //description for options dialog
- "", //default sound file to use, without path
-};
-
-SKINSOUNDDESC ConnectFailureSound =
-{
- sizeof(SKINSOUNDDESC),
- YAMN_CONNECTFAILSOUND, //name to refer to sound when playing and in db
- YAMN_CONNECTFAILSNDDESC, //description for options dialog
- "", //default sound file to use, without path
-};
-
HANDLE hNewMailHook;
HANDLE NoWriterEV;
HANDLE hTTButton, hTButton;
@@ -468,9 +452,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
if (NULL == (ExitEV = CreateEvent(NULL, TRUE, FALSE, NULL)))
return 1;
- NewMailSound.pszDescription = Translate(YAMN_NEWMAILSNDDESC);
- ConnectFailureSound.pszDescription = Translate(YAMN_CONNECTFAILSNDDESC);
-
PosX = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBPOSX, 0);
PosY = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBPOSY, 0);
SizeX = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBSIZEX, 800);
@@ -498,8 +479,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
CreateServiceFunctions();
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&NewMailSound);
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ConnectFailureSound);
+ SkinAddNewSoundEx(YAMN_NEWMAILSOUND, YAMN_DBMODULE, YAMN_NEWMAILSNDDESC);
+ SkinAddNewSoundEx(YAMN_CONNECTFAILSOUND, YAMN_DBMODULE, YAMN_CONNECTFAILSNDDESC);
HookEvents();
diff --git a/protocols/YAMN/proto/pop3/pop3comm.cpp b/protocols/YAMN/proto/pop3/pop3comm.cpp
index dcd38ee2c8..f3120096bf 100644
--- a/protocols/YAMN/proto/pop3/pop3comm.cpp
+++ b/protocols/YAMN/proto/pop3/pop3comm.cpp
@@ -590,7 +590,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp)
DebugLog(CommFile,"<--------Communication-------->\n");
#endif
// if we are already connected, we have open session (another thread left us open session), so we don't need to login
- // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :) )
+ // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :))
if ((MyClient->NetClient==NULL) || !MyClient->NetClient->Connected())
{
SetAccountStatus(ActualAccount,TranslateT("Connecting to server"));
diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp
index 254acfd07f..3f263bf4c5 100644
--- a/protocols/Yahoo/avatar.cpp
+++ b/protocols/Yahoo/avatar.cpp
@@ -554,7 +554,7 @@ void CYahooProto::ext_got_picture_upload(const char *me, const char *url,unsigne
SetString(NULL, "AvatarURL", url);
//YAHOO_SetDword("AvatarExpires", ts);
- if (!GetString("AvatarInv", &dbv) ) {
+ if (!GetString("AvatarInv", &dbv)) {
LOG(("[ext_yahoo_got_picture_upload] Buddy: %s told us this is bad??", dbv.pszVal));
LOG(("[ext_yahoo_got_picture] Sending url: %s checksum: %d to '%s'!", url, cksum, dbv.pszVal));
diff --git a/protocols/Yahoo/file_transfer.cpp b/protocols/Yahoo/file_transfer.cpp
index 038ba3ea05..85f091b81c 100644
--- a/protocols/Yahoo/file_transfer.cpp
+++ b/protocols/Yahoo/file_transfer.cpp
@@ -653,7 +653,7 @@ void ext_yahoo_send_file7info(int id, const char *me, const char *who, const cha
PHOSTENT he = gethostbyname("relay.msg.yahoo.com");
if (he) {
- ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0]) );
+ ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0]));
LOG(("Got Relay IP: %s", ft->relay));
} else {
ft->relay = strdup( "98.136.112.33" );
diff --git a/protocols/Yahoo/http_gateway.cpp b/protocols/Yahoo/http_gateway.cpp
index 7d7cb37a73..e62219f108 100644
--- a/protocols/Yahoo/http_gateway.cpp
+++ b/protocols/Yahoo/http_gateway.cpp
@@ -21,7 +21,7 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE
DebugLog("YAHOO_httpGatewayInit!!!");
- ZeroMemory(&nlhpi, sizeof(nlhpi) );
+ ZeroMemory(&nlhpi, sizeof(nlhpi));
nlhpi.cbSize = sizeof(nlhpi);
nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";
@@ -71,7 +71,7 @@ PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, i
if (len == 4) {
*outBufLen = 0;
return buf;
- } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G') ) {
+ } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) {
MoveMemory( buf, buf + 4, len - 4);
*outBufLen = len-4;// we take off 4 bytes from the beginning
diff --git a/protocols/Yahoo/libyahoo2/libyahoo2.c b/protocols/Yahoo/libyahoo2/libyahoo2.c
index 558a355e94..77802f4ca2 100644
--- a/protocols/Yahoo/libyahoo2/libyahoo2.c
+++ b/protocols/Yahoo/libyahoo2/libyahoo2.c
@@ -406,7 +406,7 @@ const char *dbg_key(int key)
{
int i=0;
- while ((packet_keys[i].key >=0) && (packet_keys[i].key != key) )
+ while ((packet_keys[i].key >=0) && (packet_keys[i].key != key))
i++;
if (packet_keys[i].key != key)
@@ -419,7 +419,7 @@ const char *dbg_service(int key)
{
int i=0;
- while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key) )
+ while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key))
i++;
if (ymsg_service_vals[i].key != key)
@@ -1008,7 +1008,7 @@ static void yahoo_send_packet(struct yahoo_input_data *yid, struct yahoo_packet
( yid->type == YAHOO_CONNECTION_PAGER &&
( pkt->service == YAHOO_SERVICE_KEEPALIVE ||
pkt->service == YAHOO_SERVICE_PING ||
- pkt->service == YAHOO_SERVICE_LOGOFF) )
+ pkt->service == YAHOO_SERVICE_LOGOFF))
) {
yahoo_send_data(yid->fd, (const char *)data, len);
} else {
diff --git a/protocols/Yahoo/libyahoo2/yahoo_httplib.c b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
index c7bcb55858..7305157d83 100644
--- a/protocols/Yahoo/libyahoo2/yahoo_httplib.c
+++ b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
@@ -158,7 +158,7 @@ char *yahoo_urlencode(const char *instr)
char *str = NULL;
int len = strlen(instr);
- if (!(str = y_new(char, 3*len + 1) ))
+ if (!(str = y_new(char, 3*len + 1)))
return "";
while(instr[ipos]) {
@@ -188,7 +188,7 @@ char *yahoo_urldecode(const char *instr)
unsigned dec;
int len = strlen(instr);
- if (!(str = y_new(char, len+1) ))
+ if (!(str = y_new(char, len+1)))
return "";
while(instr[ipos]) {
@@ -235,7 +235,7 @@ char *yahoo_xmldecode(const char *instr)
unsigned dec;
int len = strlen(instr);
- if (!(str = y_new(char, len+1) ))
+ if (!(str = y_new(char, len+1)))
return "";
while(instr[ipos]) {
@@ -398,14 +398,14 @@ static void yahoo_got_url_fd(int id, int fd, int error, void *data)
break;
if ( !strncasecmp(buff, "Content-length:",
- strlen("Content-length:")) ) {
+ strlen("Content-length:"))) {
tmp = strrchr(buff, ' ');
if(tmp)
filesize = atol(tmp);
}
if ( !strncasecmp(buff, "Content-disposition:",
- strlen("Content-disposition:")) ) {
+ strlen("Content-disposition:"))) {
tmp = strstr(buff, "name=");
if(tmp) {
tmp+=strlen("name=");
diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp
index 6acd8c0dca..8ed3168650 100644
--- a/protocols/Yahoo/options.cpp
+++ b/protocols/Yahoo/options.cpp
@@ -182,7 +182,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar
SetDlgItemInt( hwndDlg, IDC_YAHOOPORT, ppro->GetWord( NULL, YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT ), FALSE );
- SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) );
+ SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ));
return TRUE;
case WM_COMMAND:
diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp
index 268bdc7358..1fc2ef8af8 100644
--- a/protocols/Yahoo/proto.cpp
+++ b/protocols/Yahoo/proto.cpp
@@ -198,7 +198,7 @@ HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDL
blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ),
last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
*/
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE));
+ memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
if (hContact != NULL) {
DebugLog("Temp Buddy found at: %p ", hContact);
@@ -236,7 +236,7 @@ int CYahooProto::Authorize( HANDLE hdbe )
return 1;
HANDLE hContact;
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE));
+ memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
/* Need to remove the buddy from our Miranda Lists */
@@ -848,7 +848,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
DBFreeVariant(&dbv);
}
- SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) );
+ SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ));
return TRUE;
}
diff --git a/protocols/Yahoo/server.cpp b/protocols/Yahoo/server.cpp
index 0de8fe2f5d..0a6886e037 100644
--- a/protocols/Yahoo/server.cpp
+++ b/protocols/Yahoo/server.cpp
@@ -144,7 +144,7 @@ void __cdecl CYahooProto::server_main(void *empty)
DebugLog("[SERVER] Got packets: %d", ylad->rpkts);
if ( m_bLoggedIn && ( (ylad->rpkts > 0 && (time(NULL) - lLastSend) >=3) ||
- ( (time(NULL) - lLastSend) >= 13) ) ) {
+ ( (time(NULL) - lLastSend) >= 13)) ) {
LOG(("[TIMER] Sending an idle message..."));
yahoo_send_idle_packet(m_id);
diff --git a/protocols/Yahoo/services.cpp b/protocols/Yahoo/services.cpp
index a6e7fa5012..363c000ad2 100644
--- a/protocols/Yahoo/services.cpp
+++ b/protocols/Yahoo/services.cpp
@@ -130,8 +130,8 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam
CYahooProto* ppro = ( CYahooProto* )lParam;
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam );
- SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true ) );
- SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" ) );
+ SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true ));
+ SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" ));
if ( !DBGetContactSettingString( NULL, ppro->m_szModuleName, YAHOO_CUSTSTATDB, &dbv )) {
SetDlgItemTextA( hwndDlg, IDC_CUSTSTAT, dbv. pszVal );
diff --git a/protocols/Yahoo/util.cpp b/protocols/Yahoo/util.cpp
index 197bc37497..6be9439380 100644
--- a/protocols/Yahoo/util.cpp
+++ b/protocols/Yahoo/util.cpp
@@ -29,7 +29,7 @@ void CYahooProto::YCreateService( const char* szService, YServiceFunc servicePro
len = snprintf(str, sizeof(str), "%s%s", m_szModuleName, szService);
- if (len >= sizeof(str) ) {
+ if (len >= sizeof(str)) {
DebugLog("[YCreateService] Failed Registering Service: %s. Reason: buffer too small?", szService);
return;
}
@@ -162,7 +162,7 @@ int CYahooProto::SendBroadcast( HANDLE hContact, int type, int result, HANDLE hP
{
ACKDATA ack;
- ZeroMemory(&ack, sizeof(ack) );
+ ZeroMemory(&ack, sizeof(ack));
ack.cbSize = sizeof( ACKDATA );
ack.szModule = m_szModuleName;
@@ -247,7 +247,7 @@ int CYahooProto::ShowPopup( const char* nickname, const char* msg, const char *s
if ( !ServiceExists( MS_POPUP_ADDPOPUPEX ))
return 0;
- ZeroMemory(&ppd, sizeof(ppd) );
+ ZeroMemory(&ppd, sizeof(ppd));
lstrcpyA( ppd.lpzContactName, nickname );
lstrcpyA( ppd.lpzText, msg );