Bot Whois

By larry on Feb 24, 2007

Just load this in your remote and then type /whois.settings to set all settings correct.

Feel free to edit it as long as you keep the first four lines unchanged :P

/* 
Bot Whois by Larry 
http://larrybolt.ind-web.com/index2.php?page=script&action=view&id=5
*/
on 1:load: {
  if ($version >= 6.2) {
    echo -a Bot Whois by Larry Loaded
    echo -a Rightclick here or type /whois.settings to set all settings
  }
  else {
    echo -a Please download the latest version of mIRC before using this script @ 12http://www.mirc.com/
    run http://www.mirc.com/
    unload -rs $scriptdir $+ $script
  }
}
on 1:start: {
  unset %whois.*
}
menu * {
  Bot Whois $iif(%whoisstat == on, $+($chr(91),Enabled,$chr(93)), $+($chr(91),Disabled,$chr(93)))
  .on:/set %whoisstat on
  .off:/set %whoisstat off
  .Command $+($chr(91),%whoiscommand,$chr(93)):/set %whoiscommand $?="What command will be used for the bot whois?"
  .level $+($chr(91),%whoislevel,$chr(93)):/set %whoislevel $?="What level do people need to access the bot whois?"
}

#whois.gen on
on *:text:*:#: {
  if ($1 === %whoiscommand) && (%whoisstat == on) && ($level($nick) == %whoislevel) {
    set %whois.chan $chan
    set %whois.nick $2
    .enable #whois.whois
    .disable #whois.gen
    .timer 1 1 whois $2 $2
    .timer 1 10 whois.off
  }
}
on *:text:*:?: {
  if ($1 === %whoiscommand) && (%whoisstat == on) && ($level($nick) == %whoislevel) {
    set %whois.chan $nick
    set %whois.nick $2
    .enable #whois.whois
    .disable #whois.gen
    .timer 1 1 whois $2 $2
    .timer 1 10 whois.off
  }
}

#whois.gen end
#whois.whois off
raw 311:*: { 
  set %whois.L1 nick: $+($chr(31),$2,$chr(31)) 
  set %whois.L2 name: $+($chr(31),$3,$chr(31)) 
  set %whois.L3 host: $+($chr(31),$4,$chr(31)) 
  set %whois.L4 Fullname: $+($chr(31),$6-,$chr(31))
}
raw 307:*: {
  set %whois.L5 %whois.nick has registerd his nickname
}
raw 317:*: { 
  set %whois.L6 Signed on at: $chr(31) $+ $asctime($4,dddd dd/mm/yyyy HH:nn:ss) $chr(31)
  set %whois.L7 Time idle: $chr(31) $+ $duration($3) $chr(31)
  set %whois.L8 Time online: $chr(31) $+ $duration($calc($ctime - $4)) $chr(31)
}
raw 319:*: { 
  set %whois.L9 Channels: $chr(31) $+ $3- $chr(31)
}
raw 318:*: {
  if (%whois.L1) {
    whois.show 
  }
}
#info.whois end
alias whois.show {
  msg %whois.chan ~-====== WHOIS ======-~
  if (%whois.L1) .timer 1 1 msg %whois.chan  %whois.L1 
  if (%whois.L2) .timer 1 2 msg %whois.chan  %whois.L2 
  if (%whois.L3) .timer 1 3 msg %whois.chan  %whois.L3 
  if (%whois.L4) .timer 1 4 msg %whois.chan  %whois.L4 
  if (%whois.L5) .timer 1 5 msg %whois.chan  %whois.L5 
  if (%whois.L6) .timer 1 6 msg %whois.chan  %whois.L6 
  if (%whois.L7) .timer 1 7 msg %whois.chan  %whois.L7 
  if (%whois.L8) .timer 1 8 msg %whois.chan  %whois.L8 
  if (%whois.L9) .timer 1 9 msg %whois.chan  %whois.L9
  .timer 1 10 msg %whois.chan ~-====== END ========-~ 
  .enable #whois.gen
  .disable #whois.whois
  unset %whois.*
}
alias whois.off {
  if ($group(#whois.gen) != on) {
    .timer 1 1 msg %whois.chan ~-====== WHOIS ======-~
    .timer 1 2 msg %whois.chan %whois.nick is not on IRC
    .enable #whois.gen
    .disable #whois.whois
    unset %whois.*
  }
}
alias whois.settings {
  set %whoisstat on
  set %whoiscommand $?="What command will be used for the bot whois?"
  set %whoislevel $?="What level do people need to access the bot whois?"
  set %whoisstat $iif($?!="Enable the Bot Whois now?" == $true, on, off)
}

Comments

Sign in to comment.
Clouds   -  Oct 07, 2007

For those of you who want to see how this script works.

[22:28] .whois Smudge
[22:28] <@Cruiser> [WHOIS]
[22:28] <@Cruiser> Nickname: Smudge
[22:28] <@Cruiser> Ident: 366Smudge
[22:28] <@Cruiser> Host: Smudge.users.netgamers.org
[22:28] <@Cruiser> Fullname: Smudge
[22:28] <@Cruiser> Signed on at: Thursday 04/10/2007 09:59:38
[22:28] <@Cruiser> Time idle: 22mins 55secs
[22:28] <@Cruiser> Time online: 3days 12hrs 27mins 43secs
[22:28] <@Cruiser> Channels: #rock +#cruiser #ManagerLeague #planetarion @#tvbot @#transcendancy

 Respond  
Clouds   -  Oct 07, 2007

This is a very usful script, As AHBARAR stated, you need to set the level to 1. I hardly edited a thing. Top marks.

 Respond  
AHBARAR   -  Jun 03, 2007

sry bro it just missed off after i tried it again when i added + ) wht ever i say it send msg
: ~-====== WHOIS ======-~
text is not on IRC
i tried all the ways as long as this )) there will stay like this and if u taked it out it will not work on levels just if levels set to 1
so i took the levels away and chaned
on :text::#: {
to
on 500:text:*:#: {
and same for pvt thing
sry for my disturb

 Respond  
AHBARAR   -  Jun 03, 2007

Nice it worked with me but i had 1 problem it never worked in any levels exept 1 any other it will not work so i change the --> $ if ($1 === %whoiscommand) && (%whoisstat == on) && ($level($nick) == %whoislevel) {
to
if ($1 === %whoiscommand) && (%whoisstat == on) && ($level($nick)) == %whoislevel) {
i think tht silly---> )) besid the $nick fixed it ~_~
but it work awesome >:D thx my friend

 Respond  
RoninWarrior   -  Feb 24, 2007

You could have it write to a .txt file then have it play to the channel or person that requested it instead of all of the .timers atleast that way it will be a bit shorter code.Othere then that not to bad,keep up the good work.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.