mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 20
J
Janus Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
i tried alot of stuff with this but nothin worked at all smirk
i just want to have an alias like /idletime <user> and see the idletime of this user
but how?
i dont wanna have a fully whois wink


Greets Janus
Joined: Jan 2003
Posts: 5
N
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2003
Posts: 5
$duration($nick(#,$1).idle) will return idle time

Last edited by NiLon; 03/01/03 05:33 AM.

NiLon (QuakeNet)
/msg NiLon Hi!
Joined: Jan 2003
Posts: 20
J
Janus Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
mhh thx
but im sorry to ask now how could i implement this?
do i have to put it in aliases or remote?
and how do i get this running?
damn sorry for this many questions heh im just a beginner in mirc scripting wink


Greets Janus
Joined: Jan 2003
Posts: 5
N
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2003
Posts: 5
alias idletime { echo -at <idle> $1 Has been idle: $duration($nick(#,$1).idle) }

And you put that on remote /idletime user

I am not't quite sure do you must been same channel whit the user but test it and other way is make raws.


NiLon (QuakeNet)
/msg NiLon Hi!
Joined: Jan 2003
Posts: 20
J
Janus Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
mhh k lookin good wink
works also with popup - nicklist
great..
but it doesnt work on query wink


Greets Janus
Joined: Jan 2003
Posts: 5
N
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2003
Posts: 5
Ok... If you want it better you need to use raws.


NiLon (QuakeNet)
/msg NiLon Hi!
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
well sorry i have ta say it...if ya dont wanna fully type /whois try typing /uwho its shorter LOL it displays idle time as well ok ya'll can get back ta bein serious now LOL

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
I would have thought something like this would (*Should* as I've not tested it - at work and can't access IRC!)

Put it all into the remotes section. (Alt+R)

Hope it is of some use to you.

Code:
alias idletime {
  [color:green];$1 has to be something[/color]
  if ($1 == $null) { echo -a 04,00[10,00idletime04,00] 04,00Useage: 06,00/idletime &lt;nick&gt; | halt }
  [color:green];If $2 is something, then you may have made a mistake when typing /idletime[/color]
  if ($2 !== $null) { echo -a 04,00[10,00idletime04,00] 04,00Useage: 06,00/idletime &lt;nick&gt; | halt }
  [color:green];If you are not connected to a server, it wouldn't work anyway![/color]
  if ($server == $null) { echo -a 04,00[10,00idletime04,00] 04,00Useage: 06,00You must be connected to a server | halt }
  [color:green];Adds the nick you specified to a variable to compare later[/color]
  set %idletime.nicks $addtok(%idletime.nicks,$1,44)
  [color:green];enables the #idletime[/color]
  enable #idletime
  [color:green];Runs a /whois on the nick you specified[/color]
  /whois $1
}
#idletime off
[color:green];307 - 310 are for DALNet only.[/color]
raw 307:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
raw 308:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
raw 309:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
raw 310:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
[color:green];311 returns nick!user@host and the "real name" for the user.[/color]
raw 311:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
[color:green];312 returns the server NICK is connected to.[/color]
raw 312:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
[color:green];313 returns if NICK is an IRC Operator[/color]
raw 313:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
[color:green];317 returns the idle time of the user.[/color]
raw 317:*:{
  [color:green];add the line below (remove the ";" from the line starting ";echo -a") if what you expect isn't returned.[/color]
  [color:green];This will echo out to you what is returned in the 317. You may need to alter the $1/$2/$3 etc in the code to get it[/color]
  [color:green];to return the correct results[/color]
  [color:green];echo -a 1= $1 2= $2 3= $3 4= $4 5= $5 6= $6[/color]
  [color:green];if the nick that is returned ($1) is in the variable list of people you are expecting replies from, it carries on...[/color]
  [color:green];This is in case you do "/idletime &lt;nick1&gt;" then "/idletime &lt;nick2&gt;" then "/idletime &lt;nick3&gt;" before the server replies[/color]
  if ($istok(%idletime.nicks,$1,44) == $true) {
    [color:green];echo out the results[/color]
    echo -a 04,00[10,00idletime04,00] 06,00 $+ $1 $+  04,00has been idle for 06,00 $+ $duration($3) $+ 
    [color:green];halts any default use of raw 317[/color]
    halt
  }
}
[color:green];318 returns the "End of /WHOIS".[/color]
raw 318:*:{ if ($istok(%idletime.nicks,$1,44) == $true) {
    [color:green];removes the nick from the variable list (once you've had a reply, you don't need it.[/color]
    set %idletime.nicks $remtok(%idletime.nicks,$1,44)
    [color:green];if there are more nicks in the variable then you don't want the group to be disabled.[/color]
    if ($numtok(%idletime.nicks,44) == 0) { disable #idletime | halt }
    halt
  }
}
[color:green];319 returns the channels the user is on[/color]
raw 319:*:{ if ($istok(%idletime.nicks,$1,44) == $true) { halt } }
#idletime end


I haven't read through it, so sorry if it doesn't make any sense!!!


Aubs.
cool

Joined: Jan 2003
Posts: 20
J
Janus Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
wow man, what an effort
uff...
tried to past it in my remote stuff and tried /idletime <nick>
but nothin happened

btw: i cant paste it like its displayed here, everthing is in 1 line smirk


NiLon on qnet tried to help me, but didnt work either smirk
heres what he tried
Code:
########## idletime ##########
alias idletime { .enable #idle | whois $1 $1 }
#idle on
RAW 318:*:/halt
RAW 317:*: { haltdef | echo -at $2 Idle: $duration($3) | .disable #idle }
RAW *:*:/halt
#idle end


some1 any idea?


Greets Janus
Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
You NEED to make sure it is exactly as I wrote it above.

Try copying and pasting one line at a time.

Still not tested it sorry, computer at home is having problems!!!


Aubs.
cool


Link Copied to Clipboard