mIRC Home    About    Download    Register    News    Help

Print Thread
#143934 03/03/06 01:31 PM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
Hi,
i want a warning script.
After 3 warnings the user will be kicked
And after 6 warns total the user will be banned.
Who can make this for me?
It would be great smile

tnks
Brantje

#143935 03/03/06 04:47 PM
Joined: Feb 2005
Posts: 185
S
Vogon poet
Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
We need a bit more information...

Ie. Clones, Swearing, Flooding


sub-zero.homeip.net:6667

#143936 04/03/06 08:03 AM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
I have an bot that works with lvl 100.
Code:
on 100:text:shutdown:?: {
  amsg Bye!
  quit $dbver(text) $+ . Get it at: $dbver(site)
  exit
}

if and admin type !warn (nick) [reason]
The user will be warned.

#143937 04/03/06 08:21 AM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
warned for what ?
flooding - swearing - advertising ? ? ? ?
there are scripts on the net that do that already.
seen them but don't remember where try googling for them

#143938 04/03/06 08:29 AM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
for everthing.
Like swearing advertising,flloding.

#143939 04/03/06 08:50 AM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
try this script : cps

#143940 04/03/06 09:02 AM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
i mean no cms.
Only warning.
So like this:
<brantje>!warn gj shut up
<botje>gj have 1 warning now after 2 more warnings you will be kicked
<brantje>!warn gj shut up
<botje>gj have 2 warnings now after 1 more warning you will be kicked
<brantje>!warn gj shut up
<botje>3rd of 3rd warning kicked
gj has been kicked from #blah
gj joined channel #blah

<brantje>!warn gj shut up
<botje>gj have 4 warnings now after 2 more warnings you will be banned
<brantje>!warn gj shut up
<botje>gj have 5 warnings now after 1 more warning you will be banned
<brantje>!warn gj bye bye
<botje>gj have 6 out of 6 warnings. banning gj
botje sets mode +b on gj (Reason bye bye)
gj have been kicked from #blah


Is this possebole?

#143941 04/03/06 09:54 AM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Code:
on @100:TEXT:!warn &amp; *:#channelnamehere: {
  if ($2 ison $chan) {
    if ($var(% $+ warn. [ $+ [ $network ] $+ . $+ [ $nick ] ])) {
      if (%warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] == 2) {
        inc %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ]
        msg $2 $3- (2nd warning, next one is a kick)
      }
      elseif (%warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] == 3) {
        inc %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ]
        kick $chan $2 $3- (3rd warning)
      }
      elseif (%warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] == 4) {
        inc %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ]
        msg $chan $2 $3- (4th warning, 2 more for a ban)
      }
      elseif (%warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] == 5) {
        inc %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ]
        msg $chan $2 $3- (5th warning, 1 more for a ban)
      }
      elseif (%warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] == 6) {
        unset %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ]
        mode $chan +b $address($2,2)
        kick $chan $2 $3 (last warning, banned)
      }

    }
    else {
      /set %warn. [ $+ [ $network ] $+ . $+ [ $nick ] ] 1
      msg $2 $3- (1rst warning)
    }
  }
}


haven't tested it so let us know if it doesn't work

(hmmm why are all those empty lines there? those werent there before I edited this post with the final line O_o)


If it ain't broken, don't fix it!
#143942 04/03/06 10:00 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on @*:text;!warn &amp;*:#:{
  inc $+(%,warn,.,$address)
  if $($+(%,warn,.,$address),2) &lt; 3 {
    .msg $chan $nick have $($+(%,warn,.,$address),2) warning now after $calc(3 - $($+(%,warn,.,$address),2)) more warning(s) you will be kicked
  }
  elseif $($+(%,kick,.,$address),2) == 3 {
    .msg $chan 3rd of 3 warnings
    if $2 isin $chan {
      kick $chan $2
    }
  }
  elseif $($+(%,kick,.,$address),2) &lt; 6 {
    .msg $chan $nick have $($+(%,warn,.,$address),2) warning now after $calc(3 - $($+(%,warn,.,$address),2)) more warning(s) you will be banned
  }
  elseif $($+(%,kick,.,$address),2) == 6 {
    .msg $chan 6 out of 6 warnings
    if $2 isin $chan {
      .ban -k $chan $2 $3-
    }
  }
}
 

#143943 05/03/06 01:24 PM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
Both codes dont work.
I dint see any text.

#143944 05/03/06 01:33 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you're looking on the system that is running the code, for mine, you have to remove the . (aka fullstop) from the lines that have them (ie: change .msg to msg).

Also just noticed that in mine, for the ON TEXT event, there's a ; where it should be a :


Last edited by RusselB; 05/03/06 01:34 PM.
#143945 05/03/06 01:41 PM
Joined: Feb 2006
Posts: 54
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2006
Posts: 54
you post:
if and admin type !warn (nick) [reason]
The user will be warned.

if it is so then $2 is the nick thet sould be warned
Becuse $nick is the one typed !warn

here is a quick exampel:



Code:
 
on @&amp;*:TEXT:!warn*:#:{
  if ($2 ison $chan) {
    ;watch the user for 5 mins.
    inc -u300 $+(%,w,$chan,.,$nick)
    var %ord = $eval($+(%,w,$chan,.,$nick),2)
    if (%ord == 1) msg $chan this is your $ord(%ord) warning $2 
    elseif (%ord == 2) msg $chan this is your $ord(%ord) warning $2 
    elseif (%ord == 3) kick $chan $2 i warned you %ord times.
  }
}

 

Last edited by tso29; 05/03/06 01:44 PM.
#143946 05/03/06 01:46 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Nice catch tso29. Just goes to show that "newbies" can see things we "experienced" scripters miss.

#143947 05/03/06 01:55 PM
Joined: Feb 2006
Posts: 54
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2006
Posts: 54
who says i am a newbie? smile
my first mirc script was first public realase 1998 smile

#143948 05/03/06 04:27 PM
Joined: Mar 2006
Posts: 16
B
brantje Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2006
Posts: 16
I cant figure it out to add a reason:
Code:
on @&amp;*:TEXT:!warn *:#:{

  if ($2 ison $chan) {

    ;watch the user for 5 mins.

    inc -u300 $+(%,w,$chan,.,$nick)

    var %ord = $eval($+(%,w,$chan,.,$nick),2)

    if (%ord == 1) msg $chan this is your $ord(%ord) warning $2 [Reason: $1] 

    elseif (%ord == 2) msg $chan this is your $ord(%ord) warning $2 [Reason: $1] 

    elseif (%ord == 3) kick $chan $2 i warned you %ord times.

  }

}



this is your 2nd warning SilkBot [Reason: !warn]
How is that possible

#143949 06/03/06 10:23 AM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
because you say [reason: $1], where $1 is the first value the command started with... if you want the reason from the command like you need $3- (third argument and everything that follows)


If it ain't broken, don't fix it!

Link Copied to Clipboard