-
-
Save dollabi11z/70bb04510cc36eb3499a8bfc3e09d941 to your computer and use it in GitHub Desktop.
Use some lightIRC javascript snippets for your own. Don't forgot to set true on loopClientCommands or loopServerCommands, depends what you use.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #1 - Javascript snippet to let users join allowed channels only - See: http://redmine.lightirc.com/issues/647 | |
function onClientCommand(command) { | |
var raw = command.split(' '); | |
var chanArray = ['#test', '#test1', '#test2']; | |
if (raw[0] == 'JOIN' && raw[1].charAt(0) == '#') { | |
if (chanArray.indexOf(raw[1]) < 0) { | |
alert('Sorry, this channel isn\'t allowed'); | |
command = ''; | |
} | |
} | |
return command; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment