mIRC Homepage
Posted By: Confuzzled need help on fly by - 05/12/05 09:58 AM
i got this from hawkee's but did a lil editing,

Code:
#flyby on
on !*:JOIN:#:{
  if (% [ $+ [ $wildsite ] $+ ] .rd == $null) { set -u10 % [ $+ [ $wildsite ] $+ ] .rd on }
}
on !*@:PART:#:{
  if (% [ $+ [ $wildsite ] $+ ] .rd != $null) { ban -u60 # $address($nick,1) | /splay unstable.wav | /msg $chan 15,15 14,14 2,2 5,15 Door Revolving 2,2 12,15 triggered by 2,2 4,15 $nick 2,2 12,15 in 2,2 4,15 # 2,2 4,15 Banned 12for4 60 Seconds 2,2 14,14 15,15  | notice $nick you've been placed on a 60 Seconds BAN for Door Revolving }
}
#flyby end 


it works fine, but was hoping if there is any way i could msg the nick of the person that got banned when the nick has been UNBANNED after that 60 seconds. that could scan if banned nick is still online or irc then it'll msg or notice the nick and tell the nick that he or she has been unbanned for that 60 ban if banned nick is no longer online or irc it won't do nothing. can that be done?...if yes how? or what do i do?
Posted By: schaefer31 Re: need help on fly by - 05/12/05 03:59 PM
You could store the nick in a temp var then set a timer to do a whois after the ban expires. At that point use the raw event to determine if the nick is still online and if so send a msg. I'm not sure though, maybe someone else knows a simpler way.

Something like this

Code:
on !*@:PART:#:{
  if (% [ $+ [ $wildsite ] $+ ] .rd != $null) { 
    [color:green]; You should put these commands on separate lines
    ; It's much easier to read this way rather than all on one line[/color]
    ban -u60 # $address($nick,1)
    splay unstable.wav
    msg $chan 15,15 14,14 2,2 5,15 Door Revolving 2,2 12,15 triggered by 2,2 4,15 $nick 2,2 12,15 in 2,2 4,15 # 2,2 4,15 Banned 12for4 60 Seconds 2,2 14,14 15,15 
    notice $nick you've been placed on a 60 Seconds BAN for Door Revolving
    set %tmp1 $nick
    set %tmp2 $chan
    set %tmp3 $true
    timer 1 60 whois $nick
  }
}

raw 311:*:{
  if (%tmp3) {
    msg %tmp1 You were unbanned from %tmp2
    unset %tmp*
  }
}


Since raw 311 isn't returned if the nick is offline, it should be ok to use that. I used a flag variable so that it doesn't send the unbanned message when you just do a normal whois.
Posted By: Confuzzled Re: need help on fly by - 06/12/05 09:29 AM
GREAT!,

works excellent, thank you very much for your huge help
Posted By: Kelder Re: need help on fly by - 06/12/05 10:22 AM
You do know that it's allowed to put each command on a separate line? Scripts can have more than 3 lines...
Posted By: Confuzzled Re: need help on fly by - 07/12/05 09:17 AM
yes now i know, it's cause i'm not use to do each command on seperate line i'm being use to the | cause before when i try to do that it always misplace the full script maybe bracket mismatch but yes thank you guys for the huge help
Posted By: RusselB Re: need help on fly by - 07/12/05 10:13 AM
Generally speaking scripts are easier to read & debug/repair if they don't use | since each command is then on a different line, it's easier to figure out just where a problem is. Additonally, using | limits you as to the number of characters & commands you can put on a single line.

I'm currently working on a revision of my Truth-or-Dare/Spin the bottle script, & I'd be going crazy if I had to use pipes, rather than separate lines.
© mIRC Discussion Forums