Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package run;
- import bot.Linksbutt;
- public class TestOnFreenode {
- public static void main(String[] args) throws Exception {
- Linksbutt bot = new Linksbutt();
- bot.setVerbose(true);
- // easy place to test
- bot.connect("irc.freenode.net");
- bot.joinChannel("#pircbot");
- }
- }
- package run;
- import bot.Linksbutt;
- import java.util.Scanner;
- public class TwitchChoseChannel {
- @SuppressWarnings("resource")
- public static void main(String[] args) {
- Linksbutt bot = new Linksbutt();
- // Enable debugging output.
- bot.setVerbose(true);
- // Connect to the IRC server. get password at
- // http://www.twitchapps.com/tmi/
- try {
- bot.connect("irc.twitch.tv", 6667,
- "oauth:xxxxxxxxxx");
- } catch (Exception e) {
- System.out.println("fail\n" + e.getLocalizedMessage());
- }
- System.out.print("Channel: ");
- Scanner s = new Scanner(System.in);
- String chan = s.next();
- if (!chan.startsWith("#"))
- chan = "#" + chan;
- bot.joinChannel(chan);
- }
- }
- package run;
- import bot.Linksbutt;
- public class TwitchHardCoded {
- private static String channel = "#linkviii";
- public static void main(String[] args) {
- Linksbutt bot = new Linksbutt();
- bot.setVerbose(true);
- try {
- bot.connect("irc.twitch.tv", 6667,
- "oauth:xxxxxxxxx");
- } catch (Exception e) {
- System.out.println("fail\n" + e.getLocalizedMessage());
- }
- bot.joinChannel(channel);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement