There are some parameters missing in your question, but i'll guess something for you

On *:TEXT:!votekick *:#channelname: {
if (($2 == $null) || (%votekicknick) || ($2 !ison $chan)) return
unset %votekick*
set -u600 %votekicknick $2
set %votekickagree 1
set $+(%,votekick.,$address) 1
msg $chan type !agree if you want to kick $2 (10 minutes remaining)
}
On *:TEXT:!agree:#channelname: {
if ((%votekicknick) && (!$($+(%,votekick.,$nick),2))) {
set $+(%,votekick.,$address) 1
inc %votekickagree
if (%votekickagree > $calc($nick($chan,0) / 2) {
ban -ku10800 $chan $nick 3 You've won the election! (3hr ban)
unset %votekick*
}
}
}
on *:NICK: if (%votekicknick == $nick) set %votekicknick $newnick


Parameters:
3 hour ban
10 minutes time to answer
also 10 minutes before a new nick can be selected for kicking, unless the previous nick is kicked at which point you can !votekick another one immediately
mask type 3 for ban mask (see /help $mask)
keeping address of people who voted to keep them from voting 2 times and from changing nick to cheat smile
you can agree to kick yourself smile
the one who typed !votekick automatically grees, he needn't type !agree
no messages since that might flood off the bot

If the nick to be banned leaves the channel, you can still vote, but he won't be banned, unless he rejoins with the same nick when the final !agree is typed, find out yourself how to script for this problem smile