Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a script to do an auto-whois on a specific user every 5 mins? I'm trying to monitor when someone logs to a server. I'm using mIRC

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 9:40

This question came from our site for professional and enthusiast programmers.

    
didn't mIRC died with appearance of MSN, Facebook, Twitter, etc...? –  metaforce Jun 16 '11 at 14:05
1  
@metaforce nope, it withstood the test of time. something MSN couldn't do and soon you will find out facebook and twitter won't do either. –  Wiz Jun 17 '11 at 4:30
    
maybe, maybe... it's CLI should be linked with windows file system and commands, as well as to create a linuxable version if mIRC plans to withstood the test of time ;) –  metaforce Jun 17 '11 at 7:36
    
a lot of games and some websites continue using IRC protocol to create specific chats (e.g. OpenLieroX, www.vertvonline.org) –  kokbira Jul 11 '11 at 11:36

3 Answers 3

You should use the irc notify command for this. That will tell you when a nick joins or leaves the network.

share|improve this answer

You should use the Notify List, essentially its a monitoring system that can notify you when someone on your list connects or disconnects from IRC.

You can add a nick using /notify nickname and remove it using /notify -r nickname. You can also access it using the address book dialog (/abook -n or alt+b -> Notify Tab).

you can also use the on notify event to customize the notification:

on *:notify:{
  echo -s $nick has connected to $network $+ !
}

If you really want to just whois them every 5 minutes, you will have to hard code everything yourself, here is a basic idea of how to achieve this:

;trackee name
alias trackee return foobar

on *:connect:{
  ; start an infinite timer when we connect
  .timerCHECK_ONLINE 0 300 doWhois 
}

alias doWhois {
  ; set a flag and initiate a whois command 
  ; the flag is important to differentiate our whois from the user's
  set %docheck 1
  whois $trackee
}

raw *:*:{
  var %n = $numeric
  if (%docheck) {
    if (%n == 401) {
      echo -s [Monitor] $qt($2) is not online!
      ;clear the flag
      unset %docheck
    } 
    elseif (%n == 311) {
      ;start of whois
      echo -s [Monitor] =~=~=~=~=~=~=~= WHOIS START =~=~=~=~=~=~=~=
      echo -s [Monitor]      Nick: $2 $+([, $4, ])
      echo -s [Monitor] Real Name: $6
    }
    elseif (%n == 318) {
      ;end of whois
      echo -s [Monitor] =~=~=~=~=~=~=~=  WHOIS END  =~=~=~=~=~=~=~=
      ;clear the flag
      unset %docheck
    }
    elseif (%n == 312) {
      ; server
      echo -s [Monitor]    Server: $3 $+([, $4-,])
    }
    elseif (%n == 317) {
      ; idle time
      echo -s [Monitor]      Idle: $duration($calc($ctime - $4)) $&
        $+([, Since:, $chr(32), $asctime($4, hh:nn:ss TT mm/dd/yy), ])
    }
    ;elseif (%n == ...) add more numeric events here
    ;...

    ; stop mIRC's default text
    halt
  }
}

which will return either:

[Monitor] "foobar" is not online!

or something like this:

[Monitor] =~=~=~=~=~=~=~= WHOIS START =~=~=~=~=~=~=~=
[Monitor]      Nick: foobar [FooNet-343F144.fooISP.net]
[Monitor] Real Name: John Doe
[Monitor]    Server: *.example.com [FooNet network]
[Monitor]      Idle: 6mins 38secs [Since: 05:19:07 PM 06/16/11]
[Monitor] =~=~=~=~=~=~=~=  WHOIS END  =~=~=~=~=~=~=~=
share|improve this answer

Two simple options:

Way1:
i would use the Notify option like the other man suggested.
do /help /notify
to learn more from the help mIRC..
some commands:
add: /notify +nickname
- the + is when the user is online it will whois him, just dont add too many otherwise the server will disconnect you because of a flood.
remove: /notify -r nickname

Way 2:
or you can do
/timer 0 300 whois nickname

0 - infinite times
300 - seconds between commands
whois nickname - command for whois.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.