1
0

notification.qsrc 968 B

12345678910111213141516171819202122232425262728
  1. # notification
  2. if $ARGS[0] = 'display':
  3. if _n_counter['duration'] = 0: _n_counter['duration'] = 4000
  4. _n_counter['timer'] = _n_counter['duration']
  5. _n_counter['shown'] = 1
  6. _n_counter['lock'] = 0
  7. end
  8. !! adds a notification to the queue
  9. !! message string can contain html tags like format or maybe even links
  10. !! I think links should work, or an image with link embedded in it
  11. !! theoretically all the techniques used in stat_display should work
  12. ! use: gs 'notification', 'add', 'message string'
  13. ! use: gs 'notification', 'add', 'message string', 'no_log'
  14. if $ARGS[0] = 'add':
  15. $ARGS[1] = '<table><tr><td><<$ARGS[1]>></td></tr></table>'
  16. $notification_message[] = $ARGS[1]
  17. if arrsize('ARGS') <= 2:
  18. $notification_log[] = '<<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> <<day>><<$date_suffix>> <<$month>> <<year>>'+$ARGS[1]
  19. if arrsize('$notification_log') > 30: killvar '$notification_log', 0
  20. end
  21. end
  22. --- notification ---------------------------------