mIRC Homepage
Posted By: hippy_hugger vote kick - 15/08/04 08:38 AM
i would like a way that when someone types !votekick
if more than half the people in the room (exept for the person getting vote kick) types !agree then it will kick the person

this seem real hard for me, any irc script whore masters that can do htis?
Posted By: whatsthedillio Re: vote kick - 15/08/04 10:26 AM
this should do the trick hopefully:
_______________________________________________________________
;this sets the vote, remeber to change
;#channel to your channel !vote nick

on *:TEXT:!vote*:#channel: {
set %vote $2
if (!%vote) { Halt }
else {
set %agree = 0
set %disagree = 0
//msg
#channel Should %vote Be Banned?
//msg
#channel Vote With !agree And !disagree
}
}
on *:TEXT:!agree:
#channel:{
inc %agree 1
.notice $nick Thanks For Voting
}
}
on *:TEXT:!disagree:#channel:{
inc %disagree 1
.notice $nick Thanks For Voting
}
}

;This Stops The Vote And Gives The Result
;If Theres more !agrees Then The Nick Will
;Be Kicked From The Channel

on *:TEXT:!Stop:#channel:{
.msg
#channel Vote Over
.msg
#channel Should %vote Be Banned ?
.msg
#channel Results:
.msg
#channel YES: %agree ( $+ $calc(%agree / $calc(%agree + %disagree) * 100) $+ % $+ ) NO: %disagree ( $+ $calc(%diagree / $calc(%agree + %disagree) * 100) $+ % $+ )
if { (%disagree > %agree) { .msg
#channel Answer: NO! }
elseif (%disagree < %agree) { msg
#channel Answer: YES! | .kick #channel %vote Looks Like You Lost :P }
unset %vote
unset %agree
unset %disagree
}
}

______________________________________________________________
there might be a couple of bracket mistakes
sorry if there is
Posted By: Kelder Re: vote kick - 15/08/04 11:05 PM
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
Posted By: BlockHead Re: vote kick - 16/08/04 01:33 AM
hmmm a Vote kick now that seems like a good idea for a script. I'll see what i can to to write one but those look good too
Posted By: hippy_hugger Re: vote kick - 18/08/04 04:53 AM
thnx heaps guys
Posted By: hippy_hugger Re: vote kick - 18/08/04 05:06 AM
does anyone know some good irc scripting tutorials
i only know the basics confused
Posted By: Mentality Re: vote kick - 18/08/04 10:11 AM
There is no need to cross post, you've been answered here smile

Regards,
© mIRC Discussion Forums