plushypop Posted April 10, 2007 Share Posted April 10, 2007 hi i didnt make this bot, but i tried to add on the ability so that whenever somone says hello or !bot hello it will say 'hey whats up' but it won't start any help? edit: it said the problem was on line 44 any help? <?php $host = "irc.abc.org"; $port=6667; $nick="sodab0t"; $ident="sodab0t"; $chan="#argh"; $readbuffer=""; $realname ="sodab0t"; $fp = fsockopen($host, $port, $erno, $errstr, 30); if (!$fp) { echo $errstr." (".$errno.")<br />\n"; } else { fwrite($fp, "NICK ".$nick."\r\n"); fwrite($fp, "USER ".$ident." ".$host." bla :".$realname."\r\n"); fwrite($fp, "JOIN :".$chan."\r\n"); fwrite($fp, "PRIVMSG ".$chan." :All other bots are inferior to me. \r\n"); while (!feof($fp)) { $line = fgets($fp, 128); echo $line."\n"; $line = explode(":ping ", $line); echo $line[0]."\n"; if ($line[1]) { fwrite($fp, "PONG ".$line[1]."\r\n"); while ($line=fgets($fp)) echo $line; if (stripos($line, "PRIVMSG ".$chan " :hello ")>0) { fwrite($fp, "PRIVMSG ".$chan." : hey, whats up \r\n"); { } } } fclose($fp); } ?> Link to comment https://forums.phpfreaks.com/topic/46362-irc-bot-probably-simple-help/ Share on other sites More sharing options...
fert Posted April 10, 2007 Share Posted April 10, 2007 what's line 44? Link to comment https://forums.phpfreaks.com/topic/46362-irc-bot-probably-simple-help/#findComment-225516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.