chatbots and sending pms

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    chatbots and sending pms

    hi guys im having a problem with sendpm ive implemented a chat bot to reply to pms but
    when i send the pm it shows that she has read it and it appears in online list as reading so and so's pm. when i goto retrieve the message
    the mesage is blank although her reply appears i my inbox.
    has anyone else coded this im also using pandora bots the bot has been publishes as well.

    PHP Code:
    if($mzonez=="sendpm3")
    {
          echo 
    "<head>\n";
          echo 
    "<title>mzonez</title>\n";
                echo 
    "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
          echo 
    "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
          echo 
    "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";

          echo 
    "</head>";
          echo 
    "<body>";

      echo 
    "<p align=\"center\">";

      
    $whonick getnick_uid($who);
      
    $byuid getuid_sid($sid);
      
    $tm time();
      
    $lastpm mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
      
    $pmfl $lastpm[0]+getpmaf();
      if(
    $byuid==1)$pmfl=0;
        if(
    $who==5) {
                     
    $botid "f476b7115e34e98f";
                  
    $hostname "www.pandorabots.com";
                  
    $hostpath "/pandora/talk-xml";
                  
    $sendData "botid=".$botid."&input=".urlencode($pmtext)."&custid=".$custid;

                  
    $result PostToHost($hostname$hostpath$sendData);

                  
    $pos strpos($result"custid=\"");
                  
    $pos strpos($result"<that>");
            if (
    $pos === false) {
                
    $reply "";
            } else {
                
    $pos += 6;
                
    $endpos strpos($result"</that>"$pos);
                
    $reply unhtmlspecialchars2(substr($result$pos$endpos $pos));
                
    $reply mysql_escape_string($reply);
            }
    $uid getuid_sid($sid);
    $res mysql_query("INSERT INTO ibwf_private SET text='".$reply."', byuid='5', touid='".$uid."', timesent='".$tm."'");
    $res mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."',touid='".$who."', unread='0', timesent='".$tm."'");
    }
      if(
    $pmfl<$tm)
      {
        if(!
    isblocked($pmtext,$byuid))
        {
        if((!
    isignored($byuid$who))&&(!istrashed($byuid)))
        {
      
    $res mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
      }else{
        
    $res true;
      }

      if(
    $res)
      {
        echo 
    "<img src=\"images/ok.gif\" alt=\"O\"/>";
        echo 
    "PM was sent successfully to $whonick<br/><br/>";
        echo 
    parsepm($pmtext$sid);

      }else{
        echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo 
    "Can't Send PM to $whonick<br/><br/>";
      }
      }else{
        
    $bantime time() + (7*24*60*60);
        echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo 
    "Can't Send PM to $whonick<br/><br/>";
        echo 
    "You just sent a link to one of the crapiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";
        
    mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
        
    mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
        
    mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='2', timesent='".$tm."'");
      }
      }else{
        
    $rema $pmfl $tm;
        echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo 
    "Flood control: $rema Seconds<br/><br/>";
      }
      echo 
    "<br/><br/><a href=\"inbox.php?action=main&amp;sid=$sid\">Back to inbox</a><br/>";
      echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
      echo 
    "</p>";

        echo 
    "</body>\n";
        echo 
    "</html>";
        
    //exit();










    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free


    #2
    re

    problem was solved it was just a matter of turning safemode off and enabling php_globals









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

    Comment


      #3
      great , hmm

      Comment


        #4
        re

        Originally posted by $XTREME$ View Post
        great , hmm
        also got chatbot to post in shout box shes everywhere lol









        Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
        Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

        Comment

        Working...
        X