Advertisement
Guest User

Untitled

a guest
Jun 19th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. on *:LOAD:kagSetPath
  2.  
  3. alias -l kagrx { return /(?:kag:\/\/)([0-9a-zA-Z\.\:]+):([0-9]+)\/([0-9a-zA-Z])/ }
  4. on $^*:HOTLINK:$($kagrx):*:{ return }
  5. on $*:HOTLINK:$($kagrx):*:{
  6. if (!$isfile(%kag_executable)) { kagSetPath }
  7. if ($isfile(%kag_executable)) {
  8. %kag_address = $regml(1)
  9. %kag_port = $regml(2)
  10. %kag_password = $regml(3)
  11. run $+(", %kag_executable, ") -join $+(kag://, %kag_address, :, %kag_port, /, %kag_password)
  12. }
  13. }
  14.  
  15. alias -l kagSetPath {
  16. var %path, %dir, %full_path
  17. if ($isdir($nofile(%kag_executable))) { %dir = $nofile(%kag_executable) }
  18. else { %dir = $mircdir }
  19. %path = $sdir(%dir, Path to kag Directory)
  20. if ($isdir(%path)) {
  21. %full_path = %path $+ kag.exe
  22. if (!$isfile(%full_path)) {
  23. if ($?!="File %full_path does not exist. $crlf $+ If your kag executable is named differently, choose 'Yes' to select the file manually.") {
  24. %full_path = $sfile(%path, kag Executable)
  25. if ($isfile(%full_path)) { set %kag_executable %full_path }
  26. }
  27. }
  28. else { set %kag_executable %full_path }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement