Advertisement
westor

Connect & Join in Last Session for evilscrew v1.0

Apr 10th, 2020
1,380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.81 KB | None | 0 0
  1. ON *:EXIT: { save_servers_and_channels }
  2. ON *:START: {
  3.   var %f = last_session.txt
  4.  
  5.   if (!$file(%f)) { return }
  6.  
  7.   var %t = $lines(%f)
  8.   var %i = 1
  9.   while (%i <= %t) {
  10.     var %r = $read(%f,n,%i)
  11.  
  12.     if (%r) { %r }
  13.  
  14.     inc %i
  15.   }
  16.  
  17.   .remove $qt(%f)
  18. }
  19.  
  20. alias save_servers_and_channels {
  21.   var %t = $scon(0)
  22.  
  23.   var %i = 1
  24.   while (%i <= %t) {
  25.     var %server = $scon(%i).servertarget
  26.     var %port = $scon(%i).port
  27.     var %all_chans = $scon(%i).channels
  28.  
  29.     if (%server) && (%port) && (%all_chans) { write last_session.txt /server $iif(%i !== 1,-m) %server $+ : $+ %port -j %all_chans }
  30.  
  31.     inc %i
  32.   }
  33. }
  34.  
  35. alias -l channels {
  36.   var %i = 1
  37.   while (%i <= $chan(0)) {
  38.     var %c = $chan(%i)
  39.  
  40.     if (%c) { var %tot = $addtok(%tot,%c,44) }
  41.  
  42.     inc %i
  43.   }
  44.  
  45.   return $iif(%tot,$v1,0)
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement