mIRC Homepage
Posted By: Kurdish_Assass1n Need help with script - 21/10/06 05:19 PM
Hi everyone, I have this script, it works, it just has a little problem:
Code:
alias listusers { 
  var %i 1
  var %users $nick(#,0)
  var %bots ORiGiN XBC-BOT |||{-_-}||| HeLPBoT
  while (%i <= %users) {
    if ($istok(%bots,$nick(#,%i),32)) { inc %i }
    echo -a $nick(#,%i) 
    inc %i
  }
}

The problem is that it doesn't say ORiGiN or |||{-_-}|||, but it does say XBC-BOT and HeLPBoT, which I don't want, anyone know why?
Posted By: MikeChat Re: Need help with script - 21/10/06 06:06 PM
could it be that you have a match so it increases the %i then the script increases %i again?
try using return in the match section and see what you get
Posted By: Kurdish_Assass1n Re: Need help with script - 21/10/06 07:11 PM
Hey MikeChat, I tried using return, but, it only returns the nick before all of those bots (most of them are ops, so, they are always at the top of the list), Any other idea, or any other way to write this script?
--------------
ORiGiN = +o
XBC-BOT = +o (BotServ)
|||{-_-}||| = +o
-
HeLPBoT = +v
Posted By: Riamus2 Re: Need help with script - 21/10/06 09:43 PM
Code:
alias listusers { 
  var %i 1
  var %users $nick(#,0)
  var %bots ORiGiN XBC-BOT |||{-_-}||| HeLPBoT
  while (%i <= %users) {
    if (!$istok(%bots,$nick(#,%i),32)) { echo -a $nick(#,%i) }
    inc %i
  }
}
Posted By: Kurdish_Assass1n Re: Need help with script - 21/10/06 11:30 PM
Ok, another problem, I get the same idle time for most of the users when I use /idleusers
Code:
alias idleusers { 
  var %i 1
  var %users $nick(#,0)
  var %bots ORiGiN XBC-BOT |||{-_-}||| HeLPBoT
  while (%i <= %users) {
    if (!$istok(%bots,$nick(#,%i),32)) { echo -at 0 $nick(#,%i) 4has been idle in # for: 0 $duration($nick(#,%i).idle) }
    inc %i
  }
}


Here's an example of what I get:
Quote:

[7:35:42] Behemoth has been idle in #Slava for: 36mins 39secs
[7:35:42] ChanBot has been idle in #Slava for: 54mins 49secs
[7:35:42] GLORY has been idle in #Slava for: 54mins 49secs
[7:35:42] Kurdish_Assass1n has been idle in #Slava for: 8mins 8secs
[7:35:42] MrGiMmE has been idle in #Slava for: 54mins 49secs
[7:35:42] Roj has been idle in #Slava for: 54mins 49secs
[7:35:42] SlAva has been idle in #Slava for: 54mins 49secs
[7:35:42] chario has been idle in #Slava for: 3mins 41secs
[7:35:42] HuNTa has been idle in #Slava for: 12mins 15secs
Posted By: MikeChat Re: Need help with script - 22/10/06 12:45 AM
all the nicks that have the same time "54mins 49secs" were in channel before you joined, and have been idle while you have been there right?
was that about 54mins 49secs?

raw 317 has the sign on time and time idle on the server, but in larger channels this may cause problems doing /whois nick nick to get the 317 for everyone

the $nick(#,nick).idle is pulling the info from the IAL on Your client and is limited to the amount of time You have been on
so you sign in and have someone who has idled for three weeks is (after freshing the IAL for the channel) are going to return the amount of time you have been in the channel.

Posted By: Kurdish_Assass1n Re: Need help with script - 22/10/06 05:29 AM
ahh, understood, so, there's no other way to get the idle time from all of the users in a channel? without actually /whois'ing everyone in the chan?
Posted By: Riamus2 Re: Need help with script - 22/10/06 01:43 PM
Always stay in the channel and it would be fine. wink

You might consider also setting it to look at your own connect time and anyone with an idle time equal to your time online would be marked as "Over X:XX:XX" so you knew the person has been idle since you arrived.
© mIRC Discussion Forums