-
-
-
-
-function capContainsAny (caps) {
- var intersection;
- if (!caps instanceof Array) {
- caps = [caps];
- }
- intersection = _.intersection(this.irc_connection.cap.enabled, caps);
- return intersection.length > 0;
-}
-
-
// Code based on http://anentropic.wordpress.com/2009/06/25/javascript-iso8601-parser-and-pretty-dates/#comment-154
function parseISO8601(str) {
if (Date.prototype.toISOString) {
+/**
+ * Check if any server capabilities are enabled
+ */
+IrcConnection.prototype.capContainsAny = function (caps) {
+ var enabled_caps;
+
+ if (!caps instanceof Array) {
+ caps = [caps];
+ }
+
+ enabled_caps = _.intersection(this.cap.enabled, caps);
+ return enabled_caps.length > 0;
+};
+
+
+
/**
* Clean up this IrcConnection instance and any sockets
*/