--- a/examples/mc_attention.lua Sat Mar 28 19:43:12 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-
-local lm = require 'lm'
-local attention = require 'attention'
-
-attention.handler (
- function ( mesg )
- local times = 0
- main.timer ( 1,
- function ()
- if times < 6 then
- main.beep ()
- times = times + 1
- return true
- end
- return false
- end )
- end )
-
-main.command ( 'attention',
- function ( args )
- local who
- if args.t then
- who = args.t
- else
- who = main.full_jid ()
- end
- attention.send ( lm.connection.bless ( main.connection () ), who, args[1] )
- end, true, 'jid' )
-
-commands_help['attention'] = "[-t to] [message]\n\nTries to get buddy's attention."
-
-local attention_handler = lm.message_handler.new ( attention.message_handler )
-local attention_handler_registered = false
-
-hooks_d['hook-post-connect'].attention =
- function ( args )
- lm.connection.bless( main.connection () ):handler ( attention_handler, 'message', 'normal' )
- attention_handler_registered = true
- hooks_d['hook-post-connect'].attention = nil
- hooks_d['hook-quit'].attention =
- function ( args )
- if attention_handler_registered then
- lm.connection.bless( main.connection () ):handler ( attention_handler, 'message' )
- end
- end
- end
-
-main.add_feature ( 'urn:xmpp:attention:0' )
-
--- vim: se ts=4: --