Skip to content

Node.js based forum software built for the modern web

added stub plugins socket file for plugin usage (ping @schamper @frissdiegurke @akhoury @psychobunny @barisusakli)

Julian Lama5410f7ae71c
diff --git a/src/socket.io/plugins.js b/src/socket.io/plugins.js
new file mode 100644
index 0000000000..7fbaabc6b2
--- /dev/null
+++ b/src/socket.io/plugins.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var SocketPlugins = {};
+
+/*
+ This file is provided exclusively so that plugins can require it and add their own socket listeners.
+
+ How? From your plugin:
+
+ var SocketPlugins = module.parent.require('./socket.io/plugins');
+ SocketPlugins.myPlugin.myMethod = function() { ... };
+
+ Be a good lad and namespace your methods.
+*/
+
+module.exports = SocketPlugins;