summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/LLNotification.lua
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/scripts/lua/LLNotification.lua')
-rw-r--r--indra/newview/scripts/lua/LLNotification.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/LLNotification.lua b/indra/newview/scripts/lua/LLNotification.lua
new file mode 100644
index 0000000000..f47730d1cc
--- /dev/null
+++ b/indra/newview/scripts/lua/LLNotification.lua
@@ -0,0 +1,15 @@
+-- Engage the LLNotificationsListener LLEventAPI
+
+leap = require 'leap'
+
+local LLNotification = {}
+
+function LLNotification.add(name, substitutions)
+ leap.send('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})
+end
+
+function LLNotification.requestAdd(name, substitutions)
+ return leap.request('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})['response']
+end
+
+return LLNotification