Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP - IRC Bot Not sending message Help
    primarykey
    data
    text
    <p>Currently I am making a IRC that sends a message onto the IRC main channel. Here is my code:</p> <pre><code>&lt;?php $ircServer = "xxxx"; $ircPort = "6667"; $ircChannel = "#bots"; set_time_limit(0); $msg = $_GET['msg']; $ircSocket = fsockopen($ircServer, $ircPort, $eN, $eS); if ($ircSocket) { fwrite($ircSocket, "USER Lost rawr.test lol :code\n"); fwrite($ircSocket, "NICK Rawr" . rand() . "\n"); fwrite($ircSocket, "JOIN " . $ircChannel . "\n"); fwrite($ircSocket, "PRIVMSG " . $channel . " :" . $msg = $_GET['msg'] . "\n"); while(1) { while($data = fgets($ircSocket, 128)) { echo nl2br($data); flush(); // Separate all data $exData = explode(' ', $data); // Send PONG back to the server if($exData[0] == "PING") { fwrite($ircSocket, "PONG ".$exData[1]."\n"); } } echo $eS . ": " . $eN; } } ?&gt; &lt;html&gt;&lt;body&gt; &lt;h4&gt;IRC Bot Tester&lt;/h4&gt; &lt;form action="irc.php" method="post"&gt; Command: &lt;input type="text" name="msg" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;/body&gt;&lt;/html&gt; </code></pre> <p>My problem is the BOT is not sending any messages to the channel, as you see I used post + get data for the message info sent to the channel.</p> <p>Here is the log what I recieve:</p> <blockquote> <p>:irc.underworld.no 366 Rawr30517 #bots :End of /NAMES list. :irc.underworld.no 411 Rawr30517 :No recipient given (PRIVMSG) : 0: 0PING :irc.underworld.no</p> </blockquote> <p>I do not know which part causes the this:</p> <p>recipient given (PRIVMSG) : 0: 0PING</p> <p>Thanks if anyone could help me. I am trying to simply post a message to the bot and the bot delivers the message to the main channel.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload