|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
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  tnks Brantje
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 185 |
We need a bit more information...
Ie. Clones, Swearing, Flooding
sub-zero.homeip.net:6667
|
|
|
|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 16 |
I have an bot that works with lvl 100.
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.
|
|
|
|
Joined: Feb 2005
Posts: 344
Fjord artisan
|
Fjord artisan
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
|
|
|
|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 16 |
for everthing. Like swearing advertising,flloding.
|
|
|
|
Joined: Feb 2005
Posts: 344
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 344 |
|
|
|
|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
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?
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
on @100:TEXT:!warn & *:#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!
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on @*:text;!warn &*:#:{
inc $+(%,warn,.,$address)
if $($+(%,warn,.,$address),2) < 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) < 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-
}
}
}
|
|
|
|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 16 |
Both codes dont work. I dint see any text.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Feb 2006
Posts: 54
Babel fish
|
Babel fish
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:
on @&*: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.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Nice catch tso29. Just goes to show that "newbies" can see things we "experienced" scripters miss.
|
|
|
|
Joined: Feb 2006
Posts: 54
Babel fish
|
Babel fish
Joined: Feb 2006
Posts: 54 |
who says i am a newbie?  my first mirc script was first public realase 1998 
|
|
|
|
Joined: Mar 2006
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Mar 2006
Posts: 16 |
I cant figure it out to add a reason:
on @&*: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
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
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!
|
|
|
|
|