Page 1 of 1
i search an rehash script
Posted: Mon Mar 29, 2004 4:39 am
by X-Trancer
i search a rehash script for rehashin all server on 1 command
/rehashall
Posted: Mon Mar 29, 2004 11:36 pm
by aquanight
Code: Select all
alias rehashall {
if (!(o isin $usermode)) {
echo -stc info * Rehashing all servers usually requires Global Operator priviliges.
return
}
echo -stc info * Rehashing all servers...
.enable #rehashall
.links
}
#rehashall off
raw 364:*:{
echo -stc info * Trying Rehash on $2 $+ ...
rehash $2
}
raw 365:*:{
echo -stc info * End /REHASHALL
disable #rehashall
}
#rehashall end
(Just because I feel like explaining it...)
The alias bit defines /rehashall which first checks if you're at least a global operator (you have umode +o). If not, it prints an error and quits, since only global operators can remote rehash. If you are a global operator, it starts the process by enabling the two raw events below and doing /links. Raw 364 is RPL_LINKS which is the numeric that transports the replies in a LINKS list. When a links reply is received, a rehash is issued for that server. Raw 365 is RPL_ENDOFLINKS which indicates the end. The script outputs a message indicating such, and disables the raw events to prevent them from triggering when you aren't rehashing everything.
rehashall
Posted: Tue Mar 30, 2004 1:00 am
by jewles
cool, I was actually looking for something like this... but I don't know enought about coding to do anything with the code... provided in the last post... If anyone would like to assist me... I'd be most gracious

...
Posted: Tue Mar 30, 2004 1:11 am
by lord2800
I wouldn't have been able to come up with something that complex. I probably would've hardcoded the whole thing. My hat's off to you.
Posted: Tue Mar 30, 2004 5:01 am
by X-Trancer
cool thank you verry match
Re: rehashall
Posted: Tue Mar 30, 2004 6:34 pm
by aquanight
jewles wrote:cool, I was actually looking for something like this... but I don't know enought about coding to do anything with the code... provided in the last post... If anyone would like to assist me... I'd be most gracious

...
All you do is copy-paste this into the Remote tab in the mIRC Script Editor. Then type /rehashall in any window belonging to a server on which you are a Global Operator and press Enter to watch every server get rehashed.
IIRC, you'll only see rehash replies from the local server. Remote rehashes don't send status messages (like "Configuration loaded without problems, etc).
Posted: Wed Mar 31, 2004 5:24 am
by X-Trancer
Code: Select all
IIRC, you'll only see rehash replies from the local server. Remote rehashes don't send status messages (like "Configuration loaded without problems, etc).[list]
This is normal ev have Agrywolf a module to remote rehash[/list]