mIRC Home    About    Download    Register    News    Help

Print Thread
#174074 02/04/07 03:05 AM
Joined: Jul 2006
Posts: 19
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Jul 2006
Posts: 19
i need a an alias, that when its called it counts the number of occurrences of the supplied text...

the raw is the raw for /who and i need it to determine how many users are on each server

so in the alias it should be like
Php Code:

alias whoServer {
;/lusers is used by a different part of the script
/lusers
;assign a var for which server ident im checking...
var %swho = java
if (%swho == java) {
/who java
}
var %swho = addict
if (%swho == addict) {
/who addict
}
}
 


something like this where in the alias it has the ability to run /who on multiple idents, and then in the raw event, count how many are on each...

Php Code:

raw 352:*: {
  if (%swho == java) {
	inc %who
  }
  else {
	if (%swho == addict) {
	  inc %cwho
	}
  }
  haltdef
}
 


i have tried many variations including a while loop in the raw checking separately for each event however this froze up mirc. it is probably just a limitation in my knowledge so any help would be greatly appreciated. thanks.


For everything else, there's MasterCard.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) You can't do a /who on an entire server or network.
2) If you want to know how many users are on a server, you can use
Code:
/lusers <server>

NB: This is only guaranteed for the UnrealIRCd

While the /lusers command does generate more than the information that you requested, it's going to be a lot easier to do that than to perform a /who on each nick or each channel on the server

Joined: Jul 2006
Posts: 19
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Jul 2006
Posts: 19
no, i need it for an ident... the java applets use different idents. each is on the same server from a fifferent website. so /who identname gives me the needed info? any help?


For everything else, there's MasterCard.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Before I go any further, can you confirm that the network uses UnrealIRCd? If it does, then I know where to get the information..if not, then I'll have to hunt up the details for that IRCd first.

Joined: Jul 2006
Posts: 19
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Jul 2006
Posts: 19
chatspace 3.1 ... i can give you the raw for what i need its 352... thats the /who response and $3 is the value of the ident.


For everything else, there's MasterCard.

Link Copied to Clipboard