on admin:TEXT:.Reload*:?:{
ReloadAllScripts
ReloadUsers
msg $nick Reload: Complete.
ReloadCurrent
}
alias ReloadAllScripts {
; Unload all current scripts, except the current script
var %Count = 1
while ( $script(0) > 1 ) {
if ( $script(%Count) != $script ) {
.unload -rs $chr(34) $+ $script(%Count) $+ $chr(34)
}
else { inc %Count }
}
; Load all scripts in the current script directory, except the current script
var %Count = 1
while ( $findfile($scriptdir,*.ini,%Count) > != $null ) {
if ( $findfile($scriptdir,*.ini,%Count) != $script ) {
.load -rs $chr(34) $+ $findfile($scriptdir,*.ini,%Count) $+ $chr(34)
}
inc %Count
}
}
alias ReloadCurrent {
; Reload the current script
.reload -rs $chr(34) $+ $script $+ $chr(34)
}
alias ReloadUsers {
; Reload the current users file
.reload -ru Users\Users.ini
}