Check for missing userInfo

pull/1431/head
mluto 2013-01-30 15:21:25 +01:00
parent e811037300
commit f2742c5b63
1 changed files with 5 additions and 0 deletions

View File

@ -473,6 +473,11 @@ function handleSuggestUserName(client, message)
function handleUserInfoUpdate(client, message) function handleUserInfoUpdate(client, message)
{ {
//check if all ok //check if all ok
if(message.data.userInfo == null)
{
messageLogger.warn("Dropped message, USERINFO_UPDATE Message has no userInfo!");
return;
}
if(message.data.userInfo.colorId == null) if(message.data.userInfo.colorId == null)
{ {
messageLogger.warn("Dropped message, USERINFO_UPDATE Message has no colorId!"); messageLogger.warn("Dropped message, USERINFO_UPDATE Message has no colorId!");