PHP - IRC Bot Not sending message Help

后端 未结 2 1212
故里飘歌
故里飘歌 2021-01-25 17:54

Currently I am making a IRC that sends a message onto the IRC main channel. Here is my code:



        
相关标签:
2条回答
  • 2021-01-25 18:25
    fwrite($ircSocket, "PRIVMSG " . $ircChannel . " " . $msg = $_GET['msg'] . "\n");
    

    To:

    fwrite($ircSocket, "PRIVMSG " . $ircChannel . " " .$msg. "\n");
    
    0 讨论(0)
  • 2021-01-25 18:35

    Change:

    $msg = $_GET['msg'];
    ...
    fwrite($ircSocket, "PRIVMSG " . $channel . " :" . $msg = $_GET['msg'] . "\n");
    

    To:

    $msg = $_POST['msg'];
    ...
    fwrite($ircSocket, "PRIVMSG " . $ircChannel . " :" . $msg . "\n");
    
    0 讨论(0)
提交回复
热议问题