mIRC Home    About    Download    Register    News    Help

Print Thread
C
clutz1572
clutz1572
C
hello again,

i'm in need of some assistance with a snippet called nick sniper by bl4h. i cant seem to get it right, the problem is that i can't get it to do the if nick is online check, i don't know how to do this. this what i have got so far:
Code:
 
nicksniper { 
if ($tempr(NickSniper,Enabled) == On) { 
  if (%stealnickback = $null) { set %stealnickback $?="What nick do you want back?" } 
  if ($me = stealnickback) { echo -a *** Not watching %stealnickback anymore } 
  %stealnickback = $1 
  if ($timer(stealnickback)) { .timerstealnickback off } 
  .timerstealnickback 0 5  
  echo -a *** Watching nickname $1  
} 
else echo -a *** Nick Sniper Is Not Enabled !!! 
} 
 

and the raw that goes with it :
Code:
 
raw 303:*:{ 
if (%stealnickback != $2) { 
  nick %stealnickback 
  echo -a *** Regained %stealnickback  
  .timerstealnickback off | halt 
 } 
 


to clarify what this is supposed to do is recapture your nick when either you get disconected and rejoin a chan and you ghosted or someone has your nick. it cycles the check thru a timer and when the nick becomes free it takes it back automaticly. now i have this set to work from a dialog. i know this is not correct, so i'm looking for some help.

here is what the original code looks like:
Code:
 
raw 303:*:{ 
  if (%bl4h.stealnick != $2) { 
    nick %bl4h.stealnick 
    echo -a *** Regained %bl4h.stealnick  
    unset %bl4h.stealnick 
    .timerstealnick off 
  } 
  haltdef 
} 
alias snipenick { 
  if (!$1) { echo -a USAGE: /snipenick <nickname> | halt } 
  if (%bl4h.stealnick) { echo -a *** Not watching %bl4h.stealnick anymore } 
  %bl4h.stealnick = $1 
  if ($timer(stealnick)) { .timerstealnick off } 
  .timerstealnick 0 5 /ison $1 
  echo -a *** Watching nickname $1  
} 
 


any help is appreciated.... thanks in advance

Joined: Mar 2004
Posts: 358
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 358
I'm not exactly sure about that, but a much simpler way is to first add the nickname you want to regain to your notify list. Then add this to remotes: on 1:unotify:if ($nick == NICKNAME) { nick NICKNAME }

C
clutz1572
clutz1572
C
thanks for the reply LostServ,

thats what i thought i would end up having to do. but i saw this and decided to see if it could work, unfortunately i was unable to figure it out.. frown

Joined: Mar 2004
Posts: 358
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 358
Well maybe someone else could, but if not thats a pretty good way, except when you try to change your nickname.. wink

C
clutz1572
clutz1572
C
true..... lol

i guess i'll have to look into that.... back to the help files i go! shocked


Link Copied to Clipboard