mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hello again, i am looking for some help an a lil script that tracks users by nick so when they change nicks it stores the info into a file for recall. anyways what i'm trying to do is make it so this is only accessed if opped.

heres what i got so far.
Code:
 ON *:START: {
  hmake trackusers 10
  if ($isfile(trackusers.dat)) {
    hload trackusers trackusers.dat
  }
}
on *:JOIN:#: {
  if ($hget(trackusers,$address($nick,3))) {
    var %n = $ifmatch
    if ($istok(%n,$nick,32)) { var %d = $deltok(%n,$findtok(%n,$nick,1,32),32) }
    else { var %d = %n }
    if (!%d) { return }
    echo $colour(info) -ti2 $chan * $nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
    if (!$istok(%n,$nick,32)) {
      hadd trackusers $address($nick,3) %n $nick
    }
  }
  else {
    hadd trackusers $address($nick,3) $nick
  }
}
on *:NICK: {
  if ($hget(trackusers,$address($newnick,3))) {
    var %n = $ifmatch
    if (!$istok(%n,$newnick,32)) {
      hadd trackusers $address($newnick,3) %n $newnick
    }
  }
  else {
    hadd trackusers $address($nick,3) $newnick
  }
}
menu nicklist {
  TEST
    .Nick Tracker
    ..Track Users
    ...View Other Nicknames):{
    iif ($me isop $chan)
    if (!$address($$1,3)) { echo $colour(info) -ti2 # * IAL not updated for $$1 $+ , performing userhost lookup | userhost $$1 | return }
    if ($hget(trackusers,$address($$1,3))) {
      var %n = $ifmatch
      if ($istok(%n,$$1,32)) { var %d = $deltok(%n,$findtok(%n,$$1,1,32),32) }
      else { var %d = %n }
      if (!%d) { goto notknown }
      echo $colour(info) -ti2 # * $$1 has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
    }
    else {
      :notknown
      echo $colour(info) -ti2 # * $$1 has not been known by any other nickname
    }
  }
  .Reset:hdel trackusers $address($$1,3)
}
ON *:EXIT: {
  if ($hget(trackusers)) { hsave -o trackusers trackusers.dat }
} 
 


i am trying to understand the isop cammand , but am having trouble.

thanks in advance

Joined: Aug 2004
Posts: 1
C
Mostly harmless
Offline
Mostly harmless
C
Joined: Aug 2004
Posts: 1
$iif($me isop $chan,blahpopup)

Last edited by core01; 17/08/04 05:54 AM.
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
thanks core01 for the fast response...

thank did the trick...

thanks again


Link Copied to Clipboard