mIRC Home    About    Download    Register    News    Help

Print Thread
S
Stium
Stium
S
Alright all past scripts fixed and working.

Now I'm trying to make another script an auto join type script.

When someone post the #channel and the word idle in my channel I want to auto join the channel and post a line of information to idle our #channel then leave.

It is a way to annoy the people who sit there and constantly spam in our channel about idling with out banning them all.

I'm going to start on the script, idles and suggestions even code would be nice.

Peace guys.

W
winbots_co_uk
winbots_co_uk
W
Code:
on *:TEXT:*#*:#YOUR-CHANNEL:{
  if (idle isin $1-) {
    set %lcv 1
    while (%lcv <= $0) {
      if ($chr(35) isin $gettok($1-,%lcv,32)) {
        if ($gettok($1-,%lcv,32) ischan) {
          msg $gettok($1-,%lcv,32) HEY! Everyone come and idle in my channel! just type /join $chan
        )
        else {
          join $gettok($1-,%lcv,32)
          msg $gettok($1-,%lcv,32) HEY! Everyone come and idle in my channel! just type /join $chan
          part $gettok($1-,%lcv,32)
        }
      }
      inc %lcv
    }
    unset %lcv
  }
}

something like that...
note: not tested

Last edited by winbots_co_uk; 01/06/04 08:03 PM.
I
Iori
Iori
I
I just want to say that doing this will likely cause you to get spammed even more...

Having said that, this code might do what you want. It matches *idle * #channel*

on $*:TEXT:/\bidle\b.*(#\S+)/Sg:#channel:{
  • if $regml(1) == # { return }
    join -n $regml(1)
    .msg $regml(1) HEY! Everyone come and idle in my channel! just type /join #
    part $regml(1)
}

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Hi,

spamming as a counter attack to spamming doesn't seem like the best idea, nevertheless, the following code is probably what you are looking for.

Code:
 
on *:TEXT:*#*:#yourchannel:{
  var %a = $strip($1-)
  if $istok(%a,idle,32) {
    !.echo -q $regsub(%a,/(?:^| )[^#]+/g,$chr(44),%a)
    join -n %a
    msg %a HEY! Everyone come and idle in my channel! just type /join #
    .timer 1 3 part %a
  }
}

It supports as many channels in the sentence, in any order.

Important: even though we put

join
msg
part

that doesn't mean that these things will happen chronologically. When I tested the code, it happened often that mIRC had already parted the channels i joined, before the server was able to send the message. Solution: either script an on joint event (but im lazy right now), or use a timer to part the channels after a small interval (3 seconds right now, though you can alter it at will)

Greets

Last edited by FiberOPtics; 02/06/04 03:53 PM.
S
Spock
Spock
S
Why bother? Just consider the source and ignore them. In fact, why not just put them on ignore?

S
Stium
Stium
S
I just like causing problems is why bother :P

Thanks for the code guys, I've got most of it done with my own scripting but you guys helped me alot with the word idle find.

Thanks again

Stium


Link Copied to Clipboard