mIRC Home    About    Download    Register    News    Help

Print Thread
Auto Kick on Nick script #133560 22/10/05 10:21 AM
Joined: Oct 2005
Posts: 4
S
SMC Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2005
Posts: 4
hey,
i'm having some trouble with a nick kicking script - e.g. when a badnick is used, it is kicked off.
these are the two i've tried:
}
on !@*:join:#teenconnection: {
if (*kunt* isin $nick) {
ban -u60 $chan $1 5
kick $chan $nick blah
}
}
on *:JOIN:#teenconnection: {
if ((*kunt* isin $nick)){ kick $chan $nick cya
}

thanks for any help :P
-SMC.

Re: Auto Kick on Nick script #133561 22/10/05 10:53 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Code:
on *:join:#chan: {
  if (*kunt* iswm $nick) { kick # $nick Your nick has: kunt in it, try a different nick if you wish to be in here }
}


Of course.. you would probably want to ban them, or add some sort of variable, so that if they have autojoin, it won't cause an infinite loop.

Last edited by Rand; 22/10/05 10:55 AM.
Re: Auto Kick on Nick script #133562 22/10/05 11:24 AM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
In the first script you used $1 instead of $nick for the ban command, I don't know why. In both scripts, you used isin instead of iswm, and there's a -k switch for /ban too, makes it a lot easier...

You can add as much elseif lines as you want...

Code:
on !@*:JOIN:#teenconnection: {
  if (*bad* iswm $nick) ban -ku60 $chan $nick 5 Bad word in nickname
  elseif (*somethingelse* iswm $nick) ban -ku60 $chan $nick 5 Bad word in nickname
}


Maybe also use the on NICK event to catch people who change their nick when they're in your channel. The if condition will have to use $newnick ofcourse, maybe the ban commands too.

