wraith.bx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # wraith authorization script
  2. # By bryan
  3. #
  4. # This expects the md5 executable in $cspath/.BitchX
  5. # $botnick is the current nick of the bot.
  6. # You must /setauth
  7. # If you chat a diff bot, you must do that command first.
  8. # $pass is the DEFPASS setting from your pack.cfg
  9. #change this to your homedir.
  10. assign wpath /home/wheel/bryan
  11. #put the 'md5' binary in $HOME/.BitchX/md5
  12. alias setauth {
  13. if ([$2] == "") {
  14. ^eval echo /setauth password secpass authkey <botnick>
  15. }
  16. ^assign wpass $0
  17. ^assign wsecpass $1
  18. ^assign wauthkey $2
  19. ^assign wbotnick $3
  20. }
  21. alias auth {
  22. ^assign blah $1$wsecpass$wauthkey
  23. ^exec -name secauth $wpath/.BitchX/md5 "-s$blah"
  24. ^on ^exec "secauth *" {
  25. ^eval echo +Auth $1
  26. }
  27. }
  28. alias secauth {
  29. ^assign blah $1$wsecpass$wauthkey
  30. ^eval echo Returning hash to $0
  31. ^exec -name secauth2 $wpath/.BitchX/md5 "-s$blah"
  32. ^on ^exec "secauth2 *" {
  33. send +Auth $1
  34. }
  35. }
  36. on ^dcc_chat "% -Auth *" {
  37. query =$0
  38. secauth $0 $2
  39. }
  40. on ^msg "% -Auth *" {
  41. query $0
  42. secauth $0 $2
  43. }
  44. ^eval xecho -b wraith Authorization Module Loaded.