mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 3
A
azli3 Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2004
Posts: 3
i have problem with my script. i wrote my remote script mirc 6.14 to protect my from swear in private message. but .. the remote script doesn't work. can someone help me to solve it.

on *:text:*:?: {
if ($nick isop $comchan($nick,1)) || ($nick isvo $comchan($nick,1)) || ($me !isop $comchan($nick,1)) || ($nick == $me) { halt }
if ([censored] isin $1-) || (bitch isin $1-) || (biatch isin $1-) || ([censored] isin $1-) || (pussy isin $1-) && (sex !isin $chan) && (les !isin $chan) && (chat !isin $chan) { goto badwords | halt }
:badwords
if ($me isop $comchan($nick,1)) {
if ($nick == $me) { halt }
.kick $comchan($nick,1) $nick 15Language Error!!
.close -m $nick
}
}

Joined: Feb 2004
Posts: 21
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Feb 2004
Posts: 21
How about this one:

Code:
set %unwanted_words word1 word2 word3 word4 (and so on...)

on *:text:*:?: {
  if (($nick isop $comchan($nick,1)) || ($nick isvoice $comchan($nick,1)) || ($me !isop $comchan($nick,1))) halt
  var %i = 1
  while (%i <= $numtok(%unwanted_words,32)[color:red])[/color] {
    if ($gettok(%unwanted_words,%i,32) isin $1-) {
      .kick $comchan($nick,1) $nick Language error!
      .close -m $nick
      halt
    }
    inc %i
  }
}


There is no need to add ($me == $nick) test since On Text event does not trigger from your own text.

Last edited by MIMP; 29/03/04 07:02 PM.
Joined: Feb 2004
Posts: 21
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Feb 2004
Posts: 21
Cannot edit my previous post anymore, but here's a little correction. The line

while (%i <= $numtok(%unwanted_words,32) {

has one ')' missing or one '(' too much. Try this line instead:

while (%i <= $numtok(%unwanted_words,32)) {

Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Quote:

There is no need to add ($me == $nick) test since On Text event does not trigger from your own text.



on text events will work fine when you send a message to yourself.

Joined: Mar 2004
Posts: 3
A
azli3 Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2004
Posts: 3
it still not work on my version mirc.... any kind suggestion.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
The issue Im seeing is this:

Code:
on *:text:*:?: {
  [color:blue]if (($nick isop $comchan($nick,1)) || ($nick isvoice $comchan($nick,1)) || ($me !isop $comchan($nick,1))) halt[/color]
  var %i = 1
  while (%i &lt;= $numtok(%unwanted_words,32)) {
    if ($gettok(%unwanted_words,%i,32) isin $1-) {
      .kick $comchan($nick,1) $nick Language error!
      .close -m $nick
      halt
    }
    inc %i
  }
}


Look at the blue text for a moment. how many channels are you in? How many are they in? If you're both in MORE THAN ONE channel together that meets all those requirements BUT the first common channel you're NOT opped, it wont matter. Have you tried looping thru all the common channels and checking to see if you're opped and they're in it? Im not fantastic with while loops so inevitably somebody will show you a good example smile


Those who fail history are doomed to repeat it
Joined: Mar 2004
Posts: 3
A
azli3 Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2004
Posts: 3
i have try the remote but not work. i already create more than i did to detected some swearing in private message. can some give some example to me in version 6.14. if remote < 6.0 paste into > 6.03 . its not working


Link Copied to Clipboard