Multi Network Looper

By Scakk on Jun 16, 2011

This little alias allows you to send a message , echo , /hop and many other commands that you want to use in every channel you are in on all networks you are connected to.

Usage $looper(Command,text to be sent)
A few examples below.

Example: //noop $looper(describe,this is a multi network /me)
Example: //noop $looper(hop,I am hopping!)

alias looper { 
  if ($isid) {
    var %t 1 | while (%t <= $scid(0)) {
      scon %t | var %chans $chan(0) 
      while (%chans) { $1 $chan(%chans) $$2 | dec %chans }  
      inc %t 
    } 
  }
}

Comments

Sign in to comment.
Hitman   -  Jun 16, 2016

very nice snippet but can i have a 5 seconds delay between the commands please.
because on my server i'm often bounced when i send more then 5 commands.

 Respond  
Jethro   -  Jun 17, 2011

Yeah jaytea, it was late at night, I wasn't quite certain, and that's why I added "Can't we do it using /scon -at1?" Thanks for pointing out the overlooked matter regarding the loop.

 Respond  
jaytea   -  Jun 17, 2011

Being a nosy bubble burster, :P can't we do it using /scon -at1?

alias looper { 
  if $isid {
    var %chans 1
    while $chan(%chans) { 
      scon -at1 $1 $v1 $$2
      inc %chans 
    }  
  }
}

no. you're looping through channels on the current connection and performing /scon -at1 for each one, which is backwards.

 Respond  
blackvenomm666   -  Jun 17, 2011

9.0 + like good job scakk:)

 Respond  
Scakk   -  Jun 16, 2011

Every time I try using -at1 it never works me :(

mumbles about $$2

 Respond  
Jethro   -  Jun 16, 2011

Good one, Scakk. About this: $iif($2,$2) , you should just use $$2...'cause if there's no $2, you'll still get an insufficient parameter error when other commands are used.

Being a nosy bubble burster, :P can't we do it using /scon -at1?

alias looper { 
  if $isid {
    var %chans 1
    while $chan(%chans) { 
      scon -at1 $1 $v1 $$2
      inc %chans 
    }  
  }
}
 Respond  
napa182   -  Jun 16, 2011

Nice work Scakk, me likes.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.