Refactors note plugin to check the users in the channel and only allow
sending of notes to people who are in the channel
Fixes crashing bug due to undefined variable!