summaryrefslogtreecommitdiff
path: root/plugins/ProxySwitch
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ProxySwitch')
-rw-r--r--plugins/ProxySwitch/src/main.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/ProxySwitch/src/main.cpp b/plugins/ProxySwitch/src/main.cpp
index d8ced5f0fe..470bb4ed80 100644
--- a/plugins/ProxySwitch/src/main.cpp
+++ b/plugins/ProxySwitch/src/main.cpp
@@ -104,15 +104,8 @@ static INT_PTR ProxyDisable(WPARAM, LPARAM)
static INT_PTR CopyIP2Clipboard(WPARAM, LPARAM, LPARAM idx)
{
mir_cslock lck(csNIF_List);
- if (g_arNIF[idx].IPcount == 0)
- return 0;
-
- if (!OpenClipboard(NULL))
- return 0;
-
- EmptyClipboard();
- SetClipboardData(CF_UNICODETEXT, (HANDLE)g_arNIF[idx].IPstr);
- CloseClipboard();
+ if (g_arNIF[idx].IPcount != 0)
+ Utils_ClipboardCopy(_A2T(g_arNIF[idx].IPstr));
return 0;
}