mIRC Home    About    Download    Register    News    Help

Print Thread
#136900 05/12/05 09:58 AM
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
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?

Last edited by Confuzzled; 05/12/05 10:01 AM.
#136901 05/12/05 03:59 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
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.

Last edited by schaefer31; 05/12/05 05:58 PM.
#136902 06/12/05 09:29 AM
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
GREAT!,

works excellent, thank you very much for your huge help

#136903 06/12/05 10:22 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
You do know that it's allowed to put each command on a separate line? Scripts can have more than 3 lines...

#136904 07/12/05 09:17 AM
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
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

#136905 07/12/05 10:13 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.


Link Copied to Clipboard