I think your problem is that you need a "break;" after every case in the switch statement. Try this:
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
switch$(%msg)
{
case "Test":
if (%name $= "jes00")
{
commandToServer('messageSent',"Test: Success!");
}
break;
case "Hi":
commandToServer('messageSent',"Hi");
break;
case "the muffin smells good!":
commandtoserver('messagesent',"It does indeed!");
break;
case "Goodbye":
commandtoserver('messagesent',"Goodbye.");
break;
}
}
};
activatePackage(chatbot);
Also, it is not necessary to put brackets around the single-line-if-statement, but I like to during testing, it helps you control program flow and keep mistakes from happening. This may not be the solution to your problem, but you should usually follow a case with a break; statement (depending on the application).