added deletePad API function

This commit is contained in:
Peter 'Pita' Martischka 2011-08-16 20:02:30 +01:00
parent 783c192726
commit d2c502e2be
9 changed files with 134 additions and 7 deletions

View file

@ -107,3 +107,9 @@ exports.isValidPadId = function(padId)
return /^(g.[a-zA-Z0-9]{16}\$)?[^$]{1,50}$/.test(padId);
}
//removes a pad from the array
exports.unloadPad = function(padId)
{
if(globalPads[padId])
delete globalPads[padId];
}