This repository was archived by the owner on Sep 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrary.js
More file actions
81 lines (74 loc) · 2.81 KB
/
library.js
File metadata and controls
81 lines (74 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(function(module) {
"use strict";
var path = module.parent.require('path');
var nconf = module.parent.require('nconf');
var topics = module.parent.require('../src/topics');
var user = module.parent.require('../src/user');
// var topics = require(path.join(nconf.get('base_dir'), 'src/topics'));
// var controllers = require('./lib/controllers');
// var winston = module.parent.require('winston');
// var async = module.parent.require('async');
// var db = module.parent.require('../src/database');
// var Groups = module.parent.require('./groups');
/*var constants = Object.freeze({
type: 'oauth2', // Either 'oauth' or 'oauth2'
userRoute: 'https://idp.ect-ua.com/auth/realms/master/protocol/openid-connect/userinfo' // This is the address to your app's "user profile" API endpoint (expects JSON)
});*/
var TudoPreso = {};
/*if (!constants.name) {
winston.error('[sso-oauth] Please specify a name for your OAuth provider (library.js:32)');
} else if (!constants.type || (constants.type !== 'oauth' && constants.type !== 'oauth2')) {
winston.error('[sso-oauth] Please specify an OAuth strategy to utilise (library.js:31)');
} else if (!constants.userRoute) {
winston.error('[sso-oauth] User Route required (library.js:31)');
} else {
configOk = true;
}*/
// If this filter is not there, the deleteUserData function will fail when getting the oauthId for deletion.
TudoPreso.invokeBot = function(params) {
var notification = params.notification;
var uids = params.uids;
var pjbotId = nconf.get('bots:pjbot');
if (!pjbotId) {
winston.error('[tudopresto] Falta configurar pjbot');
}
if (notification.type === 'mention' && uids.includes(4)) {
var nid = notification.nid;
var pid = notification.pid;
var tid = notification.tid;
var from = notification.from;
var content = "Está tudo preso, seus cabrões!";
/*var contentId = Math.floor(Math.random() * 6);
switch (contentId) {
case 0:
content = "Está tudo preso, seus cabrões!";
break;
case 1:
content = "If we inject the array, we can get to the GUI spyware through the redundant RAM port!";
break;
case 2:
content = "You can't parse the application without inputting the cross-platform USB malware!";
break;
case 3:
content = "Rebooting the card won't do anything, we need to network the primary IP feed!";
break;
case 4:
content = "They're inside the network, use the cross-platform SQL port to compress their matrix!";
break;
case 5:
content = "Calculating the matrix won't do anything, we need to inject the bluetooth AI form factor!";
break;
case 6:
content = "You can't bypass the capacitor without transcoding the bluetooth AI virus!";
break;
} */
var data = {
tid,
content,
uid: pjbotId
};
topics.reply(data);
}
};
module.exports = TudoPreso;
}(module));