[Re-Release] WhisperBot [updated]
This is erm, a leaked from zerofusion source or sinems repack.
Well, you can find a thread about this here
but erm, there're lot bugs there, so i decided to post another thread about it, with clear explanation.
Full credits for RMZero213 :) im just extracting it out.
In MapleCharacter.java
add
PHP Code:
private long lastBotTime;
private boolean onBot = true;
above
PHP Code:
private int nxcash;
add
PHP Code:
public boolean getOnBot() {
return this.onBot;
}
public void onBot(boolean yn) {
this.onBot = yn;
}
public long getLastBotTime() {
return lastBotTime;
}
public void setLastBotTime(long c) {
this.lastBotTime = c;
}
under
PHP Code:
public void setLevel(int level) {
this.level = level-1;
}
now, goto ChannelServer.java
add
PHP Code:
private String serverName;
under
PHP Code:
private String serverMessage;
add
PHP Code:
serverName = props.getProperty("net.sf.odinms.world.servername");
under
PHP Code:
serverMessage = props.getProperty("net.sf.odinms.world.serverMessage");
then look for another
PHP Code:
serverMessage = props.getProperty("net.sf.odinms.world.serverMessage");
and add again [php]serverName = props.getProperty("net.sf.odinms.world.servername");[php]
add
PHP Code:
public String getServerName() {
return serverName;
}
after
PHP Code:
public void setServerMessage(String newMessage) {
serverMessage = newMessage;
broadcastPacket(MaplePacketCreator.serverMessage(serverMessage));
}
that's all for ChannelServer.java
Go to LoginServer.java
add
PHP Code:
String serverName;
after
PHP Code:
int loginInterval;
add
PHP Code:
serverName = prop.getProperty("net.sf.odinms.world.servername");
after
PHP Code:
userLimit = Integer.parseInt(prop.getProperty("net.sf.odinms.login.userlimit"));
the add again
PHP Code:
serverName = prop.getProperty("net.sf.odinms.world.servername");
after
PHP Code:
userLimit = Integer.parseInt(prop.getProperty("net.sf.odinms.login.userlimit"));
there're 2 of them u need to add.
that's all for LoginServer.java
now, goto MapleCharacterUtil.java
add import
PHP Code:
import net.sf.odinms.net.login.LoginServer;
then, add
PHP Code:
else if (name.equals(LoginServer.getInstance().getServerName() + "Bot"))
{
return false;
}
after
PHP Code:
public static boolean isNameLegal (String name) {
if (name.length() <= 3 || name.length() > 12) // || whatever.nameExists(name)
{
return false;
}
Now, goto net.sf.odinms.client.messages
and create a java file name BotProcessor.java
and paste the bellow in it.
PHP Code:
package net.sf.odinms.client.messages;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.MapleCharacter;
import net.sf.odinms.client.LoginCrypto;
import net.sf.odinms.database.DatabaseConnection;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.server.life.MapleLifeFactory;
import net.sf.odinms.server.life.MapleMonster;
import net.sf.odinms.tools.StringUtil;
import net.sf.odinms.tools.MaplePacketCreator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class BotProcessor {
private static Logger log = LoggerFactory.getLogger(BotProcessor.class);
private static long oldLastBotTime;
private static int countgm;
private static int countdc;
public static String sName(MapleClient c) {
return c.getChannelServer().getServerName();
}
public static boolean accountFix(String id) {
PreparedStatement ps;
Connection con = DatabaseConnection.getConnection();
boolean ret = false;
try {
ps = con.prepareStatement("UPDATE accounts SET loggedin = 0 WHERE name = ?");
ps.setString(1, id);
ps.executeUpdate();
ps.close();
ret = true;
} catch (SQLException e) {
log.error("Error while unstucking account", e);
}
return ret;
}
public static int accountCheck(String aname, String apass) {
int accountid = 0;
String n = "";
String p = "";
String s = "";
PreparedStatement ps;
ResultSet rs;
Connection con = DatabaseConnection.getConnection();
try {
//ps = con.prepareStatement("SELECT accountid FROM characters WHERE name = ?");
ps = con.prepareStatement("SELECT id, name, password, salt FROM accounts WHERE name = ?");
ps.setString(1, aname);
rs = ps.executeQuery();
if (!rs.next()) {
ps.close();
}
accountid = rs.getInt("id");
n = rs.getString("name");
p = rs.getString("password");
s = rs.getString("salt");
rs.close();
ps.close();
} catch (SQLException e) {
log.error("Error1 while unstucking character", e);
}
if (accountid == 0) {
return 0;
} else if (n.equals("")) {
return 0;
} else if (s.equals("")) {
return 0;
} else if (LoginCrypto.checkSaltedSha512Hash(p, apass, s)) {
return accountid;
} else {
return 0;
}
}
public static boolean characterCheck(int accid) {
String n = "";
PreparedStatement ps;
ResultSet rs;
Connection con = DatabaseConnection.getConnection();
try {
ps = con.prepareStatement("SELECT name FROM characters WHERE accountid = ?");
ps.setInt(1, accid);
rs = ps.executeQuery();
if (!rs.next()) {
ps.close();
}
n = rs.getString("name");
rs.close();
ps.close();
} catch (SQLException e) {
log.error("Error2 while unstucking character", e);
}
if (n.equals("")) {
return false;
} else {
return true;
}
}
public static boolean characterCheck2(String name) {
int accid = 0;
PreparedStatement ps;
ResultSet rs;
Connection con = DatabaseConnection.getConnection();
try {
ps = con.prepareStatement("SELECT accountid FROM characters WHERE name = ?");
ps.setString(1, name);
rs = ps.executeQuery();
if (!rs.next()) {
ps.close();
}
accid = rs.getInt("accountid");
rs.close();
ps.close();
} catch (SQLException e) {
log.error("Error3 while unstucking character", e);
}
if (accid == 0) {
return false;
} else {
return true;
}
}
public static boolean accountPassChange(int id) {
PreparedStatement ps;
Connection con = DatabaseConnection.getConnection();
boolean ret = false;
try {
ps = con.prepareStatement("UPDATE accounts SET salt = null WHERE id = ?");
ps.setInt(1, id);
ps.executeUpdate();
ps.close();
ret = true;
} catch (SQLException e) {
log.error("Error while changing pass1 account", e);
}
return ret;
}
public static boolean accountPassChange2(String pass, int id) {
PreparedStatement ps;
Connection con = DatabaseConnection.getConnection();
boolean ret = false;
try {
ps = con.prepareStatement("UPDATE accounts SET `password` = SHA1(?) WHERE id = ?");
ps.setString(1, pass);
ps.setInt(2, id);
ps.executeUpdate();
ps.close();
ret = true;
} catch (SQLException e) {
log.error("Error while changing pass2 account", e);
}
return ret;
}
public static int getMapReset(String name) {
int map = 0;
PreparedStatement ps;
ResultSet rs;
Connection con = DatabaseConnection.getConnection();
try {
ps = con.prepareStatement("SELECT map FROM characters WHERE name = ?");
ps.setString(1, name);
rs = ps.executeQuery();
if (!rs.next()) {
ps.close();
}
map = rs.getInt("map");
rs.close();
ps.close();
} catch (SQLException e) {
log.error("Error3 while unstucking character", e);
}
return map;
}
public static boolean resetMap(String id) {
PreparedStatement ps;
Connection con = DatabaseConnection.getConnection();
boolean ret = false;
try {
ps = con.prepareStatement("UPDATE characters SET map = 100000000, spawnpoint = 0 WHERE name = ?");
ps.setString(1, id);
ps.executeUpdate();
ps.close();
ret = true;
} catch (SQLException e) {
log.error("Error while unstucking account", e);
}
return ret;
}
public static void dropList(int id, MapleClient c) {
Connection con = DatabaseConnection.getConnection();
boolean fail = true;
try {
PreparedStatement ps = con.prepareStatement("SELECT * FROM monsterdrops WHERE itemid = ?");
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
c.getSession().write(MaplePacketCreator.serverNotice(6, "These monsters drop your item. (Monster Name - Monster ID)"));
while (rs.next()) {
fail = false;
MapleMonster m = MapleLifeFactory.getMonster(rs.getInt("monsterid"));
c.getSession().write(MaplePacketCreator.serverNotice(6, m.getName() + " - " + rs.getInt("monsterid")));
}
rs.close();
ps.close();
} catch (SQLException e) {
fail = true;
}
if (fail) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Sorry, no monsters drop your item ID. Check again."));
}
}
public static boolean processBot(MapleClient c, String text, String recipient) {
String[] splitted = text.split(" ");
countgm = 0;
countdc = 0;
if (recipient.equalsIgnoreCase(sName(c) + "Bot")) {
try {
if (splitted[0].equals("contactgm")) {
oldLastBotTime = c.getPlayer().getLastBotTime();
c.getPlayer().setLastBotTime(System.currentTimeMillis());
if (c.getPlayer().getLastBotTime() - oldLastBotTime <= (5000 * 60000)) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "You may only use contactgm every 5 minutes."));
} else {
String gmMSG = StringUtil.joinStringFrom(splitted, 1);
for (ChannelServer cservs : ChannelServer.getAllInstances()) {
for (MapleCharacter players : cservs.getPlayerStorage().getAllCharacters()) {
if (players.isGM() && players.getOnBot()) {
countgm++;
players.getClient().getSession().write(MaplePacketCreator.serverNotice(6, sName(c) + "Bot : " + c.getPlayer().getName() + " would like your help! Reason: " + gmMSG));
}
}
}
if (countgm == 0) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Sorry, but no GMs are online and would like to receive the message."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Your message has been sent. Thank you for using " + sName(c) + "Bot"));
}
}
} else if (splitted[0].equals("dcaccount")) {
if (accountFix(splitted[1])) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The account has been unstucked. Thank you for using " + sName(c) + "Bot"));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Sorry, but that account name does not exist."));
}
} else if (splitted[0].equals("dc")) {
if (accountCheck(splitted[2], splitted[3]) != 0) {
if (characterCheck(accountCheck(splitted[1], splitted[2])) && characterCheck2(splitted[1])) {
MapleCharacter dced = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
if (dced != null) {
dced.getClient().disconnect();
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character has been disconnected. Thank you for using " + sName(c) + "Bot."));
} else {
for (ChannelServer cservs : ChannelServer.getAllInstances()) {
for (MapleCharacter players : cservs.getPlayerStorage().getAllCharacters()) {
if (players.getName().equals(splitted[1])) {
countdc++;
players.getClient().disconnect();
}
}
}
if (countdc == 0) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The player is not online."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character has been disconnected. Thank you for using " + sName(c) + "Bot."));
}
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("changepass")) {
if (accountCheck(splitted[1], splitted[2]) != 0) {
if (accountPassChange(accountCheck(splitted[1], splitted[2])) && accountPassChange2(splitted[3], accountCheck(splitted[1], splitted[2]))) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The password has been changed. Thank you for using " + sName(c) + "Bot."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Something wrong happened. Check the order."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("resetmap")) {
if (accountCheck(splitted[2], splitted[3]) != 0) {
if (resetMap(splitted[1]) && getMapReset(splitted[1]) >= 100000000) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Thanks for using " + sName(c) + "Bot."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character is in Maple Island."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("onlinepeople")) {
try {
Map<Integer, Integer> connected = c.getChannelServer().getWorldInterface().getConnected();
StringBuilder conStr = new StringBuilder("Amount online: ");
boolean first = true;
for (int i : connected.keySet()) {
if (!first) {
conStr.append(", ");
} else {
first = false;
}
if (i == 0) {
conStr.append("Total: ");
conStr.append(connected.get(i));
} else {
conStr.append("Channel");
conStr.append(i);
conStr.append(": ");
conStr.append(connected.get(i));
}
}
c.getSession().write(MaplePacketCreator.serverNotice(6, conStr.toString()));
} catch (RemoteException e) {
c.getChannelServer().reconnectWorld();
}
} else if (splitted[0].equals("whodrops")) {
dropList(Integer.parseInt(splitted[1]), c);
c.getSession().write(MaplePacketCreator.serverNotice(6, "Thank you for using " + sName(c) + "Bot."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, sName(c) + "Bot does not recognize your message."));
}
} catch (Exception e) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
c.getSession().write(MaplePacketCreator.getWhisperReply(recipient, (byte) 1));
return true;
} else {
return false;
}
}
}
now, go to WhisperHandler.java
add an import
PHP Code:
import net.sf.odinms.client.messages.BotProcessor;
then look for the line
PHP Code:
if (!CommandProcessor.processCommand(c, text)) {
and replace it with
PHP Code:
if (!CommandProcessor.processCommand(c, text) [b]&& !BotProcessor.processBot(c, text, recipient)[/b]){
goto the command.java, depends on what kind of command system u using.
add in
PHP Code:
} else if (splitted[0].equals("@whisperbot")) {
mc.dropMessage("============================================================");
mc.dropMessage(" " + c.getChannelServer().getServerName() + "Bot Commands");
mc.dropMessage("============================================================");
mc.dropMessage("All of these commands require whispering to " + c.getChannelServer().getServerName() + "Bot. Take care of who you whisper to.");
mc.dropMessage("contactgm [text] - Sends a message to all GMs.");
mc.dropMessage("dcaccount [accountname] - Unstucks the account.");
mc.dropMessage("dc [charactername] [accountname] [accountpass] - Disconnects character.");
mc.dropMessage("changepass [accountname] [accountpass] [newpass] - Changes password.");
mc.dropMessage("resetmap [charactername] [accountname] [accountpass] - Makes player go to Henesys if not in Maple Island.");
mc.dropMessage("onlinepeople - Shows how many is online.");
mc.dropMessage("whodrops [itemid] - Shows what monsters drop the item ID provided.");
now, go to ur repack, open up world.properties
add a line at bottom
PHP Code:
net.sf.odinms.world.servername=AsShortAsPossible
change the
PHP Code:
AsShortAsPossible
to ur server name.
that's all.
once again, full credit to RMZero213 :)
Enjoy.
Re: [Re-Release] WhisperBot
Re: [Re-Release] WhisperBot
Whisper to bot?
And what does the bot whisper back LOL
Re: [Re-Release] WhisperBot
Re: [Re-Release] WhisperBot
this botprocessor is more uptodate
/*
This file is part of the ZeroFusion MapleStory Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
ZeroFusion fork organized by "RMZero213" <RMZero213@hotmail.com>
Jibby/Jibbster likes shemales, avoid plzzzlzplz
If this is leaked by above person especially, or anyone other than "RMZero213", GTFO
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.rise.client.messages;
import java.rmi.RemoteException;
import java.util.Map;
import net.sf.rise.client.MapleClient;
import net.sf.rise.client.MapleCharacter;
import net.sf.rise.client.MapleCharacterUtil;
import net.sf.rise.net.channel.ChannelServer;
import net.sf.rise.tools.StringUtil;
import net.sf.rise.tools.MaplePacketCreator;
public class BotProcessor {
private static long oldLastBotTime;
private static int countdc;
public static String sName(MapleClient c) {
return c.getChannelServer().getServerPrefix();
}
public static boolean processBot(MapleClient c, String text, String recipient) {
String[] splitted = text.split(" ");
countdc = 0;
if (recipient.equalsIgnoreCase(sName(c) + "Bot")) {
try {
if (splitted[0].equals("contactgm")) {
oldLastBotTime = c.getPlayer().getLastBotTime();
c.getPlayer().setLastBotTime(System.currentTimeMillis());
if (c.getPlayer().getLastBotTime() - oldLastBotTime <= (5000 * 60000)) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "You may only use contactgm every 5 minutes."));
} else {
String gmMSG = StringUtil.joinStringFrom(splitted, 1);
try{
c.getChannelServer().getWorldInterface().broadcastGMMessage(null, MaplePacketCreator.serverNotice(6, sName(c) + "Bot : " + c.getPlayer().getName() + " would like your help! Reason: " + gmMSG).getBytes());
c.getSession().write(MaplePacketCreator.serverNotice(6, "Your message has been sent. Thank you for using " + sName(c) + "Bot"));
} catch(Exception ex){
c.getSession().write(MaplePacketCreator.serverNotice(6, "Something wrong happened."));
}
}
} else if (splitted[0].equals("dcaccount")) {
if (MapleCharacterUtil.accountFix(splitted[1])) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The account has been unstucked. Thank you for using " + sName(c) + "Bot"));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Sorry, but that account name does not exist."));
}
} else if (splitted[0].equals("dc")) {
if (MapleCharacterUtil.accountCheck(splitted[2], splitted[3]) != 0) {
if (MapleCharacterUtil.characterCheck(MapleCharacterUtil.accountCheck(splitted[1], splitted[2])) && MapleCharacterUtil.characterCheck2(splitted[1])) {
MapleCharacter dced = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
if (dced != null) {
dced.getClient().disconnect();
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character has been disconnected. Thank you for using " + sName(c) + "Bot."));
} else {
for (ChannelServer cservs : ChannelServer.getAllInstances()){
for (MapleCharacter players : cservs.getPlayerStorage().getAllCharacters()) {
if (players.getName().equals(splitted[1])) {
countdc++;
players.getClient().disconnect();
players.getClient().getSession().close();
players.getMap().removePlayer(players);
players.getClient().getChannelServer().removePlayer(players);
players.saveToDB(true);
players.unequipAllPets();
}
}
}
if (countdc == 0) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The player is not online."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character has been disconnected. Thank you for using " + sName(c) + "Bot."));
}
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("changepass")) {
if (MapleCharacterUtil.accountCheck(splitted[1], splitted[2]) != 0) {
if (MapleCharacterUtil.accountPassChange(MapleCharacterUtil.accountCheck(splitted[1], splitted[2])) && MapleCharacterUtil.accountPassChange2(splitted[3], MapleCharacterUtil.accountCheck(splitted[1], splitted[2]))) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The password has been changed. Thank you for using " + sName(c) + "Bot."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Something wrong happened. Check the order."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("resetmap")) {
if (MapleCharacterUtil.accountCheck(splitted[2], splitted[3]) != 0) {
if (MapleCharacterUtil.resetMap(splitted[1]) && MapleCharacterUtil.getMapReset(splitted[1]) >= 100000000) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Thanks for using " + sName(c) + "Bot."));
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "The character is in Maple Island."));
}
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
} else if (splitted[0].equals("onlinepeople")) {
try {
Map<Integer, Integer> connected = c.getChannelServer().getWorldInterface().getConnected();
StringBuilder conStr = new StringBuilder("Amount online: ");
boolean first = true;
for (int i : connected.keySet()) {
if (!first) {
conStr.append(", ");
} else {
first = false;
}
if (i == 0) {
conStr.append("Total: ");
conStr.append(connected.get(i));
} else {
conStr.append("Channel");
conStr.append(i);
conStr.append(": ");
conStr.append(connected.get(i));
}
}
c.getSession().write(MaplePacketCreator.serverNotice(6, conStr.toString()));
} catch (RemoteException e) {
c.getChannelServer().reconnectWorld();
}
} else if (splitted[0].equals("whodrops")) {
MapleCharacterUtil.dropList(Integer.parseInt(splitted[1]), c);
} else {
c.getSession().write(MaplePacketCreator.serverNotice(6, sName(c) + "Bot does not recognize your message."));
}
} catch (Exception e) {
c.getSession().write(MaplePacketCreator.serverNotice(6, "Check the order or any spelling mistakes which might have occured."));
}
c.getSession().write(MaplePacketCreator.getWhisperReply(recipient, (byte) 1));
return true;
} else {
return false;
}
}
}
Re: [Re-Release] WhisperBot
could u get some pics on this please o.o
Re: [Re-Release] WhisperBot
Re: [Re-Release] WhisperBot
DrFusion,
what update is there? ur botprocessor.
Re: [Re-Release] WhisperBot
Re: [Re-Release] WhisperBot
You also need to make it so people can't name their characters <servername>bot.
Hint: MapleCharacterUtil.
I coded a little crudely but it will work.
Re: [Re-Release] WhisperBot
Re: [Re-Release] WhisperBot
@steve
brb update it :)
Edit : Updated, u can't create the bot name now :)
Re: [Re-Release] WhisperBot [updated]
the serverName property is unnecessary.
Re: [Re-Release] WhisperBot [updated]
Snow if i am not wrong serverName is to make the name for the bot for example:
My serverName is Azura
Then i would whisper AzuraBot
So whatever is there will be used as the name =X.
I saw your server features and they are cool=X
Re: [Re-Release] WhisperBot [updated]
Quote:
Originally Posted by
YaNdAoGM
Snow if i am not wrong serverName is to make the name for the bot for example:
My serverName is Azura
Then i would whisper AzuraBot
So whatever is there will be used as the name =X.
I saw your server features and they are cool=X
Snow = Superraz777
Supiangel = Supiangel = me
Thanks i think o.o.
Ontopic :
Yes , i know that , but it's unnecessary because you can easily change this line :
PHP Code:
if (recipient.equalsIgnoreCase(sName(c) + "Bot")) {
To :
PHP Code:
if (recipient.equalsIgnoreCase("AzuraBot")) {
and tadah... better and non so leakable AzuraBot o.o... you won't need to compile more than once the bot name, right?.
EDIT: Btw : My method makes a clean bot i think o.o... or make this one a little bit cleaner...
EspadaFung :
Try using php tags, they're better than the code tags.