Mierda
This commit is contained in:
parent
eba975983d
commit
a4e58ace16
14
index.js
14
index.js
@ -10,6 +10,8 @@ let currentChannel = settings.channels[0]
|
|||||||
|
|
||||||
const client = new irc.Client(settings.server, settings.username, {
|
const client = new irc.Client(settings.server, settings.username, {
|
||||||
channels: settings.channels,
|
channels: settings.channels,
|
||||||
|
userName: 'gordown',
|
||||||
|
realName: 'Gor Down',
|
||||||
autoRejoin: true,
|
autoRejoin: true,
|
||||||
retryCount: 100000000,
|
retryCount: 100000000,
|
||||||
retryDelay: 2*60*1000,
|
retryDelay: 2*60*1000,
|
||||||
@ -19,7 +21,6 @@ const client = new irc.Client(settings.server, settings.username, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.addListener('registered', () => {
|
client.addListener('registered', () => {
|
||||||
|
|
||||||
client.addListener('error', (message) => {
|
client.addListener('error', (message) => {
|
||||||
console.log('Error: ' + message)
|
console.log('Error: ' + message)
|
||||||
})
|
})
|
||||||
@ -45,6 +46,16 @@ client.addListener('registered', () => {
|
|||||||
|
|
||||||
function messagePrompt(){
|
function messagePrompt(){
|
||||||
rl.question(settings.username + ': ', (command) => {
|
rl.question(settings.username + ': ', (command) => {
|
||||||
|
|
||||||
|
// //si g!
|
||||||
|
// const split = command.split["!"][0]
|
||||||
|
// if(split === "g"){
|
||||||
|
// const terminalCommand = split[1]
|
||||||
|
// switch (terminalCommand){
|
||||||
|
// case "current_channel":
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
sendMessage(currentChannel, command)
|
sendMessage(currentChannel, command)
|
||||||
messagePrompt()
|
messagePrompt()
|
||||||
});
|
});
|
||||||
@ -73,6 +84,7 @@ client.addListener('registered', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendMessage(channel, message){
|
function sendMessage(channel, message){
|
||||||
|
|
||||||
logMessage(settings.username, channel, message)
|
logMessage(settings.username, channel, message)
|
||||||
client.say(channel, message)
|
client.say(channel, message)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user