mIRC Homepage
Posted By: Deep3D Update IAL before executing command - 03/03/18 02:03 PM
I have this code
Code:
aop $$input(Edit hostname:, e,Auto OP, $address($$1-,1)) # 

to make it work the IAL has to be updated, so I often have to run /who <nickname> first to make it work.

How can I make the code update the IAL and then add the user?

I've tryed:
Code:
who $$1 | aop $$input(Edit hostname:, e,Auto OP, $address($$1-,1)) # 

but that did not work, I also tryed to add /timer infront of /aop to give mIRC time to do the update, but that didn't work either.
Posted By: Raccoon Re: Update IAL before executing command - 03/03/18 06:33 PM
You just need to send a /ialfill #channel (basically: /who #channel) only one time after having joined the channel. You can set it up to do this only when you are opped in a channel -- where you're likely to need it.

Code:
On *:OP:#: {
  if ($opnick == $me) {
    if ($chan($chan).ial == $false)
      ialfill $chan
} } }

Again, after having done an /ialfill only once in a channel, your client should remain synchronized from then on and require no additional /who commands to obtain new address details. (things like gecos and nickserv account details can be more challenging depending on the server.)

Be careful not to allow your client to hammer the server with a dozen /ialfill's in a row, or you are likely to be disconnected for flooding (excessive flood). A more advanced script will make sure to space them out by 10 seconds apart from when the previous command finishes (End of /WHO numeric).
Posted By: Deep3D Re: Update IAL before executing command - 03/03/18 11:58 PM
This is what I ended up doing. wink

Popups:
Code:
.Auto Op
..Add User:echo -a - | echo -a Updating The Internal Address List: | who $$1 | .timerauto-op 1 1 auto-op-who $$1


Aliases:
Code:
auto-op-who {
  if users isin $address($$1-,1) { aop $$input(Edit hostname:, e,Auto-Op, $address($$1-,2)) # }
  else { aop $$input(Edit hostname:, e,Auto-Op, $address($$1-,13)) # }
  notice $$1 You ( $+ $! $+ ) have been added with auto op in channel #
}
© mIRC Discussion Forums