This code won't work. I am not good with STR functions.
package AdamBotPoll
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
if(getSubStr(%msg,0,15) $= "--AdamBot_Poll")
{
%Poll = getSubStr(%msg,15,strLen(%msg));
CommandToServer('MessageSent',"There is a poll for: " @ %poll @ " say VoteYes or VoteNo for your vote. No punctuation. You have 30 seconds to vote.");
$Vote = 0;
switch$(%msg)
{
case "VoteYes": $Vote++;
case "VoteNo": $Vote--;
}
schedule(30000,0,"EndPoll()",%client);
}
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
}
};
activatePackage(AdamBotPoll);