All information about the script can be found below in the edit box.
Regards,
Lindrian.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Multi network mass hop/part script. v1.0 ;
; By Lindrian (Firas.dib@gmail.com) (/server -m irc.deltaanime.net -j #l2forever,#Lindrian) ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Info: ;
; This script will hop/part all channels on all networks. Depending on what youve input. ;
; It IS multinetwork functional ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Disclaimer: ;
; Lindrian's "Mass hop/part" snippet (/hopall) copyright 2007 ;
; Lindrian, all rights are reserved by the author ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; How to load and unload ;
; Load: ;
; If you place the snippet in a seperated file, type: ;
; /load -rs [path\to]\file.mrc ;
; Where path\to is optional, incase you are using another folder then mirc default one. ;
; I used: /load -rs snippets\hopall.mrc ;
; ;
; Unload: ;
; Type: /unload -rs file.mrc ;
; The commands will work in any window theyre typed in. ;
; ;
; Or if you want to load it into remotes directly. ;
; Press alt + r and paste your code in a NEW .mrc file. Press ok and its done. ;
; To remove, just open the editor (alt + r) again and delete the snippet. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Usage: ;
; /hopall [-p|-h] $2- ;
; The -h switch means HOP (rejoin) and -p part. (leave) ;
; the $2- is if you want to supply a reason ;
; Example: ;
; /hopall -p Parting all channels! Back in 10 minutes! ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; If you by any chance type to command wrong, ;
; It will give you an error message, supplying how to use the command corretly. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias hopall {
if (!$regex($1,/^[\-]?[ph]$/)) { echo -a * /hopall: insufficient parameters | echo -a Use the following syntax: /hopall [-p $chr(124) -h] <reason> (Optional) | return }
if ($regex($1,/^[\-]?[ph]$/)) {
; These two if's above are to make sure you input the command correctly.
var %x = 1, %y
while ($scon(%x)) {
scon %x
; This is where all the networks you are currently on gets checked.
var %z = 1, %i = $comchan($me,0)
while (%z <= %i) {
; Here, I loop through all your channels on network %x
; Im using $comchan($me,%z) because $chan(%z) would return active and inactive channels.
; Which means, it would return the channel, even if you are disconnected on the network.
; $comchan() does not do that, and i can exclude the "ison" check.
var %reason = $iif($1 == -p,Parting all channels.,Rejoining all channels), %r = $comchan($me,%z)
$+(.timer,.,rejoin,.,%r,.,%z) 1 %z $iif($1 == -p,part,hop -c) %r $iif($2-,$2-,%reason)
; Above, the variables to shorten the code down are set, and a timer is set for the specefic channel,
; to delay and avoid lagging you out too much
%y = %y %r
; This is where all channels are stored, to later calculate respective item from.
inc %z
}
inc %x
}
}
if ($numtok(%y,32) != 0) {
echo -a The script will now $iif($1 == -p,part,rejoin) all your channels. Please give it time to process all your channels on all networks.
echo -a $numtok(%y,32) channel(s) will be affected. The script will be fully processed in $numtok(%y,32) second(s).
}
; Here is the main echoing of the script done, supplying sufficient information etc.
else {
echo -a You are currently on 0 channels on all your networks. Nothing will be done!
}
}
; Here's the code for the users who wish to get rid of the commented text!
alias hopall {
if (!$regex($1,/^[\-]?[ph]$/)) { echo -a * /hopall: insufficient parameters | echo -a Use the following syntax: /hopall [-p $chr(124) -h] <reason> (Optional) | return }
if ($regex($1,/^[\-]?[ph]$/)) {
var %x = 1, %y
while ($scon(%x)) {
scon %x
var %z = 1, %i = $comchan($me,0)
while (%z <= %i) {
var %reason = $iif($1 == -p,Parting all channels.,Rejoining all channels), %r = $comchan($me,%z)
$+(.timer,.,rejoin,.,%r,.,%z) 1 %z $iif($1 == -p,part,hop -c) %r $iif($2-,$2-,%reason)
%y = %y %r
inc %z
}
inc %x
}
}
if ($numtok(%y,32) != 0) {
echo -a The script will now $iif($1 == -p,part,rejoin) all your channels. Please give it time to process all your channels on all networks.
echo -a $numtok(%y,32) channel(s) will be affected. The script will be fully processed in $numtok(%y,32) second(s).
}
else {
echo -a You are currently on 0 channels on all your networks. Nothing will be done!
}
}
; eof
ikthezeus wrote:
I take it this was built for mIRC ver 6.3 or below?
As I have tried it with 6.31 and I get the following output...
The script will now rejoin all your channels. Please give it time to process all your channels on all networks.
3 channel(s) will be affected. The script will be fully processed in 3 second(s).
23:35:28 Error: Invalid window!
23:35:29 Error: Invalid window!
23:35:30 Error: Invalid window!
Any ideas?
Yes, upgrade your mIRC :)
I tested this on mIRC 6.35 with /hopall -h Rejoining
I was on 6 networks, 34 channels.
It worked fine :)
Thankyou Lindrian
[quote]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Disclaimer: ;
; Lindrian\'s \"Mass hop/part\" snippet (/hopall) copyright 2007 ;
; Lindrian, all rights are reserved by the author ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Yeah OK...
I take it this was built for mIRC ver 6.3 or below?
As I have tried it with 6.31 and I get the following output...
The script will now rejoin all your channels. Please give it time to process all your channels on all networks.
3 channel(s) will be affected. The script will be fully processed in 3 second(s).
23:35:28 Error: Invalid window!
23:35:29 Error: Invalid window!
23:35:30 Error: Invalid window!
Any ideas?
Ik.