Just a very simple TakeOver snippet! Enjoy =)
Please leave your comments
on *:load: //echo -a 7Thanks For Loading The 12G13AoUsTiS TakeOver/GiveBack7 Addon
alias mass {
if ($regex($1,/^[+-]?[ohv]$/)) {
if ($me isop $active) {
var %x 1, %modenicks
while ($nick($active, %x)) {
%modenicks = $addtok(%modenicks, $v1, 32)
if ($numtok(%modenicks,32) = $modespl) { mode # $+($left($1,1),$str($right($1,1),$modespl)) %modenicks | %modenicks = "" }
inc %x
}
if (%modenicks) mode $active $+($left($1,1),$str($right($1,1),$numtok(%modenicks,32))) %modenicks
}
else { //echo -a 7You Have to be an op to perform this command
}
}
}
dialog takeover1 {
title "G13AoUsTiS TakeOver Menu"
size -1 -1 160 125
option dbu
tab "Mass Deop", 2, 0 0 234 179
tab "Takeover", 4
tab "X TakeOver", 13
Button "Mass deop",5, 20 30 120 60,tab 2
Button "TakeOver",6, 20 30 120 60,tab 4
Button "Cancel",10, 10 105 140 15, cancel
Box "Menu:", 11, 10 20 140 80
Button "X TakeOver",12, 20 30 120 60,tab 13
}
ON *:DIALOG:takeover1:sclick:5: { /mass -o }
ON *:DIALOG:takeover1:sclick:6: {
if ($me !isop $active) { echo $active 7Get An Op First! | halt }
/mass -o | /topic $active 7G13AoUsTiS 12TAKEOVER! set %i 0
:lewp
inc %i
else {
kick $active $nick($chan,%i) 7GO HOME!
mode $active +imk g13aoustis
}
ON *:DIALOG:takeover1:sclick:12: { /msg X ban $active *!*@* 7,12G13AoUsTiS TakeOver }
menu channel {
-
G13AoUsTiS TakeOver: /dialog -m takeover1 takeover1
}
I performed a search on the mass snippets on here and found this:
http://www.hawkee.com/snippet/3375/, exactly identical. You just added an else event in there. Please give the author proper credit, thanks.
Now onto your own coding:
Awful /\'s in front of commands, you advertise literally everywhere, you are missing a bracket, you don\'t check if the dialog is in use, and not sure who X is? Either way, you should just use the /ban command.
a few revisions to ur code, $nick and $chan return $null, and u should do var not set, and i suggest using an else rather than halting
alias takeover {
if ($me isop $active) {
topic $v2 G13AoUsTiS 12 TAKEOVER!
mode $v2 +mstilk 1 g13aoustis
var %x = 1
while $nick($v2,%x) {
kick $active $v1 7GO HOME!
inc %x
}
}
else echo $active Get An Op First!
}