mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 33
W
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Dec 2004
Posts: 33
im not good at scripting, all i do is take what i already have to modify them for my needs, but today i need something new i dont have. so i am here to ask for your help.

i have a list of words i want to put into a document, or where ever i need this list to be.

when someone sais any of the words on this list the first few times i would like to warn them with a PM message. after that certain number of time a kick from chanserv a few number of times then after a few more times an hour ban, then day ban ext, i would like to modify levels of warnings, bans ect... i would also need a way to keep track of how many voilations someone has, and a way to reset it. thank you for your help.

Joined: Feb 2006
Posts: 11
P
Pikka bird
Offline
Pikka bird
P
Joined: Feb 2006
Posts: 11
u can use alias and text file to do that

Code:
alias cekText {
 var %aa = 1
 while (%aa >= $lines(text.txt)) {
  if ($read(text.txt,%aa) isin $1- return ok
  inc %aa
 }
 return $null
}


now use:
Code:
on *:TEXT:*:#:if ($cekText($1-)) kick # $nick Bad Word!


hope this work wink


get more mIRC snipets, add-ons and scripts from http://www.oyr79.com/mirc
Joined: Dec 2004
Posts: 33
W
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Dec 2004
Posts: 33
i can explain it in basic language, unfortunatly thats all i know, if i could get a skeleton of a script i can add in a few more levels of violations and actions for the violation. but how do you get a script to count the violation per user... smirk

Last edited by WildCard; 20/03/07 06:21 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Nice try, Prof, however, your script would not work. You have the right idea, but the wrong comparison in your while statement.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This type of thing has been done many times before.
Here's the simplest form that I've seen and works
Code:
on *:text:*:#:{
  var %a = 1, %b = $0
  while %a <= %b {
    if $read(badword.txt,nts,$gettok($1-,%a,32)) {
      inc $+(%,violation,.,$address)
      if $($+(%,violation,.,$address),2) == 1 {
        .notice $nick This is your first warning.. Do not use $gettok($1-,%a,32) in $chan
        %a = %b
      }
      elseif $($+(%,violation,.,$address),2) == 2 {
        .cs kick $chan $nick You were warned. Next time it'll be a ban
        %a = %b
      }
      else {
        cs ban $chan $nick Some people don't listen
        %a = %b
        unset $+(%,violation,.,$address)
      }
    }
    inc %a
  }
}


To my knowledge chanserv doesn't have an option in it's ban settings for it to remove the ban after a specified amount of time. This can be done with the regular /ban command, but that would require the client/bot that's running the code to have full ops in the channel. Additionally you stated that you wanted the kicks and bans to be performed by chanserv.

Joined: Mar 2007
Posts: 5
J
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: Mar 2007
Posts: 5
Originally Posted By: RusselB

To my knowledge chanserv doesn't have an option in it's ban settings for it to remove the ban after a specified amount of time. This can be done with the regular /ban command, but that would require the client/bot that's running the code to have full ops in the channel. Additionally you stated that you wanted the kicks and bans to be performed by chanserv.

There is such a command, !tb [nick] [time] i.e !tb bob 3d or !tb *!*@123.456.78.9 3d

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I checked the chanserv options on the network where I have IRCops, and there is no !tb command listed, so I wouldn't want to code something like that, as, obviously, not all chanserv's have it.


Link Copied to Clipboard