Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//npm install irc // Create the configuration var config = { channels: ["#filmsbykris"], server: "irc.freenode.net", botName: "megabot" }; // Get the lib var irc = require("irc"); // Create the bot name var bot = new irc.Client(config.server, config.botName, { channels: config.channels }); // Listen for joins bot.addListener("join", function(channel, who) { // Welcome them in! bot.say(channel, who + ", my circuits welcome you!"); }); // Listen for any message, say to him/her in the room bot.addListener("message", function(from, to, text, message) { var msg=text.toLowerCase(); if(msg.indexOf("megacool")>=0){ bot.say(config.channels[0], "Heck yeah I am!"); } if(msg.indexOf("linux sucks")>=0){ bot.say(config.channels[0], "You SUCK, " + from); } });
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)