Ok first problem:
if (%knick == $me) {
if (%bnick == $me) {
That should be:
if ($knick == $me) {
if ($bnick == $me) {
Or else it will retaliate on ever single ban and kick made. And than when those fixes are made, it will try to protect even you dont have status. Which can probably lead to lagging. It needs work, even to call it simple. Sorry if I sound harsh dude, but its the truth.