A self hosted livestreaming server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 
satyr/src/chanbot.ts

33 lines
853 B

import irc = require('irc');
function chanReg(channel: string, owner: string){
var bot = new irc.Client('127.0.0.1', 'ChanReg', {
channels: ['#ChanReg'],
userName: 'ChanReg',
realName: 'Channel Registration Bot',
floodProtection: false,
});
bot.addListener('registered', (message) => {
bot.send('OPER', 'admin', 'test');
bot.join(channel);
bot.send('MODE', channel, '+P');
bot.send('MODE', channel, '+w', 'o:'+owner+'!*@*');
bot.disconnect();
});
}
function chanUnReg(channel: string){
var bot = new irc.Client('127.0.0.1', 'ChanReg', {
channels: [''],
userName: 'ChanReg',
realName: 'Channel Registration Bot',
floodProtection: false,
debug: true
});
bot.addListener('registered', (message) => {
bot.send('OPER', 'admin', 'test');
bot.join(channel);
bot.send('MODE', channel, '-P');
bot.disconnect();
});
}