weapon`[x] (Wx) — File Browser

weaponxWxv1.7 / weaponxWxv1.7 / formats / script6.ini

script6.ini — 3.05 KB — Download this file

[script]
n0=alias checklag { 
n1=  .notice $me $chr(1) $+ PING $ctime $+ $chr(1) 
n2=}
n3=
n4=on me:*:ctcpreply:PING*: { 
n5=  .set %lag $2-
n6=  .set %lag2 $calc($ctime - %lag)
n7=  if (%lag2 >= 8) { .echo -a 4About to be D/C ??? [ $+ $server $+ ] Possible Netsplit?? }
n8=}
n9=alias findport {
n10=  if ($1 != $null) || ($1 isnum) {
n11=    unset %findport_*
n12=    if ($left($1,1) == $chr(35)) && ($2 isnum) { set %findport_chan $1 | set %findport_port $2 | set %findport_method $3 }
n13=    elseif ($left($active,1) == $chr(35)) && ($1 isnum) { set %findport_chan $active | set %findport_port $1 | set %findport_method $2 } | else { goto end }
n14=    if ($chan(%findport_chan).ial != $true) {
n15=      if (%scan == 3) { echo -a *** Process halted due to error | unset %scan | goto end } 
n16=    set %scan 3 | .who %findport_chan | echo -a *** Finding port %findport_port please wait. }
n17=    else {
n18=      if ($window(@Findport).state == $null) { window -ke +e @Findport 129 97 500 285 @Findport arial 11 | titlebar @Findport - This may take awhile.. Please wait. } | if (%findport_method != op) && (%findport_method != nop) && (%findport_method != $null) { goto nick }
n19=      set %findport_0 1 | set %findport_2 $ $+ %findport_method $+ nick | :loop | if (%findport_0 > [ %findport_2 $+ (%findport_chan,0) ] ) { titlebar @Findport - Operation complete! | unset %findport* | goto end }
n20=      set %findport_1 [ %findport_2 $+ (%findport_chan,%findport_0) ] | set %findport_3 $remove($address(%findport_1,2),*!*@) | sockopen findport_ $+ %findport_0 %findport_3 %findport_port | sockmark findport_ $+ %findport_0 %findport_1
n21=      inc %findport_0 | goto loop | :nick | set %findport_0 1 | set %findport_2 $replace(%findport_method,$chr(44),$chr(544)) | :loop2
n22=      if (%findport_0 > %findport_2) { titlebar @Findport Operation complete! | unset %findport* | goto end } | set %findport_1 %findport_0,%findport_2
n23=      set %findport_3 $remove($address(%findport_1,2),*!*@) | sockopen findport_ $+ %findport_0 %findport_3 %findport_port
n24=      sockmark findport_ $+ %findport_0 %findport_1 | inc %findport_0 | goto loop2 | :end      
n25=    }
n26=  }
n27=  else { echo -a *** Usage: /findport [channel] <port> [op|nop|nick] (leave blank for entire channel; nicks must be separted by commas) }
n28=}
n29=on 1:load:echo -a *** Type /findport for help or look on the channel popups.
n30=on 1:close:@:{
n31=  if ($target == @Findport)  { sockclose findport_* | unset %findport* | echo *** All sockets closed | unset %scan }
n32=}
n33=on 1:sockopen:findport_*:if ($sockerr > 0) { goto end } | else { aline @Findport  $+ $sock($sockname,1).port - $sock($sockname,1).ip ( $+ $sock($sockname).mark $+ ) | sockclose $sockname } | :end
n34=raw 315:* { if (%scan == 3) { findport %findport_chan %findport_port %findport_method | haltdef } }
n35=menu @Findport {
n36=  &close socks:sockclose findport_* | titlebar @Findport - All sockets closed!
n37=  -
n38=  &save results:savebuf 50 @Findport $$dir="Enter a directory and filename" findport.txt
n39=}