Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. on *:text:*:#:{
  2. if ($1 = .title) {
  3. var %file $qt($+($mircdir,title.txt))
  4. var %lines $lines(%file)
  5. if ($2 <= %lines) {
  6. msg $chan $nick title: $2 - $read(%file,nt,$2)
  7. }
  8. else { msg $chan $nick title out bounds. titles: %lines }
  9. }
  10. elseif ($1 = .locate) {
  11. var %file $qt($+($mircdir,title.txt))
  12. var %r $read(%file, w, $+(*,$2-,*))
  13. if ($exists(%file)) {
  14. if (%r) { msg $chan located: %r }
  15. else { msg $chan matchtext $2- was not found }
  16. }
  17. else { msg $chan file not exists: %file }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement