log = "<" + nick + "> "; log += msg.substring(0, msg.length()); }  logfile(recipient, log);  msg = msg.trim();   Message currMsg = firstMessage; Message lastMsg = null; int numberSent = 0; while (currMsg != null) { if (iequals(currMsg.target, nick)) { if (numberSent == 0) { ircio.privmsg(recipient, nick + ", you have messages!"); } else if (numberSent >= 5) { ircio.privmsg(recipient, "You have more messages."); break; } ircio.privmsg(recipient, "Message from " + currMsg.sender + " [" + makeTime(currMsg.time) + " ago]:" + currMsg.message); numberSent++; if (lastMsg == null) firstMessage = currMsg.next; else lastMsg.next = currMsg.next; writeData(dataFileName); } else { lastMsg = currMsg; } currMsg = currMsg.next; }   if (iregex(name, msg) && gamesurge()) { if (iregex("fuck you", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Fuck you too, buddy."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("screw you", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Screw you too, buddy."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("you suck", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "I suck, but you swallow, bitch."); nextWho = System.currentTimeMillis() + 5000; return; } } }   int nameEnd = name.length() < 4 ? name.length() : 4; if (iregex(name.substring(0, nameEnd), msg)) { for (int i = 0; i < hellos.length; i++) { if (iregex("^"+hellos[i], msg)) { if (System.currentTimeMillis() > nextHi) { ircio.privmsg(recipient, hellos[new Random().nextInt(hellos.length)]); nextHi = System.currentTimeMillis() + 500; return; } } } }  StringTokenizer tok = new StringTokenizer(msg, ",: "); String botname; if (tok.hasMoreElements()) { botname = tok.nextToken(); } else { botname = ""; }  if (pm || talkingToMe(msg)) {   msg = msg.substring(msg.indexOf(" ")+1);  if (iregex("bring out the strapon", msg)) { ircio.privmsg(recipient, "\u0001ACTION steps forward with a large strapon and begins mashing potatoes.\u0001"); return; }   while (msg.endsWith(".") || msg.endsWith("?") || msg.endsWith("!")){ msg = msg.substring(0, msg.length()-1); }  if (iequals("who are you", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "I am an advanced SephiaBot channel bot."); ircio.privmsg(recipient, "I'll kick your ass in days that end in 'y'."); ircio.privmsg(recipient, "I was written by Vino. Vino rocks."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (gamesurge() && iregex("what does marsellus wallace look like", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "He's black."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("who wrote you", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "I was written by Vino. Vino rocks."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("who is here", msg) && nick.equals("Nilbus")) { if (System.currentTimeMillis() > nextWho) {  int channum = channelNumber(recipient); if (channum == -1 || pm) { ircio.privmsg(recipient, "It's just you and me in a PM, buddy."); nextWho = System.currentTimeMillis() + 5000; return; } else { StringBuffer buf = new StringBuffer("Users in this channel:"); IRCUser current = server.channels[channum].users; for (int i = 0; i < server.channels[channum].numusers; i++) { buf.append(" " + current.name); current = current.next; }  ircio.privmsg("Nilbus", buf.toString()); nextWho = System.currentTimeMillis() + 5000; return; } } } else if (iregex("who is vino", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "A dirty cuban."); ircio.privmsg(recipient, "And my daddy."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("who is", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Nobody important."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (gamesurge() && iregex("are you (sexy|hot)", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Fuck yes."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (gamesurge() && iregex("want to cyber", msg)) { if (System.currentTimeMillis() > nextWho) { if (!isVino(host)) { ircio.privmsg(recipient, "Fuck no."); } else { ircio.privmsg(recipient, "Take me, " + nick + "!"); } nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("where is vino", msg)) { if (System.currentTimeMillis() > nextWho) { if (vinoaway == null) { ircio.privmsg(recipient, "If he's not here, I dunno. He hasn't told me he's gone."); } else { ircio.privmsg(recipient, "He's " + vinoaway + ". He's been gone for " + makeTime(vinoleavetime) + "."); } nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("who am i", msg)) { if (System.currentTimeMillis() > nextWho) { if (!isVino(host)) { ircio.privmsg(recipient, "Nobody important."); } else { ircio.privmsg(recipient, "Daddy!"); ircio.privmsg(recipient, "\u0001ACTION hugs " + nick + ".\u0001"); } nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("who('| i)s your daddy", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Vino's my daddy, ugh! Spank me again Vino!"); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("knock knock", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Who's there?"); nextWho = System.currentTimeMillis() + 5000; return; } } else if (gamesurge() && iregex("i suck dick", msg)) { if (System.currentTimeMillis() > nextWho) { ircio.privmsg(recipient, "Yeah, we know you do."); nextWho = System.currentTimeMillis() + 5000; return; } } else if (gamesurge() && iregex("words of wisdom", msg)) { if (System.currentTimeMillis() > nextWho) { String phrase = randomPhrase(new File(sephiadir, "wordsofwisdom.txt")); if (phrase != null) ircio.privmsg(recipient, phrase); nextWho = System.currentTimeMillis() + 5000; return; } } else if (iregex("roll (the )?dice", msg)) { if (System.currentTimeMillis() > nextWho) { Random rand = new Random(); int dice = rand.nextInt(5)+2; int sides = rand.nextInt(5)+6; ircio.privmsg(recipient, "\u0001ACTION rolls " + dice + "d" + sides + " dice and gets " + (dice*sides+1) + ".\u0001"); if (!isVino(host)) { ircio.privmsg(recipient, "\u0001ACTION kills " + nick + ".\u0001"); } else { ircio.privmsg(recipient, "\u0001ACTION hugs " + nick + ".\u0001"); } nextWho = System.currentTimeMillis() + 5000; return; } } else if (tok.hasMoreElements()) { String cmd = tok.nextToken(" "); if (tok.hasMoreElements() && (cmd.startsWith(",") || cmd.startsWith(":"))) { cmd = tok.nextToken(" "); } if (iequals(cmd, "kill")) { if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "KILL! KILL! KILL!"); return; } int killerAccess = getAccess(nick, channelNumber(recipient)); String killed = tok.nextToken(" "); int killedAccess = getAccess(killed, channelNumber(recipient)); if ((killerAccess <= killedAccess || killerAccess == IRCServer.ACCESS_VOICE) && !isVino(host)) { ircio.privmsg(recipient, "\u0001ACTION giggles at " + nick + "\u0001"); return; } else if (killerAccess == -1 || killedAccess == -1) { ircio.privmsg(recipient, "\u0001ACTION laughs, yeah right.\u0001"); return; } else { ircio.privmsg(recipient, "It would be my pleasure."); ircio.kick(recipient, killed, "You have been bitched by " + name + ". Have a nice day."); return; } } else if (iequals(cmd, "tell")) { if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "Tell who what?"); return; } String target = tok.nextToken(" "); if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "Tell " + target + " what?"); return; } String message = tok.nextToken(""); if (firstMessage == null) { firstMessage = new Message(target, message, nick); } else { currMsg = firstMessage; while (currMsg.next != null) currMsg = currMsg.next; currMsg.next = new Message(target, message, nick); } writeData(dataFileName); ircio.privmsg(recipient, "OK, I'll make sure to let them know."); } else if (iregex("^(butt?)?se(x|cks)$", cmd)) { if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "\u0001ACTION anally rapes " + nick + ".\u0001"); return; } String sexed = tok.nextToken(" "); if (iequals("vino", sexed)) { ircio.privmsg(recipient, "\u0001ACTION screams as Vino penetrates every orifice of her body!\u0001"); } else { int sexedAccess = getAccess(sexed, channelNumber(recipient)); if (sexedAccess == -1) { ircio.privmsg(recipient, "I'd love to, but who the hell is that?"); } else { ircio.privmsg(recipient, "\u0001ACTION anally rapes " + sexed + ".\u0001"); } } } else if (iequals(cmd, "reboot")) { if (isVino(host)) { ircio.privmsg(recipient, "Be right back."); System.exit(1); } else ircio.privmsg(recipient, "No."); return; } else if (iequals(cmd, "shutdown")) { if (isVino(host)) { ircio.privmsg(recipient, "Goodbye everybody!"); System.exit(0); } else { ircio.privmsg(recipient, "No."); } return; } else if (iequals(cmd, "login")) { if (tok.countTokens() < 1) { ircio.privmsg(nick, "Yeah. Sure. Whatever."); return; } String passwd = tok.nextToken(""); if (passwd.trim().equals("xxxxx")) { ircio.privmsg(nick, "Hi, daddy! :D"); vinohost = host; writeData(dataFileName); } else { ircio.privmsg(nick, "You aint fuckin Vino, prick."); return; } } else if (iequals(cmd, "i'm")) { if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "You're what?"); return; } if (!isVino(host)) { ircio.privmsg(recipient, "I don't care."); return; } String location = tok.nextToken("").trim(); if (iequals(location, "back")) { if (vinoaway == null) { ircio.privmsg(recipient, "Of course you are honey."); } else { ircio.privmsg(recipient, "Welcome back! You've been away for " + makeTime(vinoleavetime) + "."); vinoaway = null; } } else { ircio.privmsg(recipient, "Have fun!"); vinoaway = location; vinoleavetime = System.currentTimeMillis(); } writeData(dataFileName); return; } else if (iequals(cmd, "say")) { if (!isVino(host)) { ircio.privmsg(recipient, "No."); return; } if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "Say what?!?"); return; } String inchannel = recipient; if (iequals("in", tok.nextToken())) { inchannel = tok.nextToken(); } ircio.privmsg(inchannel, tok.nextToken("").substring(1)); return;  } else if (iequals(cmd, "mode")) { if (!isVino(host)) { ircio.privmsg(recipient, "No."); return; } String inchannel = recipient; if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "What channel?"); return; } inchannel = tok.nextToken(); if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "Who?"); return; } String who = tok.nextToken(); String mode; if (!tok.hasMoreElements()) { ircio.privmsg(recipient, "What mode?"); return; } else mode = tok.nextToken(); System.out.println("MODE " + inchannel + " " + mode + " " + who + "\n"); ircio.setMode(who, inchannel, mode); return; } else if (iregex("excuse", msg)) { if (System.currentTimeMillis() > nextWho) { String excuse = randomPhrase(new File(sephiadir, "excuses.txt")); if (excuse != null) ircio.privmsg(recipient, "Your excuse is: " + excuse); nextWho = System.currentTimeMillis() + 5000; return; } } } } else if (spelledMyNameWrong(botname)) {  }  }
	public void messagePrivMsg(String nick, String host, String recipient, String msg) {		boolean pm = false;		String log;		if (iequals(recipient, name)) {			recipient = nick;			pm = true;		}		if (iregex("^.ACTION", msg) {			log = "* " + nick + " ";			log += msg.substring(8, msg.length()-1);		} else {