help 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env bash
  2. # mlaine@sdfeu
  3. source '../say.sh'
  4. nick="$1"
  5. args=("${@:3}")
  6. if [[ "${#args[@]}" -ge 2 && "${args[-2]}" = '>' &&
  7. ! "${args[-1]}" =~ '#' ]]; then
  8. ch="${args[-1]}"
  9. else
  10. ch="$nick"
  11. fi
  12. msg=(
  13. '/*'
  14. 'Hi there! I am the sdf irc network bot. I provide'
  15. 'several useful commands; please take a moment to read'
  16. 'the following few lines.'
  17. ' '
  18. 'You may view answers to frequently asked questions by'
  19. "using the '!faq' command. Without arguments it lists"
  20. 'the available topics, of which you can supply one as'
  21. 'an argument to the command.'
  22. ' '
  23. "All available commands can be listed with '!commands'."
  24. 'In order to avoid spamming on channels, PLEASE do'
  25. 'experiment with the commands via private messages,'
  26. 'i.e., /msg BASHy2[-EU]. Any questions left unanswered'
  27. 'are welcomed in #helpdesk.'
  28. ' '
  29. "IF YOU FORGOT YOUR PASSWORD ISSUE '!faq forgot'."
  30. ' '
  31. 'This message is sent on join to anyone who has not'
  32. 'been active on any channel BASHy2[-EU] is on.'
  33. '*/'
  34. )
  35. say "$ch" "${msg[@]}"