Skip to content

Instantly share code, notes, and snippets.

kiwi.plugin('relay_tidy', function(kiwi, log) {
// Add the bot nicks here in lowercase
var relayNicks = ['relaybot'];
var relayedRegex = /^(\S+\/<(\S+)>)/;
kiwi.on('message.new', function(event) {
if (relayNicks.indexOf(event.nick.toLowerCase()) === -1) {
return;
}
import znc
VERSION = '2'
COMMAND = "BOUNCER"
class bouncer(znc.Module):
module_types = [znc.CModInfo.GlobalModule]
description = "Provides KiwiIRC BOUNCER support"
<script>
kiwi.plugin('gecos', function(kiwi, log) {
kiwi.on('network.new', function(event) {
var queryGecos = kiwi.exports.helpers.Misc.queryStringVal('gecos');
event.network.gecos = queryGecos || "Fallback Gecos";
});
});
</script>
<template id="pluginImgurUploadSelector">
<div>
<a @click="pickImage()">
<i class="fa fa-file-image-o"></i>
<input
@change="uploadImage($event)"
id="ImgurUploader"
type="file"
accept=".jpg,.jpeg,.png,.gif,.apng,.tiff,.pdf,.mov,.mp4"
style="display: none; width: 0; height: 0;">
<template id="channel_list_button_template">
<div @click="buttonClicked">
<a v-if="$state.ui.app_width > 769">Channel List</a>
<a v-else><i class="fa fa-list" aria-hidden="true"></i></a>
</div>
</template>
<script>
kiwi.plugin('channel_list_button', function(kiwi, log) {
var button = new kiwi.Vue({
template: '#channel_list_button_template',
<VirtualHost *:80>
ServerName kiwiirc.itsonlybinary.com
ServerAdmin webmaster@itsonlybinary.com
# Kiwi IRC client files are located here
DocumentRoot /usr/share/kiwiirc
DirectoryIndex index.html
# Reverse proxy websocket connections
server {
listen 80;
listen [::]:80;
server_name irc.example.com;
include /etc/nginx/extra/certbot.conf;
location / {
return 301 https://$server_name$request_uri;
}
}
<script>
kiwi.plugin('mobile-keepalive', function(kiwi, log) {
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
return;
}
var keepAliveElement = document.createElement('audio');
keepAliveElement.style.display = 'none';
keepAliveElement.autoplay = true;
keepAliveElement.loop = true;
keepAliveElement.src= 'data:audio/mp3;base64,SUQzBAAAAAIYBFRJVDIAAAAUAAAAMSBTZWNvbmQgb2YgU2lsZW5jZVRQRTEAAAASAAAAQW5hciBTb2Z0d2FyZSBMTENUQUxCAAAADAAAAEJsYW5rIEF1ZGlvQVBJQwACDwIAAABpbWFnZS9qcGVnAAMAiVBORw0KGgoAAAANSUhEUgAABDgAAAQ4CAYAAADsEGyPAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAg9AAAIPQEFlVW2AAAAB3RJTUUH3woLBRwxA28EdgAAIABJREFUeNrs3XuUVWXdB/DfMAw3AQEvKOqAiVcsU7A0saIyb4FWKt41TVEIM2mVpqaoeeviLTWvpK+AmsvUNA0NQ1m9lnkpvKRkctEQBIERYbiM8/7RWwucmXPOnjln5jwzn89a73pr72c/e+/fs89wzrdn710REfUBAAAAkLBOSgAAAACkTsABAAAAJE/AAQAAACRPwAEAAAAkT8ABAAAAJE/AAQAAACRPwAEAAAAkT8ABAAAAJE/AAQAAACRPwAEAAAAkT8ABAAAAJE/AAQAAACRPwAEAAAAkT8ABAAAAJE/AAQAAACRPwAEAAAAkT8ABAAAAJE/AAQ
server {
listen 80;
listen [::]:80;
server_name irc.example.com;
# uncomment to redirect all users to https
#location / {
# return 301 https://$server_name$request_uri;
#}
}
<script>
var count = 100;
var nick = 'TestNick';
var channel = '#testers';
kiwi.plugin('fake_users', function(kiwi, log) {
kiwi.on('network.new', function(event, opt) {
let buffer = kiwi.state.getOrAddBufferByName(event.network.id, channel);
for (var i = count; i > 0; i--) {