|
|||||||
![]() |
Forum Index > Jibble.org > PircBot | ||
PircBot bot.sendMessage(channel,message) doesnt work! |
|||
| | | Printable Version |
|
jojobro | ||||||||
|
Hi i am new to PircBot and i need some quick help, for some reason my bot.sendMessage(channel,"message"
here is my code so if anything is wrong here ? import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Properties;
import org.jibble.pircbot.DccChat; import org.jibble.pircbot.InputThread; import org.jibble.pircbot.PircBot;
public class IRC extends PircBot {
/** * @param args */ public IRC(String host, String channel) { if(!isConnected()) { startconnection(host,channel); } else { System.out.println("ignoreing cuz already connected!" } }
public void startconnection(String host, String channel) { System.out.println("started connection with irc" mchannel = channel; mhost = host; setAutoNickChange(true); setName(TeamAV.mc.thePlayer.username); try { connect(host); joinChannel(channel); } catch(Exception e) { e.printStackTrace(); } }
public void onMessage(String channel, String sender,String login, String hostname, String message) { //read the message }
public void leaveserver(PircBot bot, String channel, String sender, String message) { bot.quitServer("Bye bye!" }
public static void sendMessage(PircBot bot,String message) { bot.sendMessage(mchannel, message); }
public static String mchannel = ""; public static String mhost = ""; }
|
![]() Newbie ![]() Status: offline
Registered: 02/24/12 |
||||||||
|
|||||||||
|
|
| All times are CDT. The time is now 05:41 AM. |
|
|