mIRC Homepage
Posted By: Abstract Umodes for other users - 12/05/06 04:07 PM
I think it would be nice if a user could get user modes from another user without having to make a /who.

Some of my scripts need to get user modes from another user (because I need to know if he has +r mode, and avoid kicking him, for example), and I have to do it by raw 352, which can suppose an important time wasting, and also make script not work properly sometimes, if I have a little lag, for ex.

I think something as elemental as $umodes(nick) identifier should be implemented on mIRC; but also makes me think that it's not implemented due to some reason, because it seems to be obvious it's utility (in that case, if someone know why, please post it here laugh)

The identifier only should retrieve 'visible' umodes (avoiding retrieve modes like +i, for ex), of course.

What do you think about it?
Posted By: hixxy Re: Umodes for other users - 13/05/06 08:31 AM
The thing is, mIRC would have to perform a whois/who to get that information. It could be a strain on the server.

Not supported.
Posted By: Abstract Re: Umodes for other users - 13/05/06 01:45 PM
I think I'm not informed enough about how mIRC get some data, but doesn't mIRC have to do a who/whois to get some data, like ident, real name, host, etc?

Another idea could be adding a property to $ial that would return umodes from the other user ($ial().umodes, for ex).
Posted By: hixxy Re: Umodes for other users - 13/05/06 03:12 PM
Real name, yeah, ident/address, no.

mIRC doesn't offer a $realname(user) identifier to retrieve a real name through a /whois, though.

My point is, consider this:

Code:
alias listmodes {
  var %i = 1
  while ($nick($chan,%i)) {
    echo -a $nick($chan,$nick($chan,%i)).umodes
    inc %i
  }
}


What do you think will happen there? :tongue:
Posted By: Abstract Re: Umodes for other users - 13/05/06 05:20 PM
If there is someone that joined before me, and I didn't who/whois him/her before executing this alias, I won't get any data from that user; but I think this idea would be especially useful on "on join" events.

As you've said, if it could be only done by who/whois, I think it wouldn't make any sense.. it's a pity, this 'identifier' could make many scripters life a bit easier laugh
© mIRC Discussion Forums