Advertisement
westor

Debug Output External Network for Little_Fairy v1.0

Sep 2nd, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.92 KB | None | 0 0
  1. alias debug_output {
  2.   if (!%debug_output_network) && (!%debug_output_channel) { return }
  3.  
  4.   var %cid = $find_cid(%debug_output_network)
  5.  
  6.   if (!%cid) { return }
  7.  
  8.   scid -t1 %cid
  9.  
  10.   if ($status == connected) && ($me ison %debug_output_channel) {
  11.     msg %debug_output_channel Debug: $1-
  12.     halt
  13.   }
  14. }
  15.  
  16. alias start_debug {
  17.   if (!$2) && (!$3) { return }
  18.   if (%debug_output_network) && (%debug_output_channel) { return }
  19.   set -e %debug_output_network $1
  20.   set -e %debug_output_channel $2
  21.   debug -ni @debuging $!debug_output
  22. }
  23.  
  24. alias stop_debug {
  25.   if (!%debug_output_network) && (!%debug_output_channel) { return }
  26.   unset %debug_output_*
  27.   debug -c off @debuging
  28. }
  29.  
  30. alias -l find_cid {
  31.   var %t = $scon(0)
  32.  
  33.   if (!$1) || (!%t) { return 0 }
  34.  
  35.   while (%t) {
  36.     var %network = $scon(%t).network
  37.     var %cid = $scon(%t).cid
  38.     if ($1 == %network) { return %cid }
  39.     dec %t
  40.   }
  41.   return 0
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement