Kefiirs Posted June 27, 2009 Report Share Posted June 27, 2009 (edited) Sveiki! Tad nu man ir problēma ar php un irc apvienošanu! Nu ja šeit ir kāds irc pro, tad varētu palīdzēt! Tad nu problēma: Man ir spēļu serveris, serverī čatā uzrakstot komandu atveras logs, kurš aizceļo tālāk uz weblapu un tagad sākas labākā daļa... Karoči sākumā viss notiek ar vienu failu, kurš ieliek _POST iekš tā loga un izvelk visu spēlētāju nikneimus, tādējādi tagad PHP var apstrādāt iegūto informāciju un konektēt tālāk uz to SmartIRC, kurš piekonektē irc.lv serverim un manam kanālam un iepousto kanālā tādu ziņu, kādu ir devis spēlētājs iekš tā loga! Tad nu problēma rodas tajā, ka vai nu viņš nekonektē tajam irc'am vai nu arī kaut kas cits, nezinu kas! Tad nu es pievienošu pie attačmentiem visu skriptu, lai Jums kāda skaidrība ir ap to! To .sma failu var atvērt ar notepad un apskatīties! Paldies! admincall.zip Edited June 27, 2009 by Kefiirs Quote Link to comment Share on other sites More sharing options...
waplet Posted June 28, 2009 Report Share Posted June 28, 2009 Kr4 tev ir jādara tā Viss kas ir root mapītē, jāiemet iekš tava webservera mapes, admincall.sma jāiemet ieks cstrike/addons/amxmodx/scriptings/admincall.sma , palaid viņu ar notepad2 un ieraksti savu adresi , piemēram tu viņu iemet www/cs/ mapē un un tad raksti admincall_domain ", "tavaadrese/cs/"); un tad palaid compile.exe viņs nokompilēs iemet iekš plugins amxx failu ,kas ir parādas scripting/compiled/ un iekš amxmodx/configs/plugins.ini ieraksti admincall.amxx , un taāā tad atliek sakonfigurēt config.inc.php kas ir iekš www/cs/ mapes so es darītu tā: <? /***************************************************************************** * ID: config.inc.php, v 1.0 2003/12/06 * Author: SentryIII * * Copyright (c) 2003 Josh "SentryIII" * * Full LGPL License: <http://www.gnu.org/copyleft/lesser.txt> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ****************************************************************************/ // Site Design $content[title] = "Chiteru nosudzeshana"; // <-- Main Title. BIG Font! $content[subtitle] = "Request Admin"; // <-- Tell the players what their looking at. $content[message] = " In any case the problem player will not be kicked automatically, instead an admin will join the game and watch the player. "; // The above text is shown to inform the player of any special instructions. $font[text] = "#000000"; // <-- Default is black $color[body] = "#696969"; $color[table] = "#000000"; $color[td] = "#C0C0C0"; $color[tdborder] = "#000000"; // Game Server Name $servername = "Tavs servera nosaukums"; // This name shows in the IRC request so the admins know which server to goto! // Problems List $problem[0] = "Glitching"; $problem[1] = "Racist"; $problem[2] = "Team Killer"; $problem[3] = "Hostage Killer"; $problem[4] = "Spamer"; $problem[5] = "Language"; $problem[6] = "Hacks/Cheats"; //$problem[7] = "You can add more as needed!"; //$problem[8] = ""; // IRC Config // Be sure you only have 1 server defined. 2 = PROBLEMATIC. So, if you uncomment one, comment the other! //$server = "irc.gamesnet.net"; $server = "irc.lv"; $port = "6667"; $botname = "BOTA NIKS"; $channel = "#tavs channels"; // Bot Timer $timer = "5000"; // In milliseconds (1000 = 1 Second) - If the bot never connects after you submit then its probably because its being disconnected too fast. // If thats the case for you then raise this number higher to get better results. // WARNING: You dont want the bot to stay connected too long because it consumes the servers resources. // I cant tell you how many times I had to restart because the bot wouldnt disconnect. ?> Quote Link to comment Share on other sites More sharing options...
Kefiirs Posted June 29, 2009 Author Report Share Posted June 29, 2009 (edited) Es jau to visu esmu izmēģinājis 100x Ir kaut kāds černis, kad viņš nekonektē klāt tam mIRC'am Visa ziņa paņemas un sūtās, bet manā mIRC kanālā vēl tas mIRC bots nav neko ierakstījis! Nu tik dumjš, lai nokompilētu es neesmu :D Visu pilnīgi saprotu, bet pie gala rezultāta netieku! + Neplāties tikai apkārt ar šo skriptu! Edited June 29, 2009 by Kefiirs Quote Link to comment Share on other sites More sharing options...
Klez Posted June 29, 2009 Report Share Posted June 29, 2009 (edited) sāc debugot .... uzliec visur lai raksta log failus kaut aiz katras darbības .... php failos viss ir sakonfigurēts ? Edited June 29, 2009 by Klez Quote Link to comment Share on other sites More sharing options...
Kefiirs Posted June 29, 2009 Author Report Share Posted June 29, 2009 Nu tad iemāci man debugot, jo esmu vēl tikai iesācējs ar PHP! ;) Quote Link to comment Share on other sites More sharing options...
Klez Posted June 30, 2009 Report Share Posted June 30, 2009 kas tur ko mācēt .... ja dati nāk no mysql, tad: mysql_connect("server","u","p") or die(mysql_error()); mysql_select_db("mydb") or die(mysql_error()); $sql = "kaut kads kverijs"; $dati = mysql_query($sql); //vai mysql_query($sql) or die(mysql_error()); if (!$dati){ //kaut kas nav .. echo mysql_error(); echo '<br>' . $sql; } utt Quote Link to comment Share on other sites More sharing options...
Kefiirs Posted July 1, 2009 Author Report Share Posted July 1, 2009 Dati nenāk no MySQL, tie nāk no skripta, ko ielādē spēļu serveris, tad spēlētājs ieraksta čatā komandu, viņam atveras logs, kur priekšā stāv visu spēlētāju nikneimi un viņš izvēlas, tad izvēlas iemeslu, nospiež AIZIET un tam automātiski ir jāparādas iekš mana mIRC kanāla, bet tā nenotiek! Quote Link to comment Share on other sites More sharing options...
Klez Posted July 3, 2009 Report Share Posted July 3, 2009 (edited) nu tā ir ar jebkuru mainīgo bezmazvai ... paskaties manuāli ko izmantojamā fcija atgriež un tad skaties ... jo pārsvarā visas fcijas atgriež false ja nevar izpildīt prasīto uzdevumu ... $kaut_kas = kaut_kada_fcija($paramtrs1, $paramtrs2); if (!$kaut_kas) { echo "Kļūda. nevaru izpildīt fciju: kaut_kada_fcija( $paramtrs1 , $paramtrs2 ) "; } un aiziet, pēti Edited July 3, 2009 by Klez Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.