mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2010
Posts: 4
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Feb 2010
Posts: 4
Please implement this. My nickstyler shows SOPs and Founders as [@OP] instead of [&SOP] or [~Founder].

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There has been discussions on isadmin before and the short version is that admins (and founders) aren't the same on every ircd (the server software). As such, there's no way to make it work on every network in the same way as isop or isvoice, which are standardized.

That said, you can easily check the $nick's modes to determine what level the nick is and based on the network's choice of symbol(s) for the higher "ranks," you can change the colors in that way. Just remember that what you set up on one network may not be the same for another network.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
For admins:

Code:
if ($nick($chan,$nick,&)) { do stuff }


For founders/owners:

Code:
if ($nick($chan,$nick,~)) { do stuff }


-or-

Code:
if ($nick isowner $chan) { do stuff }

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Or, on some networks for admins:
Code:
if ($nick($chan,$nick,!)) { do stuff }


Just to show how they are different from network to network.


Invision Support
#Invision on irc.irchighway.net
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Not wanting to put a damper on the situation, but I've encountered a couple of networks where founders/owners and admin just show in the nicklist as Ops (@), although the network recognizes the difference between them.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
How would mIRC tell if the user is an admin/founder on these networks, then?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
This is a server's option, where the server is never sending any informations about owner and admin in a /name reply, there's no way to tell the difference on such network.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Right. So those servers would omit that information at their own peril. I would see no problem with this.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
I think having admin and owner support like we have op halfop and voice support could only be a good thing, the problem is just about standard, mIRC can't just implement only one way to recognize owner/admin, mIRC will also fail for the case I just described in my previous post (no information about +q/+a in a /names reply), so that's not something mIRC has to implement, users have to.

Last edited by Wims; 05/02/10 02:45 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Would it not repeat them in the PREFIX= section of raw 005? PREFIX=@@@%+

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
mIRC *can* implement that method if it wanted.

I think the issue here is the definition of "owner", "admin" and "founder". On some networks this is defined by the server, is an inherent concept in the network and therefore has a mode (+q/+a) associated with it. This kind of network is what mIRC should target.

On other networks, channel founder/admin is implemented exclusively through a proxy services bot like ChanServ, but has no actual effect on the server. In the latter case we're not really talking about the same definition of "founder" (the definition as implemented by the IRC server). The latter definition of founder is just some toggle in a services bot-- ie. you're a founder to the bot, but it is not recognized by the server/network.

I don't see how ignoring the second situation would make the implementation inconsistent. Although they have the same functionality, the latter case isn't really the same thing.

If there is some third situation where there *is* in fact a server mode (+a/+q/etc) but it doesn't show up in PREFIX as a unique symbol, that's even moreso the server's fault. mIRC should not bother with this situation either. Instead, the maintainers of the IRCd in question should be educated on implementing a proper server that is usable by clients. mIRC shouldn't be responsible for working around shoddy implementations.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Quote:
mIRC *can* implement that method if it wanted.
Are you talking about checking +a/+q mode and ~/& prefix ?

Fact is that the RFC indicate what irc servers and irc client *should do/implement*, and that +q/+a modes isn't in that list.

Of course an irc's maintener can implement whatever he wants to since that's his server, and if people think that what he implemented sucks or what, they just don't use it and it's fine.
But imo it make no sense for an irc client to implement something related to X% of irc server if X isn't 100.
Now I have nothing against the implementation of any method, but then people will complain that either there's a mIRC bug because people are +q/+a but mIRC is saying the contrary (because the server isn't sending any prefix to difference owner/admin), either because the prefix isn't what mIRC is looking for.

Last edited by Wims; 05/02/10 08:17 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2009
Posts: 116
Vogon poet
Offline
Vogon poet
Joined: Jan 2009
Posts: 116
I just tend to use something like this:

Code:
alias modenum {
    var %x $left($nick($1, $2).pnick, 1)
    return $iif(%x !isin +%@&!~, 0, $replace(%x, +, 1, %, 2, @, 3, &, 4, !, 4, ~, 5))
}


which allows you to check if a certain nick has a certain ranking, but also allows you to compare the powers of 2 nicks:

Code:
if ($modenum($chan, $me) > $modenum($chan, $nick)) {


*shrug*


http://zowb.net

/server -m irc.p2p-network.net -j #zomgwtfbbq
(ssl on port 6697 and 7000)
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Rather than use $iif(), you could just zero pad the outcome, like this:

Code:
alias modenum return 0 $+ $replace($left($nick($1,$2).pnick,1),+,1,%,2,@,3,&,4,!,4,~,5,.,5)


(this also adds support for the IRCX "." (owner) prefix)

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Quote:
But imo it make no sense for an irc client to implement something related to X% of irc server if X isn't 100.


Really?

Quote:
ishop nickname v1 is a halfop on channel v2


mIRC also has isowner (undocumented). In fact, I've yet to be on an IRC that supports either of those, so those modes are not related to 100% of IRC servers. I'd say the greater majority is good enough.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Halfop is something very common today . I never heard about a server that is using +h mode with a character different from '%' whereas it is known different servers use different characters for owner/admin.
Now as I said I'm not against the suggestion, a support for owner/admin would be good, I just think there are problems with this implementation, first one is that there's already a support for owner for IRCX server, second is different servers use different characters for these modes.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard