12345678910111213141516171819202122232425262728 |
- # notification
- if $ARGS[0] = 'display':
- if _n_counter['duration'] = 0: _n_counter['duration'] = 4000
- _n_counter['timer'] = _n_counter['duration']
- _n_counter['shown'] = 1
- _n_counter['lock'] = 0
- end
- !! adds a notification to the queue
- !! message string can contain html tags like format or maybe even links
- !! I think links should work, or an image with link embedded in it
- !! theoretically all the techniques used in stat_display should work
- ! use: gs 'notification', 'add', 'message string'
- ! use: gs 'notification', 'add', 'message string', 'no_log'
- if $ARGS[0] = 'add':
- $ARGS[1] = '<table><tr><td><<$ARGS[1]>></td></tr></table>'
- $notification_message[] = $ARGS[1]
- if arrsize('ARGS') <= 2:
- $notification_log[] = '<<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> <<day>><<$date_suffix>> <<$month>> <<year>>'+$ARGS[1]
- if arrsize('$notification_log') > 30: killvar '$notification_log', 0
- end
- end
- --- notification ---------------------------------
|