|
LostShadow
|
LostShadow
|
Returning the users with the most comchans.
Anybody think they can make a while loop for listing the users from the most comchans to the least (let's just say, down to 3 comchans)?
And perhaps on a local and global scale. Local is a bit unnecessary though.
For global, just scan it by nick. I.e., I have an alias that returns all the global comchans by nick, but it would be nice if someone could make an alias to /echo a list of who has the most comchans in all your channels globally down to persay, 3 or 2 comchans (since listing 1 comchan would be virtually your entire IAL).
An output like..
NickX - 8 comchans with you. Nick2 - 6 comchans with you. Etc.
And then, ties would be, well, in random or alphabetical order.
;/
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Too late & too tired to write this up now, but I'll do it up after I get home from work, in about 10 hours.
BTW: Do you want the results shown to all in channel, just to you in channel, via a custom window, a dialog box or some combination there of.
Additionally, how are you defining the difference between local and global. If global is a match across all networks that you're on, note that it's possible for two different people to be using the same nick on two different networks, so your Global common channels won't technically be 100% correct.
On the other hand, if you mean local, as in on the same server that you're connected to, and global meaning all of the interlinked servers creating the network, this will be more difficult, and I believe, will require you to have IRCops level status on the network (referencing UnRealIRCd)
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Here's a code using $ial alias cc {
var %i = $ial(*,0), %w = @comchans
window %w
while %i {
if ( $ial(*,%i).nick != $me ) && ( $comchan($ial(*,%i).nick,0) > 1 ) aline %w $ial(*,%i).nick - $v1 comchans
dec %i
}
filter -wwtcue 3 32 %w %w
} Usage: /cc Another that will loop to all connections, channels, nicks & will distinguish to which connection that nick was alias cc2 {
var %s = $scon(0), %c, %n, %m, %w = @comchans
window %w
while %s {
scon %s
%c = $chan(0)
while %c {
%n = $nick($chan(%c),0)
while %n {
%m = $nick($chan(%c),%n)
if ( %m != $me ) && ( !$fline(%w,$network $+ : %m *,0) ) && ( $comchan(%m,0) > 1 ) aline %w $network $+ : %m - $v1 comchans
dec %n
}
dec %c
}
dec %s
}
filter -wwtcue 4 32 %w %w
} Usage: /cc2
Last edited by xDaeMoN; 02/06/07 07:31 AM.
|
|
|
|
LostShadow
|
LostShadow
|
Too late & too tired to write this up now, but I'll do it up after I get home from work, in about 10 hours.
BTW: Do you want the results shown to all in channel, just to you in channel, via a custom window, a dialog box or some combination there of.
Additionally, how are you defining the difference between local and global. If global is a match across all networks that you're on, note that it's possible for two different people to be using the same nick on two different networks, so your Global common channels won't technically be 100% correct.
On the other hand, if you mean local, as in on the same server that you're connected to, and global meaning all of the interlinked servers creating the network, this will be more difficult, and I believe, will require you to have IRCops level status on the network (referencing UnRealIRCd) You can echo it to a custom window. As far as different people using the same nick on different networks, that's fine.
|
|
|
|
|