summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 6b32bf8c42..df1316ec8b 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -261,7 +261,10 @@ void __cdecl CIrcProto::ResolveIPThread(void *di)
bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg)
{
wchar_t szResponse[100];
- mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
+ if (pmsg->parameters.getCount() > 0)
+ mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
+ else
+ wcscpy(szResponse, L"PONG");
SendIrcMessage(szResponse);
return false;
}