code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Sender, ChatMsg, ChatType)
{
if (ChatMsg.toLowerCase().indexOf("nick") > -1) {
Nick = Nick + 1;
Debug.Trace("Added one to count.");
ChatWnd.SendMessage("The Nick Count is now at: " + Nick);
}
}
And that checks for any case as well.
BTW, if you just store it as a variable then the "nick count" will be lost whenver the plugin is stopped, I recommend saving to a file or the registry on uninitialize then loading on initialize.