Et bien voila, j'apprécie le scripting et cela fait maintenant un mois que je script seulement.
j'en ai eu marre de voir des bots (clones) faire interruption dans mon channel...
c'est un script qui kick un clone quand il join mon channel ,donc.
C'est trés simpliste mais ça marche trés bien !
(je l'utilise sur cyanide-x donc il n'y a pas de possibilité que quelqu'un joigne avec deux fois le meme pseudo , ce qui fait de ce script qu'il est suffisant.)
Source / Exemple :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;H;;;A;;;C;;;K;;;M;;;A;;;N;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;YOU ONLY NEED TO LOAD THIS FILE ON A REMOTE WITH mIRC;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
menu * {
Cl0NeKiCkEr
.Configuration : /clonekick
}
on *:start:{
if ($exists(htables) == $false) { mkdir htables }
hmake cloneconf 100
if ($exists(htables/cloneconf) == $false) {
hadd cloneconf Nghost 1
hadd cloneconf BAN 4
hadd cloneconf chan $null
hadd cloneconf nick $null
hadd cloneconf message $null
hsave cloneconf htables/cloneconf
}
hload cloneconf htables/cloneconf
}
alias clonekick { dialog -m clonekick clonekick }
dialog clonekick {
title Cl0neKicker : MADE BY HACKMAN[TeTa]
icon mirc.exe,18
size -1 -1 200 100
option dbu
tab "Channel", 10, 10 12 183 70
tab "Except", 20
tab "Message", 30
tab "Config +", 40
box "",1,5 0 192 97
check ": clonekick State ON/OFF",2,68 4 80 10
;--------TAB10-------
text "Channel Used (with #):",11,12 30 80 10, tab 10
edit "",12,11 40 150 10, tab 10
list 13,11 50 150 40,sort vsbar tab 10
button "Add",14,161 50 30 10,push tab 10
button "Remove",15,161 60 30 10,push tab 10
;--------TAB20-------
text "Exception (type the nick of the exeption :NEED TO BE ONLINE)",21,12 30 180 10, tab 20
edit "",22,11 40 150 10, tab 20
list 23,11 50 150 40,sort vsbar tab 20
button "Add",24,161 50 30 10,push tab 20
button "Remove",25,161 60 30 10,push tab 20
;--------TAB30-------
text "Kick message",31,12 30 180 10, tab 30
text "you can type CLONE1 or CLONE2 on the message , those values will be replaced by the nicks of both clones (CLONE1 = kicked one)",32,12 38 180 20, tab 30
text "If you don't set one, it will use a default one ",34,12 51 180 10, tab 30
edit "",33,11 60 180 10, tab 30
;--------TAB40-------
text "Max Clone Number Per Channel",41,20 30 170 10, tab 40
edit "",43,20 40 80 10, tab 40
text "Number Of Rejoin/Kick Before BAN",44,20 55 170 10, tab 40
edit "",45,20 65 80 10, tab 40
;--------QUIT&SAVE-------
button "Close&Save",9,80 87 40 10,flat,ok
icon 4,160 2 20 20,mirc.exe,18,large
}
on *:dialog:clonekick:sclick:14:{
if ($did(12) isin $hget(cloneconf,chan)) { did -ra clonekick 12 Already on the list ! }
else {
hadd -m cloneconf chan $iif($hget(cloneconf,chan), $hget(cloneconf,chan) $+ $chr(32) $+ $did(12), $did(12))
}
did -r clonekick 13
didtok clonekick 13 32 $hget(cloneconf,chan)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:sclick:15:{
hadd cloneconf chan $replacex($remove($hget(cloneconf,chan), $did(13).seltext), $chr(32) $+ $chr(32), $chr(32))
did -r clonekick 13
didtok clonekick 13 32 $hget(cloneconf,chan)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:sclick:24:{
if ($address($did(22),4) isin $hget(cloneconf,nick)) { did -ra clonekick 22 Already on the list ! }
else {
hadd -m cloneconf nick $iif($hget(cloneconf,nick), $hget(cloneconf,nick) $+ $chr(32) $+ $address($did(22),4), $address($did(22),4))
}
did -r clonekick 23
didtok clonekick 23 32 $hget(cloneconf,nick)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:sclick:25:{
hadd cloneconf nick $replacex($remove($hget(cloneconf,nick), $did(23).seltext), $chr(32) $+ $chr(32), $chr(32))
did -r clonekick 23
didtok clonekick 23 32 $hget(cloneconf,nick)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:sclick:9:{
hadd cloneconf Nghost $did(43)
hadd cloneconf BAN $did(45)
if ($did(33) == $null) { hadd cloneconf message No Clones admitted *( $+(%,clone.nick1) & $+(%,clone.nick2) )* }
else { hadd cloneconf message $replace($did(33), CLONE1, $+(%,clone.nick1), CLONE2, $+(%,clone.nick2)) }
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
hsave cloneconf htables/cloneconf
}
on *:dialog:clonekick:edit:43:{
hadd cloneconf Nghost $did(43)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:edit:45:{
hadd cloneconf BAN $did(45)
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
}
on *:dialog:clonekick:init:0:{
did -r clonekick 13
didtok clonekick 13 32 $hget(cloneconf,chan)
did -r clonekick 23
didtok clonekick 23 32 $hget(cloneconf,nick)
if (%CLONEKICK.State == ON) { did -c clonekick 2 }
if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
else { did -e clonekick 2,9 }
did -r clonekick 43
didtok clonekick 43 32 $hget(cloneconf,Nghost)
did -r clonekick 45
didtok clonekick 45 32 $hget(cloneconf,BAN)
}
on *:dialog:clonekick:sclick:2:{
if $did(2).state == 1 { set %CLONEKICK.State ON | echo -a %CLONEKICK.Chan 4 clonekick : 2ON 6annoying $hget(cloneconf,chan) }
else { set %CLONEKICK.State OFF | echo -a %CLONEKICK.Chan 4 clonekick : 2OFF }
}
alias clonestart {
.who %clone.chan
var %nnick = 1
while (%nnick <= $nick(%clone.chan,0)) {
var %address = $address($nick(%clone.chan,%nnick),4)
hadd $+(clonekick,%clone.chan) %address $iif($hget($+(clonekick,%clone.chan),%address) == $null, $nick(%clone.chan,%nnick), $hget($+(clonekick,%clone.chan),%address) $+ $chr(32) $+ $nick(%clone.chan,%nnick))
tokenize 32 $hget($+(clonekick,%clone.chan),%address)
while ($0 > $hget(cloneconf,Nghost)) {
var %clone.nick1 = $1
var %clone.nick2 = $2
if (%address == $address($me,4)) || (%address isin $hget(cloneconf,nick)) { echo -a %clone.nick excepted | break }
hadd $+(clonekick,%clone.chan) %address $remove($hget($+(clonekick,%clone.chan),%address), $1)
$iif(!$($+(%,ban,$1),2),set -u10,inc) $+(%,ban,$1) 1
if ($($+(%,ban,$1),2) > $hget(cloneconf,BAN)) { ban -u30 %clone.chan $1 }
kick %clone.chan $1 $($hget(cloneconf,message),2)
tokenize 32 $hget($+(clonekick,%clone.chan),%address)
}
inc %nnick
}
}
alias clonejoin {
if (!$address(%clone.nick,4)) { .who %clone.chan }
var %address.join = $address(%clone.nick,4)
hadd -m $+(clonekick,%clone.chan) %address.join $iif($hget($+(clonekick,%clone.chan), %address.join) == $null, %clone.nick, $hget($+(clonekick,%clone.chan), %address.join) $+ $chr(32) $+ %clone.nick)
tokenize 32 $hget($+(clonekick,%clone.chan), %address.join)
while ($0 > $hget(cloneconf,Nghost)) {
var %clone.nick1 = $1
var %clone.nick2 = $2
if (%address.join == $address($me,4)) || (%address.join isin $hget(cloneconf,nick)) { echo -a %clone.nick excepted | return }
hadd $+(clonekick,%clone.chan) %address.join $remove($hget($+(clonekick,%clone.chan), %address.join), $1)
kick %clone.chan $1 $($hget(cloneconf,message),2)
tokenize 32 $hget($+(clonekick,%clone.chan),%address.join)
}
}
on *:join:*:{
if (%CLONEKICK.State == ON) {
if ($chan isin $hget(cloneconf,chan)) {
set %clone.nick $nick
set %clone.chan $chan
if ($nick == $me) {
var %nchan = 1
while ($gettok($hget(cloneconf,chan),%nchan,32)) {
.who $gettok($hget(cloneconf,chan),%nchan,32)
inc %nchan
}
hfree $+(clonekick,%clone.chan)
hmake $+(clonekick,%clone.chan) 1000
timer 1 1 clonestart
}
else { clonejoin }
}
}
}
on *:part:*:{
if (%CLONEKICK.State == ON) {
if ($chan isin $hget(cloneconf,chan)) {
var %address.part = $address($nick,4)
hadd $+(clonekick,$chan) %address.part $replace($removecs($hget($+(clonekick,$chan), %address.part), $nick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
}
}
}
on *:kick:*:{
if (%CLONEKICK.State == ON) {
if ($chan isin $hget(cloneconf,chan)) {
var %address.part = $address($knick,4)
hadd $+(clonekick,$chan) %address.part $replace($removecs($hget($+(clonekick,$chan), %address.part), $knick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
}
}
}
on *:quit:{
if (%CLONEKICK.State == ON) {
tokenize 32 $hget(cloneconf,chan))
var %chann = 1
var %chane = $($+($,%chann),2)
while (%chane) {
var %address.part = $address($nick,4)
hadd $($+(clonekick,%chane),2) %address.part $replace($removecs($hget($+(clonekick,%chane), %address.part), $nick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
inc %chann
var %chane = $($+($,%chann),2)
}
}
}
on *:nick:{
if (%CLONEKICK.State == ON) {
var %ncount = 1
while ($gettok($hget(cloneconf,chan),%ncount,32)) {
if ($newnick ison $gettok($hget(cloneconf,chan),%ncount,32)) {
var %address.change = $address($newnick,4)
hadd $+(clonekick,$gettok($hget(cloneconf,chan),%ncount,32)) %address.change $replace($hget($+(clonekick,$gettok($hget(cloneconf,chan),%ncount,32)), %address.change), $nick, $newnick)
}
inc %ncount
}
}
}
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.