This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name kiwiirc.example.com; | |
location / { | |
# Redirect to https | |
return 301 https://$server_name$request_uri; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kiwi.plugin('force_one_network', function(kiwi, log) { | |
const server = kiwi.state.getSetting('settings.startupOptions.server'); | |
kiwi.state.networks.forEach((network) => { | |
if (server !== network.connection.server) { | |
kiwi.state.removeNetwork(network.id); | |
} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
kiwi.plugin('echo_on_highlight', function (kiwi, log) { | |
//let buffer = kiwi.state.getActiveBuffer(); | |
//let buffer = network.bufferByName(event.channel); | |
kiwi.on('irc.message', (event, network) => { | |
if (event.type !== 'privmsg') { return; } | |
if (event.message.indexOf(network.currentUser().nick) === -1) { return; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
kiwi.plugin('userbox_whois_geoip', function(kiwi, log) { | |
var currentUser = null; | |
kiwi.on('userbox.show', function (user, buffer) { | |
currentUser = user; | |
}); | |
kiwi.on('sidebar.hide', function (user, buffer) { | |
currentUser = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kiwi.plugin('avatars', (kiwi) => { | |
kiwi.on('irc.join', (event, net) => { | |
kiwi.Vue.nextTick(() => { | |
updateAvatar(net, event.nick); | |
}); | |
}); | |
kiwi.on('irc.wholist', (event, net) => { | |
let nicks = event.users.map((user) => user.nick); | |
kiwi.Vue.nextTick(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
kiwi.plugin('fa5', function(kiwi, log) { | |
let fa5all = document.createElement('script'); | |
fa5all.src = 'https://use.fontawesome.com/releases/v5.15.2/js/all.js'; | |
document.head.append(fa5all); | |
let fa5shim = document.createElement('script'); | |
fa5shim.src = 'https://use.fontawesome.com/releases/v5.15.2/js/v4-shims.js'; | |
document.head.append(fa5shim); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
kiwi.plugin('ctcp_version', function(kiwi, log) { | |
kiwi.on('irc.ctcp request', function(event, network, ircEventObj) { | |
if (event.type !== 'VERSION') { | |
return; | |
} | |
// This adds a message to the server buffer for the request | |
let TextFormatting = kiwi.require('helpers/TextFormatting'); | |
let serverTime = (event && event.time) || 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn run v1.22.4 | |
$ vue-cli-service test:unit | |
PASS tests/unit/MessageParser.spec.js (7.09s) | |
PASS tests/unit/Misc.spec.js (7.079s) | |
PASS tests/unit/StartupError.spec.js | |
FAIL tests/unit/BatchAdd.spec.js (13.875s) | |
● batchedAdd.vue › should process 102 single items, then a batch of 3 | |
: Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
kiwi.plugin('customise', function(kiwi, log) { | |
kiwi.on('irc.message', (message, network, event) => { | |
if (message.type === 'notice' && message.from_server === true) { | |
message.from_server = false; | |
} | |
}); | |
}); | |
</script> |