Re: Auto Kick on Nick script #133563 22/10/05 01:16 PM
Joined: Oct 2005
Posts: 4
S
SMC Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2005
Posts: 4
neither of those appear to work ;\
i dont know why
could the software the server uses make the scripts different? i'm on a WebMaster ConferenceRoom network. i tried on a *normal* network, and it worked beautifully.
/bnick {
if (%bnick == on) {
if ( [censored] isin $nick ) || ( [censored] isin $nick ) || ( bitch isin $nick ) || ( cunt isin $nick ) || ( cock isin $nick ) || ( slut isin $nick ) { set %tb $nick | set %tb.chan $chan | 3metwo 5(Bad Nick Kick) 30 second ban - Please change your nick before re-joining. | inc %knumber 1 }
}
/metwo {
if (($1 != $me) && ($1 !isop $chan)) {
if ($2 != $null) { ban $1 | kick $chan $1 $2- }
else { ban $1 | .timer 1 1 /kick $chan $1 $me }
}

i ripped this off YB-Bot that i had on my computer.
that one that worked.
ConferenceRoom must use different commands..
-SMC.

Re: Auto Kick on Nick script #133564 24/10/05 12:39 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline
Babel fish
Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
could you help me out with the on Nick command? I tried to put it in but keep getting an error. Not sure of the correct wa to enter it. Thanks

Re: Auto Kick on Nick script #133565 24/10/05 12:55 PM
Joined: Oct 2005
Posts: 51
S
stickydank Offline
Babel fish
Offline
Babel fish
S
Joined: Oct 2005
Posts: 51
here is a badword word pro that i edited
2 onjoin i hope it works this u can add a hole bunch of nicks if it works
Code:
on *:load: {
  if ($version > 6.0) { 
    echo  Bad word Pro
    echo 7PuNishER
    echo Check your popups, or type4 /BadWord
  }
  else { 
    echo  Version 6.0 or higher required, get a newer version of mirc at http://www.mirc.com  
    unload -rs $script 
  }
}

on *:unload: {
  echo -s Badword Pro by PuNishER unloaded.
  if ($isfile(badwords.ini)) echo -s Files left after usage :4 $mircdirBadwords.ini
  echo -s Glad you used this :]
  hfree badword
}

on *:start: {
  hmake badword 100
  if ($isfile(badwords.ini)) hload badword badwords.ini
}

on *:close: {
  hsave badword badwords.ini
}

alias badword  {
  if ($dialog(badword)) {
    dialog -ve badword badword 
  }
  else dialog -mdo badword badword
}

alias -l badword.ref {
  var %ss $hget(badword,0).data
  while (%ss) { 
    did -a badword 1 $hget(badword,%ss).item = $hget(badword,%ss).data 
    dec %ss 
  }
}

alias -l add.badwords {
  if ($dialog(badword)) { dialog -i badword }
  var %bw $$input(Enter badwords for %badwords,e,Add badwords)
  if (%bw != $null) { hadd -m badword %badwords %bw }
  if ($dialog(badword)) {
    did -r badword 1
    badword.ref
    dialog -e badword
  }
}

dialog badword {
  title "Bad Word Pro by PuNishER"
  size -1 -1 210 125
  option dbu
  list 1, 5 5 135 75, size sort autovs
  edit "", 2, 35 85 43 10, autohs
  edit "", 3, 40 100 135 10, autohs
  button "Add", 4, 80 85 25 10, flat
  button "Remove", 5, 110 85 35 10, flat
  button "Close", 6, 150 85 30 10, flat ok
  text "BadWord Msg :", 7, 4 100 35 8
  text "BadWord :", 8, 4 85 22 8
  box "Punishment:", 9, 145 50 61 33
  radio "Warn", 10, 148 60 23 10, group
  radio "Kick", 11, 148 70 25 10
  radio "DeMote", 12, 172 60 30 10
  radio "Kick/Ban", 13, 172 70 30 10
}

on *:dialog:badword:init:*: { 
  badword.ref
  if (%BadWord.p == w) { did -c BadWord 10 }
  elseif (%BadWord.p == k) { did -c BadWord 11 }
  elseif (%BadWord.p == d) { did -c badWord 12 }
  elseif (%BadWord.p == kb) { did -c badWord 13 }
}

on *:dialog:badword:sclick:*: {
  if ($did == 1) {
    if ($did(1).seltext != $null) {
      did -r $dname 2,3
      did -a $dname 2 $gettok($did(1).seltext,1,32)
      did -a $dname 3 $gettok($did(1).seltext,3-,32)
    }
  }
  if ($did == 4) {
    if ($did(2).text != $null) && ($did(3).text != $null) && ($left($did(2).text,1) != $chr(32)) && ($left($did(3).text,1) != $chr(32)) {
      hadd -m badword $did(2).text $did(3).text
    }
    did -r $dname 1,2,3
    badword.ref
  }
  if ($did == 5) {
    if ($did(1).seltext != $null) {
      hdel badword $gettok($did(1).seltext,1,32)
    }
    did -r $dname 1,2,3
    badword.ref
  }
  if ($did == 6) {
    hsave badword badwords.ini
  }
  if ($did == 10) {
    set %badWord.p w 
  }
  if ($did == 11) {
    set %badWord.p k
  }
  if ($did == 12) {
    set %badWord.p d
  }
  if ($did == 13) {
    set %badWord.p kb
  }
}
#badword on
on *:join:*: { 
  if ($hget(badword,$nick)) {
    msg $chan $nick $hget(badword,$nick)
      if (%badword.p == w) { msg $chan $nick $hget(badword,$hfind(badword,$gettok($1-,%a,32),1)) }
      if (%badword.p == k) { kick $chan $nick | msg $chan $nick $hget(badword,$hfind(badword,$gettok($1-,%a,32),1)) }
      if (%badword.p == d) { mode $chan -aohv $nick $nick $nick $nick | msg $chan $nick $hget(badword,$hfind(badword,$gettok($1-,%a,32),1)) } 
      if (%badword.p == kb) { mode $chan +bbb $nick $nick $nick $address($nick,2) $address($nick,9) $nick | kick $chan $nick | msg $chan $nick $hget(badword,$hfind(badword,$gettok($1-,%a,32),1)) } 
    }
    inc %a
  }
}
#badword end

menu menubar,channel,status,nicklist,query {
  BadWordPro
  .BadWord Pro:badword
  .$$iif($group(#badword).status == on,Disable):.disable #badword | echo Bad Word Pro OFF
  .$$iif($group(#badword).status == off,Enable):.enable #badword | echo Bad Word Pro ON
  .-
  .Unload:unload -rs $script
}
  
i didnt test but hope it work 4 u