Skip to content

Instantly share code, notes, and snippets.

View prawnsalad's full-sized avatar
💭
happening

Darren Whitlen prawnsalad

💭
happening
View GitHub Profile
<template id="uidesigner_tmpl">
<div style="padding:0 1em;max-height:100%;overflow:auto;">
<h1>Header H1</h1>
<h2>Header H2</h2>
<h3>Header H3</h3>
<h4>Header H4</h4>
<h5>Header H5</h5>
<ul>
<li>List item 1</li>
[c] BOUNCER listnetworks
[s] BOUNCER listnetworks network=freenode;host=irc.freenode.net;port=6667;state=disconnected;
[s] BOUNCER listnetworks network=snoonet;host=irc.snoonet.org;port=6697;state=connected;tls=1
[s] BOUNCER listnetworks RPL_OK
Using standard replies:
[c] BOUNCER listnetworks
[s] NOTE BOUNCER listnetworks network=freenode;host=irc.freenode.net;port=6667;state=disconnected; :A network
[s] NOTE BOUNCER listnetworks network=snoonet;host=irc.snoonet.org;port=6697;state=connected;tls=1 :A network
'kiwi public';
/** @module */
/**
* Adds the +draft/typing IRCv3 spec to irc-framework
*/
export default function typingMiddleware() {
return function middleware(client, rawEvents, parsedEvents) {
addFunctionsToClient(client);
this.listen(this.$state, 'active.component.toggle', (component, props) => {
if (component === this.activeComponent) {
this.activeComponent = null;
} else if (component) {
this.activeComponentProps = props;
this.activeComponent = component;
}
});
if (command === 'message') {
let isPrivateMessage = false;
let bufferName = event.from_server ? '*' : event.target;
// PMs should go to a buffer with the name of the other user
if (!event.from_server && event.target === client.user.nick) {
isPrivateMessage = true;
bufferName = event.nick;
}
package main
import (
"net/http"
"io"
"github.com/kiwiirc/webircgateway/pkg/webircgateway"
)
// The entry point of a plugin. This is called when the plugin is loaded to webircgateway
func Start(gateway *webircgateway.Gateway) {
<template>
<div class="kiwi-startup-live">
<div class="kiwi-startup-live-messages">
<message-list :buffer="buffer" />
</div>
<div class="kiwi-startup-live-join">
<a class="u-button u-button-primary">Join to start talking!</a>
</div>
</div>
<!-- `Screenshot: https://imgur.com/Lc9SDaT -->
<template id="ly_avatar">
<div
:style="{
'background-image': `url(http://avatars.kiwiirc.com/robohash/${message.nick})`,
'background-size': 'contain',
}"
:data-nick="message.nick"
class="kiwi-messagelist-avatar"
></div>
<!-- Screenshot: https://imgur.com/tcCqNsE -->
<template id="ly_customnicklist">
<div class="customnicklist">
<div v-for="user in buffer.users" class="user" :style="nickStyle(user)" @click="openQuery(user)">
{{ user.nick[0].toUpperCase() }}
</div>
</div>
</template>
kiwi.plugin('autoconnect', function(kiwi) {
kiwi.state.networks.forEach(n => {
n.connect();
});
});