mIRC Home    About    Download    Register    News    Help

Print Thread
#148501 06/05/06 07:44 PM
Joined: May 2006
Posts: 25
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 25
Hi all!

I'm trying to do something, but I got stuck, so I'm looking for someone to help me, because I don't know how to go on. I'm not very good at english, but I'll try to explain it as clearly as possible smile

I've made a Remote script, and the most important thing on it is a On kick event, that "blocks" the kicks from some chan OPs, on some channels (concretely, kicks to some bots). So I have this code:

Code:
On ^*:KICK:#: {
  if ($istok(%hbot.chan, $chan, 32)) {
    if (($istok(%hbot.ignore, $nick, 32)) && ((bot isin $1-) || (b0t isin $1-) || (notice isin $1-))) { halt }
  }
}


It works well, but the problem is... I've some another remotes that have the same event, and of course, they also are triggered. I would need: if the previous code triggers, and halts the kick event, it would also halt the rest of scripts that I've loaded.

The other event that triggers (and wouldn't have to), is like this:
Code:
On ^1:KICK:#: { ... | haltdef }


I've also loaded the first one in the first position of remotes (load -rs1...), but it still triggers frown the other one is on the 5th. position, or something like that.

I don't know if it's possible to do, but I'd be very glad if someone could help me with this.

Thanx a lot laugh


==================
Abstraction is art.
#148502 06/05/06 08:28 PM
Joined: Nov 2003
Posts: 25
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2003
Posts: 25
I think you're looking for this (from the help file):

Quote:

The & prefix
You can prevent an event from being triggered if a previous script used /halt or /haltdef to halt the display of default text for an event by using the & prefix.

on &1:TEXT:*:?:/echo this event won't trigger if $halted is true


I hope this helps...

#148503 06/05/06 08:52 PM
Joined: May 2006
Posts: 25
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 25
Ok, that's exactly the effect I need smile

But... there's a problem with it (I had to tell it in the previous post, sorry!).

Suppose that many people will download and use the AddOn I'm doing... I won't have any access to their remote scripts loaded before the mine, and won't have any control to halt the other scripts, but I'll still need this effect frown

Thanks anyway smile

If someone else has any tip, I'd be very grateful laugh


==================
Abstraction is art.
#148504 06/05/06 10:47 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You dont have the right to alter other scripts, thats the reason the & option exists, to allow you to halt YOUR script if it should not act if someone elses has already halted the event.
The other script might be a KICK logger, this would not want to be stoped just becuase your script ran.

The seemingly mass failure of scriptors to add the & option to events that should not trigger if there already halted is wide spread, i know i never used to have it.

I would hazzard a guess you have not considered adding the & to your script either, even tho it most definitly should have it, why would you need to conditionally halt if the events already been halted?

#148505 07/05/06 11:06 AM
Joined: May 2006
Posts: 25
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 25
Well, I gessed it wouldn't be so easy to do smile

The reason I'm programming this script is because we've a very big problem with turkish bots, they join our server and harass us with spam. So I also programmed an addon to detect them, and generally it works well (detects about 98% of them).

The problem is that 2 of 5 joins are bots, so when I kick them, I have to specify a reason for the case I mistoke and the nick I kicked is a human, telling him what to do. That's ok, if the kicks were a few, but I kick about 1000 bots per day.

So this addon I'm trying to do halts any kick to bots, so users don't get so bothered like before. But if this user uses one of the spanish scripts that almost everyone use, although he loaded my addon on the 1st position, the other one 'echo's the event, so my addon becomes uselless frown

Well, I'll continue trying to solve this problem in some other way.

Thanx all smile


==================
Abstraction is art.

Link Copied to Clipboard