1
0

wraith.mrc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ON *:LOAD:{ echo -a Wraith authorization script, for mIRC 5.8 and up, by bryan loaded (MSG/DCC/Psybnc support). type /setauth }
  2. alias helpauth {
  3. echo -a Type /setauth
  4. echo -a /auth -Auth string <botnick> <- That will return the md5 hash. (use for telnet possibly)
  5. }
  6. alias setauth {
  7. if (!$3) {
  8. echo -a usage: /setauth password secpass authkey <botnick>
  9. echo -a <botnick> is optional if the authkey specified is for that bot only...
  10. }
  11. else {
  12. if ($4) {
  13. set %w.pass. $+ $4 $1
  14. set %w.secpass. $+ $4 $2
  15. set %w.authkey. $+ $4 $3
  16. }
  17. else {
  18. set %w.pass $1
  19. set %w.secpass $2
  20. set %w.authkey $3
  21. }
  22. echo -a set!
  23. }
  24. }
  25. ON *:CHAT:*:{
  26. var %c = %auth. [ $+ [ $nick ] ]
  27. if (($1 === -Auth || $1 === ÿû-Auth) && $len($2) == 50) {
  28. msg =$nick +Auth $wmd5($2 $+ $wsecpass($3) $+ $wauthkey($3))
  29. }
  30. }
  31. ON *:TEXT:auth*:?:{
  32. var %c = %auth. [ $+ [ $nick ] ]
  33. if (!$3) {
  34. ;if this is a MSG not psybnc DCC, and we arent cleared to auth with them, IGNORE.
  35. if ($left($nick,1) != $chr(40) && !%c) {
  36. return
  37. }
  38. if ($right($1,1) == . && %c) {
  39. msg $nick auth $wpass($2)
  40. }
  41. elseif ($right($1,1) == ! && %c) {
  42. msg $nick auth $wpass($2) %myuser
  43. }
  44. }
  45. }
  46. ON *:TEXT:*:?:{
  47. var %c = %auth. [ $+ [ $nick ] ]
  48. if ($left($nick,1) != $chr(40) && !%c) { return }
  49. if (($1 === -Auth || $1 === ÿû-Auth) && $len($2) == 50) {
  50. msg $nick +Auth $wmd5($2 $+ $wsecpass($3) $+ $wauthkey($3))
  51. }
  52. }
  53. ALIAS -l wraith {
  54. if ($eval(% $+ $1 $+ . $+ $2,2)) {
  55. return $ifmatch
  56. }
  57. else {
  58. return $eval(% $+ $1,2)
  59. }
  60. }
  61. alias -l wauthkey { return $wraith(w.authkey,$1) }
  62. alias -l wpass { return $wraith(w.pass,$1) }
  63. alias -l wsecpass { return $wraith(w.secpass,$1) }
  64. alias -l wmd5 {
  65. if ($version < 5.8) {
  66. echo 8 -a This script will only work for mIRC 5.8 and up.
  67. }
  68. if ($version >= 6.03) {
  69. return $md5($1)
  70. }
  71. else {
  72. if (!$exists($nofile($script) $+ /md5.dll)) {
  73. echo 4 -a You need to place md5.dll in $nofile($script) for this to work.
  74. halt
  75. }
  76. return $dll($nofile($script) $+ /md5.dll,md5,$1)
  77. }
  78. }
  79. ALIAS auth {
  80. if ($1 != -Auth || !$2) {
  81. echo 8 -a Usage: /auth -Auth string botname
  82. echo 8 -a botname is optional.
  83. }
  84. else {
  85. echo +Auth $md5($2 $+ $wsecpass($3) $+ $wauthkey($3))
  86. }
  87. }
  88. ALIAS msg {
  89. if ($1 !ischan && $2 === auth? && $left($1,1) != $chr(40)) { set -u30 %auth. $+ $1 1 }
  90. msg $1-
  91. }
  92. ON *:INPUT:?:{ if ($1 === auth? && $left($target,1) != $chr(40)) { set -u30 %auth. $+ $target 1 } }