mIRC Home    About    Download    Register    News    Help

Print Thread
#94285 15/08/04 08:38 AM
Joined: Aug 2004
Posts: 5
H
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Aug 2004
Posts: 5
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?

#94286 15/08/04 10:26 AM
Joined: Jun 2004
Posts: 291
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
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

#94287 15/08/04 11:05 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
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

#94288 16/08/04 01:33 AM
Joined: Aug 2004
Posts: 3
B
Self-satisified door
Offline
Self-satisified door
B
Joined: Aug 2004
Posts: 3
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


Behold! I have not a clever signature
#94289 18/08/04 04:53 AM
Joined: Aug 2004
Posts: 5
H
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Aug 2004
Posts: 5
thnx heaps guys

#94290 18/08/04 05:06 AM
Joined: Aug 2004
Posts: 5
H
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Aug 2004
Posts: 5
does anyone know some good irc scripting tutorials
i only know the basics confused

#94291 18/08/04 10:11 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
There is no need to cross post, you've been answered here smile

Regards,


Mentality/Chris

Link Copied to Clipboard