Advertisement
makimaki

server shit

Feb 18th, 2011
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.98 KB | None | 0 0
  1. alias Serv {
  2.   if ($dialog(serv)) { dialog -x serv }
  3.   dialog -m serv serv
  4.   if ($window(@server)) { window -c @server }
  5.   window -aihznhw0 @server 1 1 0 0
  6.   xdock -m $window(@server).hwnd +b
  7.  
  8. }
  9.  
  10. dialog serv {
  11.   title "Servers"
  12.   size -1 -1 500 255
  13.   option pixel
  14. }
  15.  
  16. on *:DIALOG:serv:init:*:{
  17.   dcx Mark  serv callback_serv
  18.   xdialog -b $dname +ty
  19.   xdialog -g $dname +it images\toolbar.jpg
  20.   xdialog -c $dname 2 listview 5 5 490 220 report singlesel fullrow  nolabelwrap tooltip tabstop grid transparent showsel
  21.   xdid -t $dname 2 +l 0 120 Server Name $chr(9) +l 0 120 Server Address $chr(9) +l 0 39 Type $chr(9) +l 0 120 Account $chr(9) +l 0 85 Auto Connect
  22.   list.serv
  23.   xdialog -c $dname 1 button 5 225 75 25 | xdid -t $dname 1 Add Server
  24.   xdialog -c $dname 3 button 85 225 75 25 | xdid -t $dname 3 Update
  25.   xdialog -c $dname 4 button 165 225 75 25 | xdid -t $dname 4 Remove
  26.   xdialog -c $dname 5 button 340 225 75 25 | xdid -t $dname 5 Connect to all
  27.   xdialog -c $dname 6 button 420 225 75 25 | xdid -t $dname 6 Join Selected
  28. }
  29.  
  30. alias callback_serv {
  31.   if ($2 == rclick && $3 == 2) {
  32.     ;y offset varies based upon menu size
  33.     var %y $calc($mouse.cy - $window(-2).y + 50), %x $calc($mouse.cx - $window(-2).x - 20)
  34.     dll dlls\rcyf.dll popup $window(@server).hwnd %x %y
  35.   }
  36.   return
  37. }
  38.  
  39. alias list.serv {
  40.   var %f settings\Servers.ini, %x 1, %a Servers
  41.   while (%x <= $ini(%f, %a, 0)) {
  42.     var %et $ini(%f, %a, %x), %i $readini(%f,%a, %et)
  43.     ;echo -a %x %et $gettok($readini(%f,%a, %et), 1-, 32)
  44.     xdid -a serv 2 + 0 0 0 0 0 0 -1 -1 %et $chr(9) + 0 0 -1 -1 $gettok(%i, 1, 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 2, 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 3 $replace(4,4,*), 32) $chr(9) + 0 0 -1 -1 $gettok(%i, 5-, 32)
  45.     inc %x
  46. } }
  47. alias xtext { return $xdid(serv,2).seltext }
  48. menu @server {
  49.   $$xtext
  50.   Edit sever: echo -a $xdid(serv,2,2).seltext
  51.   testing: echo -a lol
  52.   testing: echo -a lol
  53.   testing: echo -a lol
  54.   testing: echo -a lol
  55.   testing: echo -a lol
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement