This page is pretty long, here's some anchor links to help you:
- Make your own Nebulosa client
- Authentication
- Events
Make your own Nebulosa client
Using a Server/Client architecture, Nebulosa is very flexible when it comes to abstraction.
If you don't like the default Web Interface.. no problem, you can create your own theme or even your separated client!
All you need to create a client is a working Socket.IO client library, you can find a list of libraries for various well-known programming languages by clicking here.
Authentication
Nebulosa server can be protected and Socket.IO will require you to provide username and password if needed.
The only way to know beforehand if it's going to require credentials is to do a GET request to
Credentials are provided when establishing a connection, the main (and secure) way to provide credentials is through the Cookie HTTP Header.
Just set Cookie to "
If you can't access Cookies for some reason you can fallback to querystrings, as usual, set "
Events
You will receive various type of events depending on what happens. I will refer to the passed data (which is usually an Object) as
Object = {
network1: Network,
network2: Network,
...
}
Network = {
nickname: "YourNickname",
name: "Network Name",
chans: [Channel, Channel, Channel, ...]
}
Channel = {
users: [User, User, User, ...],
created: "UnixTime",
key :"#channelname",
mode : "+modes",
topic : "Channel Topic", // May be missing if not set
topicBy : "Username", // May be missing if not set
}
User = {
"Username" : "@", // User Mode (symbol)
"AnotherUser" : "%+" // May have multiple modes
}
Object = {
network: "networkid", // Network joined
channel: "#channel", // Channel joined
nickname: "Nickname", // Who joined
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
nickname: "Nickname", // Who left
message: "something", // Part message, if provided
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
nickname: "Nickname", // Who said it
message: "something", // Message
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
nicks: [User, User, ...], // Users in the channel
time: Date // When it happened
}
Object = {
network: "networkid",// Network
channel: "#channel", // Channel
nickname: "Nickname",// Who changed the topic
topic: "something", // New topic
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channels: ["#chan1", "#chan2", ...], // Common channels
nickname: "Nickname", // Who left
reason: "something", // Quit message
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
nickname: "Nickname", // Who's got kicked
by: "OtherNickname", // Who kicked
reason: "something", // Kick Message
time: Date // When it happened
}
Object = {
network: "networkid", // Network
server: "irc.server.net" // Server who sent it
}
Object = {
network: "networkid", // Network
channels: ["#chan1", "#chan2", ...], // Common channels
oldnick: "OldNickname", // Original nickname
newnick: "NewNickname", // Changed nickname
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
from: "OldNickname", // Who invited?
time: Date // When it happened
}
Object = {
network: "networkid", // Network
channel: "#channel", // Channel
by: "OldNickname", // Who changed
what: "+", // Either "+" or "-"
mode: "o", // Mode set (single letter)
args: "Nickname", // Argument (ex. who has been opped)
time: Date // When it happened
}
Object = {
network: "networkid", // Network
info: WhoisData, // Data from Whois
time: Date // When it happened
}
WhoisData = {
nick: "MyNick" // Nickname
realname: "My real name" // Real Name
user: "mynick" // Identd (or User)
host: "my.custom.vhost" // Host
channels: ["#chan1", ...],// Channels
server: "irc.myserv.com" // Server
serverinfo: "BestServ!" // Server info
idle: 1634 // Idle time (in seconds)
}
Object = {
network: "networkid", // Network
message: "errormsg", // Error data
}
Object = {
network: "networkid", // Network
list: [ListChannel, ListChannel, ...] // Channel list
}
ListChannel = {
name: "#channel" // Channel name
users: 20 // How many users it has
topic: "MyTopic" // What's the topic
}
Object = {
network: "networkid", // Network
from: "Nickname", // Who sent it
to: "Othernick", // To whom
type: "VERSION", // CTCP type
text: "Blahblah", // CTCP content
}