WickedShell/echelon — Issue #44: GUID Invalid
Author: FrikFry
Created: 2011-10-25 17:37:30+00:00
State: open

Everyone with cod servers is getting this issue because the guid checker does not have cases for cod1-7. This ought to resolve it:

function guidCheck($game, $guid) {
switch($game) {
case 'q3a':
return preg_match('/^[A-F0-9]{32}$/', $guid);
break;
case 'cod':
case 'cod2':
case 'cod4':
return preg_match('/^[a-f0-9]{32}$/', $guid);
break;
case 'cod5':
return preg_match('/^[a-f0-9]{32}$/', $guid);
break;
case 'cod6':
case 'cod7':
return preg_match('/^[0-9]{5,}$/', $guid);
break;
case 'moh':
case 'bfbc2':
return preg_match('/^EA_[a-f0-9]{32}$/i', $guid);
break;
case 'bf3':
case 'iourt31':
case 'etpro':
case 'wop':
case 'smg':
case 'smg11':
case 'oa081':
case 'ro2':
case 'alt':
return preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i', $guid);
break;
default:
return false;
}
}