Advertisement
Guest User

NewsScript

a guest
Mar 10th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. on *:text:*xanews*:#Matt: {
  2. if ($nick isop $chan) {
  3. if ($2) { inc %countnews | .write news.txt $2- by $nick on $date | notice $nick The News was Added: $2- }
  4. }
  5. }
  6.  
  7. on *:TEXT:*xdnews*:#Matt: {
  8. if ($nick isop $chan) {
  9. if ($2 <= %countnews) { .notice $nick Deleted $read(news.txt,$2) from news list. | .write $+(-,d,l,$2) news.txt | dec %countnews }
  10. else { .notice $nick $2 does not exist in the News! }
  11. }
  12. }
  13.  
  14. on *:TEXT:*xcnews*:#Matt: {
  15. if ($nick isop $chan) {
  16. .write -c news.txt | .notice $nick Removed all items for News! | set %countnews 0
  17. }
  18. }
  19.  
  20. on *:text:*xnews*:#Matt: {
  21. msg #Matt The News for #Matt is: | run-news #Matt
  22. }
  23.  
  24. alias run-news {
  25. if (%countnews != 0) {
  26. .play -a msg #Matt news.txt 1
  27. }
  28. else { msg $1 There is no news for now. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement