mod_legacyauth: Added stream feature: <auth xmlns='http://jabber.org/features/iq-auth'/>

Sun, 08 Mar 2009 04:49:51 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 08 Mar 2009 04:49:51 +0500
changeset 891
236d1ce9fa99
parent 890
5b8da51b0843
child 892
2128891180b7

mod_legacyauth: Added stream feature: <auth xmlns='http://jabber.org/features/iq-auth'/>

plugins/mod_legacyauth.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_legacyauth.lua	Sun Mar 08 03:46:44 2009 +0500
+++ b/plugins/mod_legacyauth.lua	Sun Mar 08 04:49:51 2009 +0500
@@ -12,6 +12,9 @@
 local t_concat = table.concat;
 
 module:add_feature("jabber:iq:auth");
+module:add_event_hook("stream-features", function (session, features)
+	if not session.username then features:tag("auth", {xmlns='http://jabber.org/features/iq-auth'}):up(); end
+end);
 
 module:add_iq_handler("c2s_unauthed", "jabber:iq:auth", 
 		function (session, stanza)

mercurial