Skip to content

Instantly share code, notes, and snippets.

kiwi.plugin('simple-avatars', (kiwi) => {
kiwi.on('irc.join', (event, net) => {
kiwi.Vue.nextTick(() => {
updateAvatar(net, event.nick, false);
});
});
kiwi.on('irc.wholist', (event, net) => {
let nicks = event.users.map((user) => user.nick);
kiwi.Vue.nextTick(() => {
@ItsOnlyBinary
ItsOnlyBinary / kiwibnc-purge-db.sql
Created May 25, 2022 13:20
SQL Queries for purgin old data from kiwibnc messages.db
/* Test how many records the UTC date would remove */
SELECT (SELECT COUNT(*) FROM logs WHERE time <= strftime('%s000','2022-05-25 12:50:00')) || '/' || (SELECT COUNT(*) FROM logs)
/* Remove records from logs before the set UTC date */
DELETE FROM logs WHERE time <= strftime('%s000','2022-05-25 12:31:00');
/* Clean data of any orphaned records */
DELETE FROM data WHERE id NOT IN (
SELECT msgtagsref AS ids FROM logs
UNION
{
"windowTitle": "Kiwi IRC - The web IRC client",
"startupScreen": "welcome",
"kiwiServer": "http://localhost:8080/webirc/kiwiirc/",
"restricted": false,
"theme": "Default",
"themes": [
{ "name": "Default", "url": "static/themes/default" },
{ "name": "Dark", "url": "static/themes/dark" },
{ "name": "Coffee", "url": "static/themes/coffee" },
JDK8 https://www.azul.com/downloads/?version=java-8-lts&os=windows&package=jdk
Node 12.x https://nodejs.org/download/release/v12.22.11/
Android studio with Android 28 (I did 24-28) & Build-tools 28.0.3 (i did newest versions of 25.0.3 -> 29.0.3)
`npm remove -g nativescript && npm install -g nativescript@6.8.0`
`git clone https://github.com/kiwiirc/kiwiirc-mobile.git && cd kiwiirc-mobile`
edit package.json change ns doctor to tns doctor
<template id="ignorelist">
<div class="kiwi-ignorelist-container">
<table v-if="ignoredUsers.length > 0" class="kiwi-ignorelist-table">
<tr>
<td colspan="3">
<h3>{{ $t('plugin-ignorelist:ignore_list') }}</h3>
</td>
</tr>
<tr v-for="user in ignoredUsers" :key="user.nick">
<td>{{ user.nick }}</td>
<template id="userbox_button">
<div class="kiwi-userbox-action">
<a @click="buttonClicked($event)">
<i class="fa fa-warning" aria-hidden="true"></i>
{{ title }}
</a>
</div>
</template>
<script>
<template id="test-template">
<div>
<span>test-template</span>
<span v-html="content" />
</div>
</template>
<script>
kiwi.plugin('test-body-template', function (kiwi, log) {
const testTemplate = {
<style>
.kiwi-startup-common-section-info {
display: none;
}
.kiwi-startup-common-section-connection {
margin: 0 auto;
}
.kiwi-welcome-simple-form {
border: 1px solid lightgrey;
border-radius: 16px;
server {
listen 80;
listen [::]:80;
server_name kiwiirc.example.com;
location / {
# Redirect to https
return 301 https://$server_name$request_uri;
}
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);
}
});
});